347617796@qq.com 4 роки тому
батько
коміт
194378ffed
92 змінених файлів з 1463 додано та 837 видалено
  1. 7 7
      .tea/entryFiles-development/index$.web.js
  2. 7 7
      .tea/entryFiles-development/index$.worker.js
  3. 15 13
      .tea/entryFiles-production/index$.web.js
  4. 15 13
      .tea/entryFiles-production/index$.worker.js
  5. 3 1
      Component/img-box/index.js
  6. 6 6
      Component/process/process.acss
  7. 3 2
      Component/process/process.axml
  8. 19 4
      Component/selectDate/selectDate.js
  9. 23 0
      Component/selectDate_two/selectDate_two.js
  10. 4 6
      Component/selectRule/selectRule.axml
  11. 1 1
      Component/selectRule/selectRule.js
  12. 14 1
      Component/selectSection/selectSection.js
  13. 2 3
      Component/selectSectionStaff/selectSectionStaff.axml
  14. 25 4
      Component/selectSectionStaff/selectSectionStaff.js
  15. 4 1
      Component/selectSectionStaff/selectSectionStaff.json
  16. 40 1
      Component/selectSectionStaff_tow/selectSectionStaff_tow.acss
  17. 16 21
      Component/selectSectionStaff_tow/selectSectionStaff_tow.axml
  18. 100 12
      Component/selectSectionStaff_tow/selectSectionStaff_tow.js
  19. 4 1
      Component/selectSectionStaff_tow/selectSectionStaff_tow.json
  20. 2 4
      Component/selectStaff/selectStaff.axml
  21. 19 5
      Component/selectStaff/selectStaff.js
  22. 4 1
      Component/selectStaff/selectStaff.json
  23. 14 13
      Component/selectSx/selectSx.js
  24. 2 4
      Component/selectUser/selectUser.axml
  25. 4 1
      Component/selectUser/selectUser.json
  26. 16 7
      app.acss
  27. 20 12
      app.js
  28. BIN
      image/ljpm.png
  29. BIN
      image/zdyfz.png
  30. 1 1
      pages/deploy/index/index.acss
  31. 5 0
      pages/deploy/integralRule/integralRule.js
  32. 5 2
      pages/deploy/organization/organization.js
  33. 6 8
      pages/deploy/setCheck/setCheck.axml
  34. 6 5
      pages/statistics/B_ranking/B_ranking.axml
  35. 14 6
      pages/statistics/B_ranking/B_ranking.js
  36. 1 1
      pages/statistics/C_ranking/C_ranking.axml
  37. 42 23
      pages/statistics/addCustom/addCustom.acss
  38. 4 2
      pages/statistics/addCustom/addCustom.axml
  39. 5 1
      pages/statistics/addCustom/addCustom.js
  40. 5 5
      pages/statistics/checkDetail/checkDetail.axml
  41. 9 4
      pages/statistics/checkDetail/checkDetail.js
  42. 4 2
      pages/statistics/check_top/check_top.axml
  43. 94 69
      pages/statistics/check_top/check_top.js
  44. 0 2
      pages/statistics/customRamking/customRamking.acss
  45. 2 1
      pages/statistics/glz_execute/glz_execute.axml
  46. 14 7
      pages/statistics/glz_execute/glz_execute.js
  47. 2 2
      pages/statistics/index/index.axml
  48. 0 2
      pages/statistics/integralEvent/integralEvent.acss
  49. 6 7
      pages/statistics/integralEvent/integralEvent.axml
  50. 84 48
      pages/statistics/integralEvent/integralEvent.js
  51. 4 4
      pages/statistics/my_PrizeBuckle/my_PrizeBuckle.acss
  52. 3 0
      pages/statistics/my_PrizeBuckle/my_PrizeBuckle.axml
  53. 16 8
      pages/statistics/my_PrizeBuckle/my_PrizeBuckle.js
  54. 0 7
      pages/statistics/my_apply/my_apply.acss
  55. 4 3
      pages/statistics/my_apply/my_apply.axml
  56. 18 10
      pages/statistics/my_apply/my_apply.js
  57. 2 4
      pages/statistics/prizeBuckleDetail/prizeBuckleDetail.acss
  58. 7 7
      pages/statistics/prizeBuckleDetail/prizeBuckleDetail.axml
  59. 9 1
      pages/statistics/prizeBuckleDetail/prizeBuckleDetail.js
  60. 1 1
      pages/statistics/prizeBuckleDetail/prizeBuckleDetail.json
  61. 4 3
      pages/statistics/sectionRanking/sectionRanking.axml
  62. 26 14
      pages/statistics/sectionRanking/sectionRanking.js
  63. 11 11
      pages/workbench/apply/apply.axml
  64. 49 13
      pages/workbench/apply/apply.js
  65. 35 64
      pages/workbench/approve/approve.axml
  66. 19 12
      pages/workbench/approve/approve.js
  67. 7 6
      pages/workbench/approveDetail/approveDetail.acss
  68. 7 7
      pages/workbench/approveDetail/approveDetail.axml
  69. 24 14
      pages/workbench/approveDetail/approveDetail.js
  70. 38 8
      pages/workbench/index/index.acss
  71. 17 5
      pages/workbench/index/index.axml
  72. 23 20
      pages/workbench/index/index.js
  73. 1 2
      pages/workbench/index/index.json
  74. 14 10
      pages/workbench/jk_A/jk_A.axml
  75. 111 75
      pages/workbench/jk_A/jk_A.js
  76. 3 4
      pages/workbench/jk_A/jk_A.json
  77. 15 11
      pages/workbench/jk_B/jk_B.axml
  78. 172 58
      pages/workbench/jk_B/jk_B.js
  79. 3 4
      pages/workbench/jk_B/jk_B.json
  80. 5 5
      pages/workbench/my_approve/my_approve.acss
  81. 18 16
      pages/workbench/my_approve/my_approve.axml
  82. 17 21
      pages/workbench/my_approve/my_approve.js
  83. 6 6
      pages/workbench/prize_buckle/prize_buckle.acss
  84. 1 1
      pages/workbench/prize_buckle/prize_buckle.axml
  85. 22 13
      pages/workbench/prize_buckle/prize_buckle.js
  86. 2 3
      pages/workbench/statistics_A/statistics_A.acss
  87. 4 2
      pages/workbench/statistics_A/statistics_A.axml
  88. 8 2
      pages/workbench/statistics_A/statistics_A.js
  89. 1 3
      pages/workbench/statistics_B/statistics_B.acss
  90. 15 11
      pages/workbench/statistics_B/statistics_B.axml
  91. 22 18
      pages/workbench/statistics_B/statistics_B.js
  92. 1 1
      utils/feedback.js

+ 7 - 7
.tea/entryFiles-development/index$.web.js

@@ -6,23 +6,23 @@ require('../../Component/noData/noData?hash=05d2a9730dd6009bf9446182f9c985f40f8c
 require('../../node_modules/@antv/my-f2/es/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
 require('../../Component/selectRule/selectRule?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
 require('../../Component/selectType/selectType?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
-require('../../Component/selectSectionStaff_tow/selectSectionStaff_tow?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
+require('../../Component/selectSectionStaff_tow/selectSectionStaff_tow?hash=67592639e2c104cea398f9badcdafb39eb607b02');
+require('../../Component/selectSectionStaff/selectSectionStaff?hash=67592639e2c104cea398f9badcdafb39eb607b02');
 require('../../Component/process/process?hash=67592639e2c104cea398f9badcdafb39eb607b02');
 require('../../Component/selectSection/selectSection?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
 require('../../Component/selectDate/selectDate?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
-require('../../Component/selectStaff/selectStaff?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
+require('../../Component/selectStaff/selectStaff?hash=67592639e2c104cea398f9badcdafb39eb607b02');
 require('../../Component/selectRule_two/selectRule_two?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
 require('../../Component/selectDate_two/selectDate_two?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
 require('../../Component/selectSx/selectSx?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
-require('../../Component/selectSectionStaff/selectSectionStaff?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
 require('../../pages/workbench/index/index?hash=515236f8c96af7bcc38156941a11817af0611c88');
 require('../../pages/statistics/index/index?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
 require('../../pages/deploy/index/index?hash=2480af6fe59ab13e82f53b90e2783b2c750a746c');
 require('../../pages/workbench/statistics_A/statistics_A?hash=bdb0bce92eecbc6877ffeb617de4ef47419f5593');
 require('../../pages/workbench/statistics_B/statistics_B?hash=bdb0bce92eecbc6877ffeb617de4ef47419f5593');
-require('../../pages/workbench/jk_A/jk_A?hash=28edbbe5ce38700df7a81a17db3401e4d3bd3207');
-require('../../pages/workbench/jk_B/jk_B?hash=28edbbe5ce38700df7a81a17db3401e4d3bd3207');
-require('../../pages/workbench/apply/apply?hash=5039c3c6bbea5040ea7335bad71d676d6b533f9e');
+require('../../pages/workbench/jk_A/jk_A?hash=8cf75aeeb0de84d404849da1debaa3fdae13f0d2');
+require('../../pages/workbench/jk_B/jk_B?hash=8cf75aeeb0de84d404849da1debaa3fdae13f0d2');
+require('../../pages/workbench/apply/apply?hash=d6c7dd492570a1846aaa083a4b95c7f8e87c3de3');
 require('../../pages/workbench/prize_buckle/prize_buckle?hash=b9588c2921fd8a20182363116ba32f0ef391d03c');
 require('../../pages/workbench/my_approve/my_approve?hash=f2d76cc77e7717f6ce2c6c23de78140ccd3a6eb5');
 require('../../pages/workbench/approveDetail/approveDetail?hash=627f1b90505b489ef5bc84d3aa0a2614f1ee320e');
@@ -43,5 +43,5 @@ require('../../pages/deploy/organization/organization?hash=515236f8c96af7bcc3815
 require('../../pages/deploy/addMoney/addMoney?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
 require('../../pages/deploy/setCheck/setCheck?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
 require('../../pages/deploy/integralRule/integralRule?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
-require('../../pages/workbench/approve/approve?hash=28edbbe5ce38700df7a81a17db3401e4d3bd3207');
+require('../../pages/workbench/approve/approve?hash=d0f7b9c3ec6457c02f205337e1fdf44d2d143adc');
 require('../../pages/statistics/C_ranking/C_ranking?hash=bcd8e1c05053f01c7126b59e3990df8bcf9058aa');

+ 7 - 7
.tea/entryFiles-development/index$.worker.js

@@ -34,23 +34,23 @@ require('../../Component/noData/noData?hash=05d2a9730dd6009bf9446182f9c985f40f8c
 require('../../node_modules/@antv/my-f2/es/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
 require('../../Component/selectRule/selectRule?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
 require('../../Component/selectType/selectType?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
-require('../../Component/selectSectionStaff_tow/selectSectionStaff_tow?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
+require('../../Component/selectSectionStaff_tow/selectSectionStaff_tow?hash=67592639e2c104cea398f9badcdafb39eb607b02');
+require('../../Component/selectSectionStaff/selectSectionStaff?hash=67592639e2c104cea398f9badcdafb39eb607b02');
 require('../../Component/process/process?hash=67592639e2c104cea398f9badcdafb39eb607b02');
 require('../../Component/selectSection/selectSection?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
 require('../../Component/selectDate/selectDate?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
-require('../../Component/selectStaff/selectStaff?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
+require('../../Component/selectStaff/selectStaff?hash=67592639e2c104cea398f9badcdafb39eb607b02');
 require('../../Component/selectRule_two/selectRule_two?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
 require('../../Component/selectDate_two/selectDate_two?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
 require('../../Component/selectSx/selectSx?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
-require('../../Component/selectSectionStaff/selectSectionStaff?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
 require('../../pages/workbench/index/index?hash=515236f8c96af7bcc38156941a11817af0611c88');
 require('../../pages/statistics/index/index?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
 require('../../pages/deploy/index/index?hash=2480af6fe59ab13e82f53b90e2783b2c750a746c');
 require('../../pages/workbench/statistics_A/statistics_A?hash=bdb0bce92eecbc6877ffeb617de4ef47419f5593');
 require('../../pages/workbench/statistics_B/statistics_B?hash=bdb0bce92eecbc6877ffeb617de4ef47419f5593');
-require('../../pages/workbench/jk_A/jk_A?hash=28edbbe5ce38700df7a81a17db3401e4d3bd3207');
-require('../../pages/workbench/jk_B/jk_B?hash=28edbbe5ce38700df7a81a17db3401e4d3bd3207');
-require('../../pages/workbench/apply/apply?hash=5039c3c6bbea5040ea7335bad71d676d6b533f9e');
+require('../../pages/workbench/jk_A/jk_A?hash=8cf75aeeb0de84d404849da1debaa3fdae13f0d2');
+require('../../pages/workbench/jk_B/jk_B?hash=8cf75aeeb0de84d404849da1debaa3fdae13f0d2');
+require('../../pages/workbench/apply/apply?hash=d6c7dd492570a1846aaa083a4b95c7f8e87c3de3');
 require('../../pages/workbench/prize_buckle/prize_buckle?hash=b9588c2921fd8a20182363116ba32f0ef391d03c');
 require('../../pages/workbench/my_approve/my_approve?hash=f2d76cc77e7717f6ce2c6c23de78140ccd3a6eb5');
 require('../../pages/workbench/approveDetail/approveDetail?hash=627f1b90505b489ef5bc84d3aa0a2614f1ee320e');
@@ -71,7 +71,7 @@ require('../../pages/deploy/organization/organization?hash=515236f8c96af7bcc3815
 require('../../pages/deploy/addMoney/addMoney?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
 require('../../pages/deploy/setCheck/setCheck?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
 require('../../pages/deploy/integralRule/integralRule?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
-require('../../pages/workbench/approve/approve?hash=28edbbe5ce38700df7a81a17db3401e4d3bd3207');
+require('../../pages/workbench/approve/approve?hash=d0f7b9c3ec6457c02f205337e1fdf44d2d143adc');
 require('../../pages/statistics/C_ranking/C_ranking?hash=bcd8e1c05053f01c7126b59e3990df8bcf9058aa');
 }
 self.bootstrapApp ? self.bootstrapApp({ success }) : success();

+ 15 - 13
.tea/entryFiles-production/index$.web.js

@@ -6,36 +6,36 @@ require('../../Component/noData/noData?hash=05d2a9730dd6009bf9446182f9c985f40f8c
 require('../../node_modules/@antv/my-f2/es/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
 require('../../Component/selectRule/selectRule?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
 require('../../Component/selectType/selectType?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
-require('../../Component/selectSectionStaff_tow/selectSectionStaff_tow?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
+require('../../Component/selectSectionStaff_tow/selectSectionStaff_tow?hash=67592639e2c104cea398f9badcdafb39eb607b02');
+require('../../Component/selectSectionStaff/selectSectionStaff?hash=67592639e2c104cea398f9badcdafb39eb607b02');
 require('../../Component/process/process?hash=67592639e2c104cea398f9badcdafb39eb607b02');
 require('../../Component/selectSection/selectSection?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
 require('../../Component/selectDate/selectDate?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
-require('../../Component/selectStaff/selectStaff?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
+require('../../Component/selectStaff/selectStaff?hash=67592639e2c104cea398f9badcdafb39eb607b02');
 require('../../Component/selectRule_two/selectRule_two?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
 require('../../Component/selectDate_two/selectDate_two?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
 require('../../Component/selectSx/selectSx?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
-require('../../Component/selectSectionStaff/selectSectionStaff?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
 require('../../pages/workbench/index/index?hash=515236f8c96af7bcc38156941a11817af0611c88');
 require('../../pages/statistics/index/index?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
 require('../../pages/deploy/index/index?hash=2480af6fe59ab13e82f53b90e2783b2c750a746c');
 require('../../pages/workbench/statistics_A/statistics_A?hash=bdb0bce92eecbc6877ffeb617de4ef47419f5593');
 require('../../pages/workbench/statistics_B/statistics_B?hash=bdb0bce92eecbc6877ffeb617de4ef47419f5593');
-require('../../pages/workbench/jk_A/jk_A?hash=28edbbe5ce38700df7a81a17db3401e4d3bd3207');
-require('../../pages/workbench/jk_B/jk_B?hash=28edbbe5ce38700df7a81a17db3401e4d3bd3207');
-require('../../pages/workbench/apply/apply?hash=5039c3c6bbea5040ea7335bad71d676d6b533f9e');
+require('../../pages/workbench/jk_A/jk_A?hash=8cf75aeeb0de84d404849da1debaa3fdae13f0d2');
+require('../../pages/workbench/jk_B/jk_B?hash=8cf75aeeb0de84d404849da1debaa3fdae13f0d2');
+require('../../pages/workbench/apply/apply?hash=d6c7dd492570a1846aaa083a4b95c7f8e87c3de3');
 require('../../pages/workbench/prize_buckle/prize_buckle?hash=b9588c2921fd8a20182363116ba32f0ef391d03c');
 require('../../pages/workbench/my_approve/my_approve?hash=f2d76cc77e7717f6ce2c6c23de78140ccd3a6eb5');
 require('../../pages/workbench/approveDetail/approveDetail?hash=627f1b90505b489ef5bc84d3aa0a2614f1ee320e');
 require('../../pages/statistics/my_PrizeBuckle/my_PrizeBuckle?hash=515236f8c96af7bcc38156941a11817af0611c88');
-require('../../pages/statistics/prizeBuckleDetail/prizeBuckleDetail?hash=2480af6fe59ab13e82f53b90e2783b2c750a746c');
+require('../../pages/statistics/prizeBuckleDetail/prizeBuckleDetail?hash=627f1b90505b489ef5bc84d3aa0a2614f1ee320e');
 require('../../pages/statistics/my_apply/my_apply?hash=515236f8c96af7bcc38156941a11817af0611c88');
 require('../../pages/statistics/applyDetail/applyDetail?hash=2480af6fe59ab13e82f53b90e2783b2c750a746c');
-require('../../pages/statistics/glz_execute/glz_execute?hash=322c0c717893caa9d8d77ddf29449ac9e51c1805');
-require('../../pages/statistics/check_top/check_top?hash=0d5e40af9654737aec5d8ef1856513a629cbb1ca');
-require('../../pages/statistics/checkDetail/checkDetail?hash=2480af6fe59ab13e82f53b90e2783b2c750a746c');
-require('../../pages/statistics/integralEvent/integralEvent?hash=d0271b147ef1c0608acfacf8fed241cfc9afa2b1');
-require('../../pages/statistics/sectionRanking/sectionRanking?hash=79980e12dc2dbb169de30cdeddcb5b7409949aa8');
-require('../../pages/statistics/B_ranking/B_ranking?hash=322c0c717893caa9d8d77ddf29449ac9e51c1805');
+require('../../pages/statistics/glz_execute/glz_execute?hash=b03161331091ea30a5ff5738503197941ec76334');
+require('../../pages/statistics/check_top/check_top?hash=a39841aa8055abc1a62d590de4e2cd504268384a');
+require('../../pages/statistics/checkDetail/checkDetail?hash=62ac4ef78e3becaf55cac9228735d24a91309d1a');
+require('../../pages/statistics/integralEvent/integralEvent?hash=45871e3307fdd30ccbdd1c17fd7773364dfbb603');
+require('../../pages/statistics/sectionRanking/sectionRanking?hash=8239b016aa8a1f7918680c0fea9dfa6321ce6693');
+require('../../pages/statistics/B_ranking/B_ranking?hash=b03161331091ea30a5ff5738503197941ec76334');
 require('../../pages/statistics/customRamking/customRamking?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
 require('../../pages/statistics/addCustom/addCustom?hash=c61dcf19ed3fea0f4da43766ee3c25d30b199eea');
 require('../../pages/statistics/customDetail/customDetail?hash=9d0a64bf83c18e43ce73718197071535d83435ca');
@@ -43,3 +43,5 @@ require('../../pages/deploy/organization/organization?hash=515236f8c96af7bcc3815
 require('../../pages/deploy/addMoney/addMoney?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
 require('../../pages/deploy/setCheck/setCheck?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
 require('../../pages/deploy/integralRule/integralRule?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
+require('../../pages/workbench/approve/approve?hash=d0f7b9c3ec6457c02f205337e1fdf44d2d143adc');
+require('../../pages/statistics/C_ranking/C_ranking?hash=bcd8e1c05053f01c7126b59e3990df8bcf9058aa');

+ 15 - 13
.tea/entryFiles-production/index$.worker.js

@@ -59,36 +59,36 @@ require('../../Component/noData/noData?hash=05d2a9730dd6009bf9446182f9c985f40f8c
 require('../../node_modules/@antv/my-f2/es/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
 require('../../Component/selectRule/selectRule?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
 require('../../Component/selectType/selectType?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
-require('../../Component/selectSectionStaff_tow/selectSectionStaff_tow?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
+require('../../Component/selectSectionStaff_tow/selectSectionStaff_tow?hash=67592639e2c104cea398f9badcdafb39eb607b02');
+require('../../Component/selectSectionStaff/selectSectionStaff?hash=67592639e2c104cea398f9badcdafb39eb607b02');
 require('../../Component/process/process?hash=67592639e2c104cea398f9badcdafb39eb607b02');
 require('../../Component/selectSection/selectSection?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
 require('../../Component/selectDate/selectDate?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
-require('../../Component/selectStaff/selectStaff?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
+require('../../Component/selectStaff/selectStaff?hash=67592639e2c104cea398f9badcdafb39eb607b02');
 require('../../Component/selectRule_two/selectRule_two?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
 require('../../Component/selectDate_two/selectDate_two?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
 require('../../Component/selectSx/selectSx?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
-require('../../Component/selectSectionStaff/selectSectionStaff?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
 require('../../pages/workbench/index/index?hash=515236f8c96af7bcc38156941a11817af0611c88');
 require('../../pages/statistics/index/index?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
 require('../../pages/deploy/index/index?hash=2480af6fe59ab13e82f53b90e2783b2c750a746c');
 require('../../pages/workbench/statistics_A/statistics_A?hash=bdb0bce92eecbc6877ffeb617de4ef47419f5593');
 require('../../pages/workbench/statistics_B/statistics_B?hash=bdb0bce92eecbc6877ffeb617de4ef47419f5593');
-require('../../pages/workbench/jk_A/jk_A?hash=28edbbe5ce38700df7a81a17db3401e4d3bd3207');
-require('../../pages/workbench/jk_B/jk_B?hash=28edbbe5ce38700df7a81a17db3401e4d3bd3207');
-require('../../pages/workbench/apply/apply?hash=5039c3c6bbea5040ea7335bad71d676d6b533f9e');
+require('../../pages/workbench/jk_A/jk_A?hash=8cf75aeeb0de84d404849da1debaa3fdae13f0d2');
+require('../../pages/workbench/jk_B/jk_B?hash=8cf75aeeb0de84d404849da1debaa3fdae13f0d2');
+require('../../pages/workbench/apply/apply?hash=d6c7dd492570a1846aaa083a4b95c7f8e87c3de3');
 require('../../pages/workbench/prize_buckle/prize_buckle?hash=b9588c2921fd8a20182363116ba32f0ef391d03c');
 require('../../pages/workbench/my_approve/my_approve?hash=f2d76cc77e7717f6ce2c6c23de78140ccd3a6eb5');
 require('../../pages/workbench/approveDetail/approveDetail?hash=627f1b90505b489ef5bc84d3aa0a2614f1ee320e');
 require('../../pages/statistics/my_PrizeBuckle/my_PrizeBuckle?hash=515236f8c96af7bcc38156941a11817af0611c88');
-require('../../pages/statistics/prizeBuckleDetail/prizeBuckleDetail?hash=2480af6fe59ab13e82f53b90e2783b2c750a746c');
+require('../../pages/statistics/prizeBuckleDetail/prizeBuckleDetail?hash=627f1b90505b489ef5bc84d3aa0a2614f1ee320e');
 require('../../pages/statistics/my_apply/my_apply?hash=515236f8c96af7bcc38156941a11817af0611c88');
 require('../../pages/statistics/applyDetail/applyDetail?hash=2480af6fe59ab13e82f53b90e2783b2c750a746c');
-require('../../pages/statistics/glz_execute/glz_execute?hash=322c0c717893caa9d8d77ddf29449ac9e51c1805');
-require('../../pages/statistics/check_top/check_top?hash=0d5e40af9654737aec5d8ef1856513a629cbb1ca');
-require('../../pages/statistics/checkDetail/checkDetail?hash=2480af6fe59ab13e82f53b90e2783b2c750a746c');
-require('../../pages/statistics/integralEvent/integralEvent?hash=d0271b147ef1c0608acfacf8fed241cfc9afa2b1');
-require('../../pages/statistics/sectionRanking/sectionRanking?hash=79980e12dc2dbb169de30cdeddcb5b7409949aa8');
-require('../../pages/statistics/B_ranking/B_ranking?hash=322c0c717893caa9d8d77ddf29449ac9e51c1805');
+require('../../pages/statistics/glz_execute/glz_execute?hash=b03161331091ea30a5ff5738503197941ec76334');
+require('../../pages/statistics/check_top/check_top?hash=a39841aa8055abc1a62d590de4e2cd504268384a');
+require('../../pages/statistics/checkDetail/checkDetail?hash=62ac4ef78e3becaf55cac9228735d24a91309d1a');
+require('../../pages/statistics/integralEvent/integralEvent?hash=45871e3307fdd30ccbdd1c17fd7773364dfbb603');
+require('../../pages/statistics/sectionRanking/sectionRanking?hash=8239b016aa8a1f7918680c0fea9dfa6321ce6693');
+require('../../pages/statistics/B_ranking/B_ranking?hash=b03161331091ea30a5ff5738503197941ec76334');
 require('../../pages/statistics/customRamking/customRamking?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
 require('../../pages/statistics/addCustom/addCustom?hash=c61dcf19ed3fea0f4da43766ee3c25d30b199eea');
 require('../../pages/statistics/customDetail/customDetail?hash=9d0a64bf83c18e43ce73718197071535d83435ca');
@@ -96,6 +96,8 @@ require('../../pages/deploy/organization/organization?hash=515236f8c96af7bcc3815
 require('../../pages/deploy/addMoney/addMoney?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
 require('../../pages/deploy/setCheck/setCheck?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
 require('../../pages/deploy/integralRule/integralRule?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
+require('../../pages/workbench/approve/approve?hash=d0f7b9c3ec6457c02f205337e1fdf44d2d143adc');
+require('../../pages/statistics/C_ranking/C_ranking?hash=bcd8e1c05053f01c7126b59e3990df8bcf9058aa');
 }
 self.bootstrapApp ? self.bootstrapApp({ success }) : success();
 }

+ 3 - 1
Component/img-box/index.js

@@ -1,3 +1,4 @@
+
 Component({
   mixins: [],
   data: {
@@ -25,8 +26,9 @@ Component({
   methods: {
     setName(){
           var str=this.props.name;
+          var name=str.substring(str.length-2);
           this.setData({
-            userName:str.substring(str.length-2)
+            userName:name
           })
     }
   },

+ 6 - 6
Component/process/process.acss

@@ -1,17 +1,17 @@
 .process-title{
   padding:16rpx 32rpx;
   background: #fff;
-  font-size: 30rpx;
+}
+.process-title text:nth-child(1){
+  font-size: 32rpx;
   color: #222;
   font-weight: 600;
 }
-.process-title text{
-  font-size: 24rpx;
+.process-title text:nth-child(2){
   color: #909399;
   font-weight: 500;
-  position: relative;
-  top: -3rpx;
   padding-left: 20rpx;
+  font-size: 28rpx;
 }
 .process-bottom{
   padding:16rpx 32rpx;
@@ -24,7 +24,7 @@
   margin-right: 20rpx;
 }
 .process-date{
-  font-size: 22rpx;
+  font-size: 24rpx;
   color: #909399;
   padding: 4rpx 0;
 }

+ 3 - 2
Component/process/process.axml

@@ -1,6 +1,7 @@
 <view>
-  <view class="process-title border-bottom">审批
-    <text>多人审批时,以最后一人为准</text></view>
+  <view class="process-title border-bottom flex-box flex-flex-v-ce">
+      <text>审批</text><text>多人审批时,以最后一人为准</text>
+  </view>
   <view class="process-bottom">
     <view class="flex-box" style="position: relative;" a:for="{{process}}">
       <view class="imgBox" a:if="{{(index+1)!=process.length}}"></view>

+ 19 - 4
Component/selectDate/selectDate.js

@@ -11,12 +11,24 @@ Component({
   props: {
     onClose: (data) => console.log(data),
     onConfirm:(data) => console.log(data),
+    defaultDate:{type:"1",date:app.globalData.month},
   },
   didMount() {
-    this.setData({
-      isShow:this.props.isShow
-    })
-    console.log(this.data.endDay);
+    if(this.props.defaultDate.type==1){
+          this.setData({
+              dateIndex:"1",
+              month:this.props.defaultDate.date,
+              isShow:this.props.isShow
+          })
+    }else{
+          this.setData({
+              dateIndex:"2",
+              startDay:this.props.defaultDate.date[0],
+              endDay:this.props.defaultDate.date[1],
+              isShow:this.props.isShow
+          })
+    }
+    console.log(this.props.defaultDate)
   },
   didUpdate() { },
   didUnmount() { },
@@ -64,6 +76,9 @@ Component({
         success: (res) => {
           if (res.date < this.data.startDay) {
             app.globalData.showToast("结束时间不能小于开始时间")
+            this.setData({
+              endDay: this.data.startDay
+            })
             return false;
           }
           this.setData({

+ 23 - 0
Component/selectDate_two/selectDate_two.js

@@ -13,11 +13,34 @@ Component({
   props: {
     onClose: (data) => console.log(data),
     onConfirm: (data) => console.log(data),
+    dateObj:{
+      type:'3',
+      date:app.globalData.month
+    },
   },
   didMount() {
     this.setData({
       isShow: this.props.isShow
     })
+    if(this.props.dateObj.type){
+      this.setData({
+        dateIndex:this.props.dateObj.type,
+      })
+      if(this.props.dateObj.type==1){
+          this.setData({
+            year:this.props.dateObj.date,
+          })
+      }else if(this.props.dateObj.type==2){
+          this.setData({
+            jdYear:this.props.dateObj.date.substr(0,4),
+            jdji:this.props.dateObj.date.substr(this.props.dateObj.date.length-1,1)-1
+          })
+      }else{
+          this.setData({
+            month:this.props.dateObj.date,
+          })
+      }
+    }
   },
   didUpdate() { },
   didUnmount() { },

+ 4 - 6
Component/selectRule/selectRule.axml

@@ -28,9 +28,9 @@
             <view class="radio-right flex-1">
               <view>{{item.remark}}</view>
               <view class="red num" a:if="{{item.min_point>0}}">+{{(item.range_type == 1 ? item.min_point : item.min_point+'~'+item.max_point)}}
-                <text class="fontColorT" style="margin-left:10rpx">{{item.pt_Obj[0].name}}</text></view>
+                <text class="fontColorT" style="margin-left:10rpx">{{item.pt_Obj.name}}</text></view>
               <view class="green num" a:if="{{item.min_point<0}}">{{(item.range_type == 1 ? item.min_point : item.min_point+'~'+item.max_point)}}
-                <text class="fontColorT" style="margin-left:10rpx">{{item.pt_Obj[0].name}}</text></view>
+                <text class="fontColorT" style="margin-left:10rpx">{{item.pt_Obj.name}}</text></view>
             </view>
           </label>
         </radio-group>
@@ -38,8 +38,6 @@
       </view>
     </scroll-view>
   
-
-
     <scroll-view class="flex-5 right" scroll-y="{{true}}" a:else>
         <radio-group class="radio-group" onChange="radioChange" a:if="{{selectItem.length>0}}">
           <label class="flex-box flex-v-ce items" a:for="{{selectItem}}">
@@ -48,9 +46,9 @@
             <view class="radio-right flex-1">
               <view>{{item.remark}}</view>
               <view class="red num" a:if="{{item.min_point<0}}">{{(item.range_type == 1 ? item.min_point : item.min_point+'~'+item.max_point)}}
-                <text class="fontColorT" style="margin-left:10rpx">{{item.pt_Obj[0].name}}</text></view>
+                <text class="fontColorT" style="margin-left:10rpx">{{item.pt_Obj.name}}</text></view>
               <view class="green num" a:if="{{item.min_point>0}}">+{{(item.range_type == 1 ? item.min_point : item.min_point+'~'+item.max_point)}}
-                <text class="fontColorT" style="margin-left:10rpx">{{item.pt_Obj[0].name}}</text></view>
+                <text class="fontColorT" style="margin-left:10rpx">{{item.pt_Obj.name}}</text></view>
             </view>
           </label>
         </radio-group>

+ 1 - 1
Component/selectRule/selectRule.js

@@ -68,7 +68,6 @@ Component({
     },
     //点击二级
     activeItem(e){
-      console.log(e);
       var item=e.target.dataset.item
       this.setData({
         activeItemIndex:item.id,
@@ -120,6 +119,7 @@ Component({
             list.push(item_list[i][k])
           }
         }
+        // console.log(list)
         that.setData({
           item_list: list,
           rule_tree:rule_tree,

+ 14 - 1
Component/selectSection/selectSection.js

@@ -13,11 +13,13 @@ Component({
   props: {
     onConfirm: (data) => console.log(data),
     onClose:(data) => console.log(data),
+    defaultSection:'',
   },
   didMount() {
     that = this;
     this.setData({
-      isShow:this.props.isShow
+      isShow:this.props.isShow,
+      terr:[{name: '全部', id:0}]
     })
     this.getBmData();
   },
@@ -59,6 +61,11 @@ Component({
        var terr=this.data.terr;
        terr.push(item);
        if(item._child.length>0){
+        item._child.map(item=>{
+          if(item.id==this.props.defaultSection){
+            item.checked=true;
+          }
+        }) 
         that.setData({
           rule_tree:item._child,
           terr:terr
@@ -78,6 +85,12 @@ Component({
           name:'全公司',
           id:''
         })
+        list.map(item=>{
+          item.checked=false;
+          if(item.id==this.props.defaultSection){
+            item.checked=true;
+          }
+        })
         this.setData({
           rule_tree: list,
           all_rule_list:list,

+ 2 - 3
Component/selectSectionStaff/selectSectionStaff.axml

@@ -38,8 +38,7 @@
       </block>
       <view class="flex-box flex-v-ce userItem" a:for="{{searchVal}}" a:else>
         <label class="flex-box flex-v-ce flex-1">
-          <image a:if="{{item.img_url}}" class="img-url" style="width:70rpx;height:70rpx;" src="{{item.img_url}}"/>
-          <view a:else style="width: 70rpx;height: 70rpx;border-radius: 100%;background: #26A2FF;color: #fff;text-align: center;line-height: 64rpx;font-size: 24rpx;">{{item.name}}</view>
+          <img-box name="{{item.name}}" imgUrl="{{item.img_url}}" height="70rpx" width="70rpx"></img-box>
           <text style="margin-left:20rpx;" class="flex-1">{{item.name}}</text>
           <checkbox onChange="radioChange" data-index="{{index}}" data-item="{{item}}" checked="{{item.checked}}" name="{{item.id}}"/>
         </label>
@@ -49,7 +48,7 @@
   <view class="StaffFooter flex-box flex-v-ce">
     <view class="flex-1 f-left flex-box flex-v-ce">
       <view a:for="{{selectUserId}}" style="margin-right:10rpx;">
-        <image a:if="{{item.img_url}}" class="img-url" style="width:70rpx;height:70rpx;display: inline-block;" src="{{item.img_url}}"/>
+        <image a:if="{{item.img_url}}" class="img-url" style="width:70rpx;height:70rpx;display: inline-block;  position: relative;top: 6rpx;" src="{{item.img_url}}"/>
         <view a:else style="width: 70rpx;height: 70rpx;border-radius: 100%;background: #26A2FF;color: #fff;text-align: center;line-height: 64rpx;font-size: 24rpx;">{{item.name}}</view>
       </view>
     </view>

+ 25 - 4
Component/selectSectionStaff/selectSectionStaff.js

@@ -17,26 +17,35 @@ Component({
     isItem: true,
     searchVal: '',
     isAll: true,
+    userData:[],
   },
   props: {
     onClose: (data) => console.log(data),
     onConfirm: (data) => console.log(data),
     selectUser: [],
     isAllSelect: true,//是否多选
+    isLeadership:false,//是否限制人员选择
   },
   didMount() {
     that = this;
     this.setData({
       selectUserId: this.props.selectUser,
-      isAll: this.props.isAllSelect
+      isAll: this.props.isAllSelect,
+      userData:app.globalData.userData.employee_detail.manage_scope,
+      terr:[{name: '全部', id:0}]
     })
     this.getData(0);
     this.getBmData();
   },
   didUpdate() { },
-  didUnmount() { },
+  didUnmount() {
+   },
   methods: {
     onConfirm() {
+      if(this.data.selectUserId.length==0){
+        app.globalData.showToast("请选择一名员工")
+        return
+      }
       this.props.onConfirm(this.data.selectUserId);
       this.onClose();
     },
@@ -187,9 +196,14 @@ Component({
     },
     //获取人员列表
     getData(dept_id) {
+      this.setData({
+          userList:[],
+          all_user_list:[]
+      })
       app.$get("api/employee/list", { dept_id: dept_id }).then((res) => {
         var list = res.data.data.list;
         var selectUserId = this.data.selectUserId;
+        var arr=[];
         list.map((item) => {
           item.checked = false;
           if (selectUserId.length > 0) {
@@ -200,9 +214,16 @@ Component({
             })
           }
         })
+        that.data.userData.map((item)=>{
+              list.map((item2)=>{
+                  if(item.id==item2.id){
+                      arr.push(item2);
+                  }
+            })
+        })
         this.setData({
-          userList: list,
-          all_user_list: list
+          userList:that.props.isLeadership? arr:list,
+          all_user_list:that.props.isLeadership? arr:list,
         })
       })
     },

+ 4 - 1
Component/selectSectionStaff/selectSectionStaff.json

@@ -1,3 +1,6 @@
 {
-  "component": true
+  "component": true,
+    "usingComponents": {
+    "img-box": "/Component/img-box/index"
+  }
 }

+ 40 - 1
Component/selectSectionStaff_tow/selectSectionStaff_tow.acss

@@ -137,7 +137,7 @@
     height: 88rpx;
     text-align: center;
     line-height: 88rpx;
-    padding: 0 20rpx;
+    padding: 0 40rpx;
 }
 .f-left{
   overflow-x: auto;
@@ -152,4 +152,43 @@
 .staff-all{
   background: rgba(245, 247, 250, 1);
   padding: 16rpx 32rpx;
+}
+.radio_{
+  width: 40rpx;
+  height: 40rpx;
+  border: 1px solid #ccc;
+  border-radius: 100%;
+  background: #fff;
+  text-align: center;
+  box-sizing: border-box;
+  line-height: 36rpx;
+}
+.active .radio_{
+  border: 1px solid #26A2FF;
+}
+.active .radio_ text{
+    width: 20rpx;
+    height: 20rpx;
+    border-radius: 50rpx;
+    background: #26A2FF;
+    display: inline-block;
+    box-sizing: border-box;
+}
+.img_name_box{
+    width: 70rpx;
+    height: 70rpx;
+    border-radius: 50rpx;
+    background: #26A2FF;
+    color: #fff;
+    line-height: 70rpx;
+    text-align: center;
+    font-size: 24rpx;
+}
+.img_box{
+    width: 70rpx;
+    height: 70rpx;
+    border-radius: 50rpx;
+    display: block;
+      position: relative;
+  top: 4rpx;
 }

+ 16 - 21
Component/selectSectionStaff_tow/selectSectionStaff_tow.axml

@@ -20,34 +20,29 @@
             <view class="xia" a:if="{{item._child.length>0}}" data-item="{{item}}" catchTap="openDown">| 下级</view>
           </view>
         </view>
-        <radio-group class="radio-group" onChange="radioChange">
-          <view class="flex-box flex-v-ce userItem" a:for="{{userList}}">
-            <label class="flex-box flex-v-ce flex-1">
-              <image a:if="{{item.img_url}}" class="img-url" style="width:70rpx;height:70rpx;" src="{{item.img_url}}"/>
-              <view a:else style="width: 70rpx;height: 70rpx;border-radius: 100%;background: #26A2FF;color: #fff;text-align: center;line-height: 64rpx;font-size: 24rpx;">{{item.name}}</view>
-              <text style="margin-left:20rpx;" class="flex-1">{{item.name}}</text>
-              <radio value="{{item}}" checked="{{item.checked}}"/>
-            </label>
+        <view class="flex-box flex-v-ce userItem" a:for="{{userList}}" a:key="{{index}}">
+          <view class="{{item.checked? 'active':''}} flex-box flex-v-ce flex-1" catchTap="bindtap1" data-index="{{index}}" data-item="{{item}}">
+            <img-box name="{{item.name}}" imgUrl="{{item.img_url}}" height="70rpx" width="70rpx"></img-box>
+            <text style="margin-left:20rpx;" class="flex-1">{{item.name}}</text>
+            <view class="radio_"><text a:if="{{item.checked}}"></text></view>
           </view>
-        </radio-group>
+        </view>
       </block>
-      <radio-group class="radio-group" onChange="radioChange" a:else>
-        <view class="flex-box flex-v-ce userItem" a:for="{{searchVal}}">
-          <label class="flex-box flex-v-ce flex-1">
-            <image a:if="{{item.img_url}}" class="img-url" style="width:70rpx;height:70rpx;" src="{{item.img_url}}"/>
-            <view a:else style="width: 70rpx;height: 70rpx;border-radius: 100%;background: #26A2FF;color: #fff;text-align: center;line-height: 64rpx;font-size: 24rpx;">{{item.name}}</view>
+      <view class="flex-box flex-v-ce userItem" a:for="{{searchVal}}" a:else a:key="{{index}}">
+          <view class="{{item.checked? 'active':''}} flex-box flex-v-ce flex-1" catchTap="bindtap2" data-index="{{index}}" data-item="{{item}}">
+            <img-box name="{{item.name}}" imgUrl="{{item.img_url}}" height="70rpx" width="70rpx"></img-box>
             <text style="margin-left:20rpx;" class="flex-1">{{item.name}}</text>
-            <radio value="{{item}}" checked="{{item.checked}}"/>
-          </label>
-        </view>
-      </radio-group>
+            <view class="radio_"><text a:if="{{item.checked}}"></text></view>
+          </view>
+      </view>
     </scroll-view>
   </view>
   <view class="StaffFooter flex-box flex-v-ce">
     <view class="flex-1 f-left flex-box flex-v-ce">
-      <view a:for="{{selectUserId}}" style="margin-right:10rpx;">
-        <image a:if="{{item.img_url}}" class="img-url" style="width:70rpx;height:70rpx;display: inline-block;" src="{{item.img_url}}"/>
-        <view a:else style="width: 70rpx;height: 70rpx;border-radius: 100%;background: #26A2FF;color: #fff;text-align: center;line-height: 64rpx;font-size: 24rpx;">{{item.name}}</view>
+      <view a:for="{{selectUserId}}" style="margin-right:10rpx;" a:key="{{index}}">
+        <image mode="scaleToFill" class="img_box" src="{{item.img_url}}" a:if="{{item.img_url}}"/>
+        <view a:else class="img_name_box">{{item.name.substring(item.name.length-2)}}</view>
+        <!-- <img-box name="{{item.name}}" imgUrl="{{item.img_url}}" height="70rpx" width="70rpx"></img-box> -->
       </view>
     </view>
     <view class="staffBtn" onTap="onConfirm">确定</view>

+ 100 - 12
Component/selectSectionStaff_tow/selectSectionStaff_tow.js

@@ -15,24 +15,43 @@ Component({
     selectUserId: [],
     isAllChecked: false,
     isItem: true,
-    searchVal: '',
+    searchVal: [],
+    userData:[]
   },
   props: {
     onClose: (data) => console.log(data),
     onConfirm: (data) => console.log(data),
     selectUser: [],
     isAllSelect: true,//是否多选
+    isLeadership:false,//是否选择领导
+    superior_list:[],//上级交叉领导集合
   },
   didMount() {
     that = this;
-    // this.setData({
-    //   selectUserId: this.props.selectUser,
-    // })
-    this.getData(0);
+    if(this.props.selectUser.length>0){//当有默认的审批人
+        var arr=app.globalData.userData.employee_detail.superior_list;
+        arr.forEach(item=>{
+          if(item.id==this.props.selectUser[0].id){
+            this.setData({selectUserId:[item]})
+          }
+        })
+    }
+    var superior_list=[];//将传进来的上级集合,转成集合里变成对象(原先是对象)
+    this.props.superior_list.forEach(item=>{
+        superior_list.push({id:item});
+    })
+    var userData=app.globalData.userData.employee_detail;
+    this.setData({
+        userData:this.props.isLeadership ? userData.manage_scope:superior_list.length>0? superior_list:userData.superior_list ,
+        terr:[{name: '全部', id:0}]
+    })
     this.getBmData();
+    this.getData(0);
+  },
+  didUpdate() {
+  },
+  didUnmount() {
   },
-  didUpdate() { },
-  didUnmount() { },
   methods: {
     onConfirm() {
       this.props.onConfirm(this.data.selectUserId);
@@ -54,7 +73,6 @@ Component({
       var item = e.target.dataset.item;
       var terr = this.data.terr;
       terr.push(item);
-      console.log(item);
       if (item._child.length > 0) {
         that.setData({
           rule_tree: item._child,
@@ -115,12 +133,66 @@ Component({
         obj[v.id] = v;
       });
       return obj;
+    },
+        //单选择
+    bindtap1(e){
+      this.setData({selectUserId: []});
+      var index = e.target.dataset.index;
+      var checked = `userList[${index}].checked`;
+      var elm=this.data.userList[index].checked;
+      var userList = this.data.userList;
+      userList.map((item,item_index) => {
+          if(item.checked){
+              var item_checked = `userList[${item_index}].checked`;
+              this.setData({
+                [item_checked]:false
+              })
+          }
+      })
+      var arr=[];
+      arr.push(e.target.dataset.item);
+      if(!elm){
+        this.setData({
+          [checked]:!elm,
+          selectUserId:arr
+        })
+      }else{
+        this.setData({
+          [checked]:!elm,
+          selectUserId: []
+        })
+      }
+    },
+    bindtap2(e){
+      var index = e.target.dataset.index;
+      var checked = `searchVal[${index}].checked`;
+      var elm=this.data.searchVal[index].checked;
+      var searchVal = this.data.searchVal;
+      searchVal.map((item,item_index) => {
+          if(item.checked){
+              var item_checked = `searchVal[${item_index}].checked`;
+              this.setData({
+                [item_checked]:false
+              })
+          }
+      })
+      if(!elm){
+        this.setData({
+          [checked]:!elm,
+          selectUserId: [e.target.dataset.item]
+        })
+      }else{
+        this.setData({
+          [checked]:!elm,
+          selectUserId: []
+        })
+      }
     },
     //单选择
     radioChange: function (e) {
-
+      // console.log(e.detail.value);
       this.setData({
-        selectUserId: [e.detail.value]
+       
       })
     },
     //关闭
@@ -129,22 +201,38 @@ Component({
     },
     //获取人员列表
     getData(dept_id) {
+      this.setData({
+          userList: [],
+          all_user_list: []
+      })
       app.$get("api/employee/list", { dept_id: dept_id }).then((res) => {
         var list = res.data.data.list;
         var selectUserId = this.data.selectUserId;
+        var arr=[];
+        var ids=[];
         list.map((item) => {
           item.checked = false;
           if (selectUserId.length > 0) {
             selectUserId.forEach(item2 => {
               if (item.id == item2.id) {
                 item.checked = true;
+                ids.push(item);
               }
             })
           }
         })
+        that.data.userData.map((item)=>{
+              list.map((item2)=>{
+                  if(item.id==item2.id){
+                      arr.push(item2);
+                  }
+            })
+        })
+        
         this.setData({
-          userList: list,
-          all_user_list: list
+          userList: arr,
+          all_user_list: arr,
+          selectUserId:ids.length>0? ids:this.data.selectUserId
         })
       })
     },

+ 4 - 1
Component/selectSectionStaff_tow/selectSectionStaff_tow.json

@@ -1,3 +1,6 @@
 {
-  "component": true
+  "component": true,
+    "usingComponents": {
+    "img-box": "/Component/img-box/index"
+  }
 }

+ 2 - 4
Component/selectStaff/selectStaff.axml

@@ -9,8 +9,7 @@
       <checkbox-group class="radio-group" onChange="radioChange">
         <view class="flex-box flex-v-ce userItem" a:for="{{userList}}">
           <label class="flex-box flex-v-ce flex-1">
-            <image a:if="{{item.img_url}}" class="img-url" style="width:70rpx;height:70rpx;" src="{{item.img_url}}"/>
-            <view a:else style="width: 70rpx;height: 70rpx;border-radius: 100%;background: #26A2FF;color: #fff;text-align: center;line-height: 64rpx;font-size: 24rpx;">{{item.name}}</view>
+            <img-box name="{{item.name}}" imgUrl="{{item.img_url}}"  height="70rpx" width="70rpx"></img-box>
             <text style="margin-left:20rpx;" class="flex-1">{{item.name}}</text>
             <checkbox value="{{item}}" checked="{{item.checked}}" name="{{item.id}}"/>
           </label>
@@ -19,8 +18,7 @@
     </scroll-view>
     <view class="flex-box flex-v-ce selectUsers" a:if="{{selectUserId.length>0}}">
       <view a:for="{{selectUserId}}" style="margin-right:10rpx;height:70rpx;">
-        <image a:if="{{item.img_url}}" class="img-url" style="width:70rpx;height:70rpx;" src="{{item.img_url}}"/>
-        <view a:else style="width: 70rpx;height: 70rpx;border-radius: 100%;background: #26A2FF;color: #fff;text-align: center;line-height: 64rpx;font-size: 24rpx;">{{item.name}}</view>
+         <img-box name="{{item.name}}" imgUrl="{{item.img_url}}"  height="70rpx" width="70rpx"></img-box>
       </view>
     </view>
     <view class="flex-box date-btn">

+ 19 - 5
Component/selectStaff/selectStaff.js

@@ -9,6 +9,7 @@ Component({
   props: {
     onConfirm: (data) => console.log(data),
     onClose: (data) => console.log(data),
+    defaultUser: '',
   },
   didMount() {
     that = this;
@@ -37,9 +38,6 @@ Component({
     radioChange: function (e) {
       if (e.detail.value) {
         var arr = e.detail.value;
-        // var selectUserId=arr.map((item)=>{
-        //   return item.id;
-        // })
         this.setData({
           selectUserId: e.detail.value
         })
@@ -51,9 +49,25 @@ Component({
     },
     getData(keywords) {
       app.$get("api/employee/list", { dept_id: 0, keywords: keywords }).then((res) => {
+        var list = res.data.data.list;
+        var arr = this.props.defaultUser;
+        var defaultUser=arr.length>1? arr.split(","):arr;
+        var ids=[];
+        list.map(item=>{
+          item.checked = false;
+          if (defaultUser.length > 0) {
+            defaultUser.forEach(item2 => {
+              if (item.id == item2) {
+                item.checked = true;
+                ids.push(item);
+              }
+            })
+          }
+        })
         this.setData({
-          userList: res.data.data.list,
-          all_user_list: res.data.data.list
+          userList: list,
+          all_user_list: res.data.data.list,
+          selectUserId:ids.length>0? ids:[]
         })
       })
     },

+ 4 - 1
Component/selectStaff/selectStaff.json

@@ -1,3 +1,6 @@
 {
-  "component": true
+  "component": true,
+    "usingComponents": {
+    "img-box": "/Component/img-box/index"
+  }
 }

+ 14 - 13
Component/selectSx/selectSx.js

@@ -43,10 +43,23 @@ Component({
   props: {
     onConfirm: (data) => console.log(data),
     onClose: (data) => console.log(data),
+    defaultSx:['all','DESC'],
   },
   didMount() {
     that = this;
-    this.setData({ isShow: this.props.isShow })
+    var sxArr=this.data.sxArr;
+    sxArr.map(item=>{
+        item.child.map(item2=>{
+          item2.checked=false;
+          if(this.props.defaultSx[0]==item2.code){
+             item2.checked=true;
+          }
+          if(this.props.defaultSx[1]==item2.code){
+             item2.checked=true;
+          }
+        })
+    })
+    this.setData({ isShow: this.props.isShow,sxArr:sxArr })
   },
   didUpdate() { },
   didUnmount() { },
@@ -80,18 +93,6 @@ Component({
       this.props.onConfirm(arr);
       this.props.onClose();
     },
-    radioChange: function (e) {
-      if (e.detail.value) {
-        var arr = e.detail.value;
-        this.setData({
-          selectUserId: e.detail.value
-        })
-      } else {
-        this.setData({
-          selectUserId: []
-        })
-      }
-    },
     //关闭
     onClose(e) {
       this.props.onClose();

+ 2 - 4
Component/selectUser/selectUser.axml

@@ -9,8 +9,7 @@
       <checkbox-group class="radio-group" onChange="radioChange">
         <view class="flex-box flex-v-ce userItem" a:for="{{userList}}">
           <label class="flex-box flex-v-ce flex-1">
-            <image a:if="{{item.img_url}}" class="img-url" style="width:70rpx;height:70rpx;" src="{{item.img_url}}"/>
-            <view a:else style="width: 70rpx;height: 70rpx;border-radius: 100%;background: #26A2FF;color: #fff;text-align: center;line-height: 64rpx;font-size: 24rpx;">{{item.name}}</view>
+            <img-box name="{{item.name}}" imgUrl="{{item.img_url}}" height="80rpx" width="80rpx"></img-box>
             <text style="margin-left:20rpx;" class="flex-1">{{item.name}}</text>
             <checkbox value="{{item}}" checked="{{item.checked}}" name="{{item.id}}"/>
           </label>
@@ -19,8 +18,7 @@
     </scroll-view>
     <view class="flex-box flex-v-ce selectUsers font-flex-word">
       <view a:for="{{selectUserId}}" style="margin-right:10rpx;">
-        <image a:if="{{item.img_url}}" class="img-url" style="width:70rpx;height:70rpx;" src="{{item.img_url}}"/>
-        <view a:else style="width: 70rpx;height: 70rpx;border-radius: 100%;background: #26A2FF;color: #fff;text-align: center;line-height: 64rpx;font-size: 24rpx;">{{item.name}}</view>
+      <img-box name="{{item.name}}" imgUrl="{{item.img_url}}" height="80rpx" width="80rpx"></img-box>
       </view>
     </view>
   </view>

+ 4 - 1
Component/selectUser/selectUser.json

@@ -1,3 +1,6 @@
 {
-  "component": true
+  "component": true,
+    "usingComponents": {
+    "img-box": "/Component/img-box/index"
+  }
 }

+ 16 - 7
app.acss

@@ -1,6 +1,6 @@
 	page {
 		color: #303133;
-		font-size: 28rpx;
+		font-size: 30rpx;
 		background: rgba(245, 247, 250, 1);
 		height: 100%;
 		width: 100%;
@@ -85,10 +85,10 @@
 		z-index: 4;
 		position: sticky;
 		top: 0;
+		height: 80rpx;
 	}
 
 	.tab view {
-		padding: 20rpx 0;
 		width: 25%;
 		overflow: hidden;
 		text-overflow: ellipsis;
@@ -97,6 +97,9 @@
 
 	.tab view text {
 		position: relative;
+		padding: 20rpx 0;
+		/* width: 120%; */
+		white-space:nowrap
 	}
 
 	.tab text::after {
@@ -125,7 +128,7 @@
 		left: 0px;
 		right: 0px;
 		bottom: 0px;
-		background: rgba(0, 0, 0, 0.2);
+		background: rgba(0, 0, 0, 0.4);
 		z-index: 999;
 	}
 
@@ -150,7 +153,7 @@
 		border-radius: 6rpx;
 		background: rgba(245, 108, 108, 0.1);
 		color: #F56C6C;
-		font-size: 20rpx;
+		font-size: 24rpx;
 		padding: 0 6rpx;
 	}
 
@@ -158,7 +161,7 @@
 		border-radius: 6rpx;
 		background: rgba(103, 194, 58, 0.1);
 		color: #67C23A;
-		font-size: 20rpx;
+		font-size: 24rpx;
 		padding: 0 6rpx;
 	}
 
@@ -166,7 +169,7 @@
 		border-radius: 6rpx;
 		background: rgba(230, 162, 60, 0.1);
 		color: #E6A23C;
-		font-size: 20rpx;
+		font-size: 24rpx;
 		padding: 0 6rpx;
 	}
 
@@ -174,7 +177,7 @@
 		border-radius: 6rpx;
 		background: rgba(238, 162, 255, 0.1);
 		color: #26A2FF;
-		font-size: 20rpx;
+		font-size: 24rpx;
 		padding: 0 6rpx;
 	}
 
@@ -203,6 +206,12 @@
 		text-align: left;
 	}
 
+	.noDatas{
+		text-align: center;
+		padding: 16rpx 0;
+		color: #909399
+	}
+
 	/* 盒子模型 */
 
 	.flex-box {

+ 20 - 12
app.js

@@ -1,8 +1,8 @@
 import { showToast } from './utils/feedback'
 import { formatTime, arrRemoveObj,getTypeItem } from './utils/util'
 
-const baseUrl = "https://test-ding.g107.com/";
-// const baseUrl = "https://new.gdy.g107.com/";
+// const baseUrl = "https://test-ding.g107.com/";//测试
+const baseUrl = "https://ding.insys.g107.com/";//正式
 var that;
 App({
   //自定义全局变量
@@ -12,13 +12,13 @@ App({
     year: formatTime(new Date()).year,//当前年
     month: formatTime(new Date()).month,//当前月
     day: formatTime(new Date()).day,//当前日
-    types:[{id: 1, name: "绩效分", code: "JX"}, {id: 2, name: "A分", code: "AF"}, {id: 3, name: "B分", code: "BF"}],
-    // token: ' eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC8xMjAuNzkuNC4xNjI6NDkxNTJcL2FwaVwvZW1wbG95ZWUtbG9naW4iLCJpYXQiOjE1OTY0NDIyNjksImV4cCI6MTU5OTAzNDI2OSwibmJmIjoxNTk2NDQyMjY5LCJqdGkiOiJEdmhPTzNhNVgyaFVoa2h4Iiwic3ViIjo2MTYsInBydiI6ImNhNjQ4OWQ1MGYyNDA3YTY3ODMwZTgwOTBkMDE0ODgzNTY4NTk2MmIiLCJyb2xlIjoiZW1wbG95ZWUifQ.2nR9w7omCOcJyHFFoiQPvdhp3sKrQt2FQb0mJYQ9mWo',
-    // token:' eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC8xMjAuNzkuNC4xNjI6NDkxNTJcL2FwaVwvZW1wbG95ZWUtbG9naW4iLCJpYXQiOjE1OTY2NzcxNzUsImV4cCI6MTU5OTI2OTE3NSwibmJmIjoxNTk2Njc3MTc1LCJqdGkiOiI3aHRwSG5CTmJ3bjJrOVZhIiwic3ViIjoxMjMwLCJwcnYiOiJjYTY0ODlkNTBmMjQwN2E2NzgzMGU4MDkwZDAxNDg4MzU2ODU5NjJiIiwicm9sZSI6ImVtcGxveWVlIn0.Kfu2D8S1mloqHfyiYPLKwzDh6QYGMHfuwpFqos6A60g',
-    userData: {},
-    token:' eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC90ZXN0LWRpbmcuZzEwNy5jb21cL2FwaVwvdGVzdCIsImlhdCI6MTU5NzAyMDUyOCwiZXhwIjoxNTk3NjIwNTI4LCJuYmYiOjE1OTcwMjA1MjgsImp0aSI6Im1CbFhqemJuUm1sRlVxdkEiLCJzdWIiOjE2LCJwcnYiOiJjYTY0ODlkNTBmMjQwN2E2NzgzMGU4MDkwZDAxNDg4MzU2ODU5NjJiIiwicm9sZSI6ImVtcGxveWVlIn0.LNZmvfTE8rDfO4KQ1aONHMA0rT1ACsxbWOjDIOXVZJs',
+    types:[],
+    userData: '',
+    token:'',
+    // token:' eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC90ZXN0LWRpbmcuZzEwNy5jb21cL2FwaVwvdGVzdCIsImlhdCI6MTU5Nzg4NjUyOSwiZXhwIjoxNTk4NDg2NTI5LCJuYmYiOjE1OTc4ODY1MjksImp0aSI6IktvRmR2bk1VVThaN2poWjkiLCJzdWIiOjEsInBydiI6ImNhNjQ4OWQ1MGYyNDA3YTY3ODMwZTgwOTBkMDE0ODgzNTY4NTk2MmIiLCJyb2xlIjoiZW1wbG95ZWUifQ.1gjqd9WgrK7N_ugz0ljIniScr8fCBucFzNJE3Cjo1sg',
     ALIOSS_URL: 'https://integralsys.oss-cn-shenzhen.aliyuncs.com',
     imgHttpUrl:'https://intesys.cms.g107.com/integral.php/Api/get_signature',
+    corpId:'',
   },
   //获取积分类型
   getTypes() {
@@ -27,7 +27,7 @@ App({
     })
   },
   //封装post
-  $post(url, data) {
+  $post(url, data={}) {
     const promise = new Promise(function (resolve, reject) {
       dd.httpRequest({
         url: baseUrl + url,
@@ -46,8 +46,10 @@ App({
             resolve(res);
           } else if (res.data.code == 401) {
             that.globalData.showToast("登录已过期");
+             reject(res);
           } else {
             that.globalData.showToast(res.data.msg);
+             reject(res);
           }
         },
         fail: function (res) {
@@ -58,7 +60,7 @@ App({
     return promise;
   },
   //封装get
-  $get(url, data,Accept) {
+  $get(url,data={},Accept) {
     const promise = new Promise(function (resolve, reject) {
       dd.showLoading();
       dd.httpRequest({
@@ -72,12 +74,12 @@ App({
         data: data,
         dataType: 'json',
         success: function (res) {
+          dd.hideLoading();
           if (res.data.code == 1) {
             if (res.data.refresh_token && res.data.refresh_token != that.globalData.token) {
               that.globalData.token = res.data.refresh_token
             }
             resolve(res);
-            dd.hideLoading();
           } else if (res.data.code == 401) {
             that.globalData.showToast("登录已过期");
             // reject(res);
@@ -87,8 +89,8 @@ App({
           }
         },
         fail: function (res) {
-          reject(res);
           dd.hideLoading();
+          reject(res);
         },
       });
     })
@@ -98,16 +100,22 @@ App({
   login(corpId, callBack) {
     dd.getAuthCode({
       success: function (res) {
+        console.log(res);
         that.$post('api/ding/login', { authCode: res.authCode, corpId: corpId }).then(res => {
           if (res.data.code == 1) {
             var { token, user } = res.data.data;
-            // that.globalData.token = token;
+            that.globalData.token = token;
             that.globalData.userData = user;
             callBack();
           } else {
             that.globalData.showToast(res.msg)
           }
+        }).catch(err=>{
+          console.log(err);
         })
+      },
+      fail:function(err){
+          console.log(err)
       }
     });
   },

BIN
image/ljpm.png


BIN
image/zdyfz.png


+ 1 - 1
pages/deploy/index/index.acss

@@ -38,7 +38,7 @@
   padding: 28rpx 0;
 }
 .date{
-  font-size: 22rpx;
+  font-size: 24rpx;
   color: #999
 }
 .xusj{

+ 5 - 0
pages/deploy/integralRule/integralRule.js

@@ -15,6 +15,11 @@ Page({
   },
   onLoad(query) {
     that = this;
+    this.setData({
+          terr: [
+      { name: '全部', id: 0 }
+    ],
+    })
     dd.setNavigationBar({ title: "积分规则" });
     this.setData({ types: app.globalData.types })
     this.getData();

+ 5 - 2
pages/deploy/organization/organization.js

@@ -12,15 +12,18 @@ Page({
   onLoad(query) {
     that = this;
     dd.setNavigationBar({ title: "部门/员工" });
+    this.setData({
+      terr: [{ name: '全公司', id: 0 }],
+    })
     this.getMessage();
     this.getBmData();
     this.getUserData(0);
   },
   tbDd(){
-     var http1= app.$post("api/ding/employee_sync",{});
+    var http1= app.$post("api/ding/employee_sync",{});
     var http2= app.$post("api/ding/department_sync",{});
     Promise.all([http1,http2]).then((item)=>{
-      app.globalData.showTast(item[0].data.msg);
+      app.globalData.showToast(item[1].data.msg);
       console.log(item);
     })
   },

+ 6 - 8
pages/deploy/setCheck/setCheck.axml

@@ -11,7 +11,7 @@
     </view>
     <view class="flex-box li">
       <view class="li-left">
-        <view>正常加分</view>
+        <view>正常打卡</view>
         <view>加分</view>
       </view>
       <view>{{data.normal}}</view>
@@ -19,7 +19,6 @@
     <view class="flex-box li">
       <view class="li-left">
         <view>缺卡扣分</view>
-        <view>加分</view>
       </view>
       <view>{{data.no_sign}}</view>
     </view>
@@ -29,17 +28,16 @@
     <view class="flex-box li">
       <view class="li-left">
         <view>迟到扣分</view>
-        <view>加分</view>
       </view>
       <view>{{data.on_duty_late}}</view>
     </view>
-    <view class="flex-box li">
+    <!-- <view class="flex-box li">
       <view class="li-left">
         <view>严重迟到</view>
         <view>加分</view>
       </view>
       <view>{{data.off_duty_early}}</view>
-    </view>
+    </view> -->
     <view class="flex-box li">
       <view class="li-left">
         <view>早退扣分</view>
@@ -50,7 +48,7 @@
       <view class="li-left">
         <view>旷工扣分</view>
       </view>
-      <view>{{data.month_full_ad}}</view>
+      <view>{{data.absent}}</view>
     </view>
   </view>
   <view class="fontColorF">加班/请假</view>
@@ -58,14 +56,14 @@
     <view class="flex-box li">
       <view class="li-left">
         <view>每加班一</view>
-        <view>加分</view>
+        <view>小时加分</view>
       </view>
       <view>{{data.ot_per_hour}}</view>
     </view>
     <view class="flex-box li">
       <view class="li-left">
         <view>每请假一</view>
-        <view>分</view>
+        <view>小时扣分</view>
       </view>
       <view>{{data.leave_per_hour}}</view>
     </view>

+ 6 - 5
pages/statistics/B_ranking/B_ranking.axml

@@ -4,14 +4,14 @@
       <text class="{{showTissue? 'activeView blue':''}}">{{TissueVal}}</text>
     </view>
     <view class="flex-1" catchTap="selectIsPx">
-        <text a:if="{{isPx}}">降序</text>
-        <text a:else>升序</text>
+      <text a:if="{{isPx}}">降序</text>
+      <text a:else>升序</text>
     </view>
   </view>
   <view class="fontColorF" style="font-szie:20rpx;padding:10rpx 28rpx;">排名包含初始分和工龄分</view>
   <view class="main scroll">
-    <scroll-view class="scroll" scroll-y="{{true}}" a:if="{{list.length>0}}" onScrollToLower="onScrollToLower">
-      <view a:for="{{list}}" catchTap="openDetail" data-item="{{item}}" class="flex-box flex-v-ce item border-bottom">
+    <scroll-view lower-threshold="100" class="scroll" scroll-y="{{true}}" a:if="{{list.length>0}}" onScrollToLower="onScrollToLower">
+      <view a:for="{{list}}" data-item="{{item}}" class="flex-box flex-v-ce item border-bottom">
         <view a:if="{{index==0}}" class="index">
           <image mode="scaleToFill" src="../../../image/1.png"></image>
         </view>
@@ -28,8 +28,9 @@
         </view>
         <view class="blue" style="margin-right:28rpx;">{{item.point}}</view>
       </view>
+      <view class="noDatas" a:if="{{isData}}">没有更多咯</view>
     </scroll-view>
     <no-data a:if="{{list.length==0}}"></no-data>
   </view>
-  <select-section a:if="{{showTissue==true}}" isShow="{{showTissue}}" onClose="onClose" onConfirm="onConfirmTissue"></select-section>
+  <select-section defaultSection="{{dept_id}}" a:if="{{showTissue==true}}" isShow="{{showTissue}}" onClose="onClose" onConfirm="onConfirmTissue"></select-section>
 </view>

+ 14 - 6
pages/statistics/B_ranking/B_ranking.js

@@ -6,7 +6,8 @@ Page({
     showTissue:false,//显示部门组件
     TissueVal:'全公司',
     isPx:true,
-    page:1
+    page:1,
+    scroll_top:0
   },
   onLoad() {
     that = this;
@@ -16,7 +17,7 @@ Page({
     getData(is){
     var data = {
       page: that.data.page,
-      page_size: 10,
+      page_size: 20,
       dept_id:that.data.dept_id,
       pt_id: app.getTypesItem('BF').id,
       sort: that.data.isPx?'DESC':'ASC',
@@ -26,7 +27,7 @@ Page({
       var data = res.data.data.list;
       if (is) {
         if (data.length == 0) {
-          app.globalData.showToast("已无更多咯");
+          this.setData({isData: true})
           return;
         }
         var list = that.data.list;
@@ -34,16 +35,23 @@ Page({
           list: list.concat(data)
         })
       } else {
+        this.setData({list:[]});
         this.setData({
-          list: data
+          list: data,
+          isData: false,
         })
       }
     })
   },
     //上啦加载
   onScrollToLower() {
-    this.setData({ page: ++that.data.page })
-    this.getData(true);
+    console.log(this.data.isData);
+    if(!that.data.isData){
+      this.setData({ page: ++that.data.page })
+      this.getData(true);
+    }else{
+       app.globalData.showToast("已无更多咯");
+    }
   },
   selectIsPx(){
     this.setData({

+ 1 - 1
pages/statistics/C_ranking/C_ranking.axml

@@ -14,7 +14,7 @@
   <view class="fontColorF" style="font-szie:20rpx;padding:10rpx 28rpx;">排名不包含初始分和工龄分</view>
   <view class="main scroll">
     <scroll-view class="scroll" scroll-y="{{true}}" a:if="{{list.length>0}}" onScrollToLower="onScrollToLower">
-      <view a:for="{{list}}" catchTap="openDetail" data-item="{{item}}" class="flex-box flex-v-ce item border-bottom">
+      <view a:for="{{list}}" data-item="{{item}}" class="flex-box flex-v-ce item border-bottom">
         <view a:if="{{index==0}}" class="index">
           <image mode="scaleToFill" src="../../../image/1.png"></image>
         </view>

+ 42 - 23
pages/statistics/addCustom/addCustom.acss

@@ -1,33 +1,45 @@
-.title{
-  font-size: 24rpx;
+.title {
   padding: 28rpx;
   padding-bottom: 0rpx;
 }
-.input{
+
+.input {
   width: 100%;
   background: #fff;
   font-size: 28rpx;
-  padding: 20rpx 28rpx;
+  padding: 0rpx 28rpx;
+  height: 84rpx;
+  line-height: 84rpx;
+  box-sizing: border-box;
 }
-.add{
-    background: #fff;
-    padding:22rpx 28rpx;
+
+.add {
+  background: #fff;
+  padding: 0rpx 28rpx;
+  height: 84rpx;
+  line-height: 84rpx;
+  width: 100%;
+  box-sizing: border-box;
 }
-.add image{
+
+.add image {
   width: 30rpx;
   height: 30rpx;
   position: relative;
   top: 6rpx;
   margin-left: 10rpx;
 }
-.dataList{
-  padding:20rpx 28rpx;
+
+.dataList {
+  padding: 20rpx 28rpx;
   background-color: #fff;
 }
-.dataList text{
+
+.dataList text {
   margin-left: 16rpx;
 }
-.footer{
+
+.footer {
   position: fixed;
   left: 0;
   right: 0;
@@ -36,7 +48,8 @@
   padding: 10rpx;
   border-top: 1px solid #f1f1f1;
 }
-.footer .delete{
+
+.footer .delete {
   background: #fff;
   border: 1px solid #f1f1f1;
   height: 88rpx;
@@ -45,7 +58,8 @@
   margin-right: 10rpx;
   border-radius: 6rpx;
 }
-.footer .save{
+
+.footer .save {
   border-radius: 6rpx;
   background: #26A2FF;
   color: #fff;
@@ -53,23 +67,28 @@
   text-align: center;
   line-height: 88rpx;
 }
-.scroll{
+
+.scroll {
   height: calc(100vh - 440rpx);
 }
-.box{
+
+.box {
   position: fixed;
   top: 0;
   left: 0;
   right: 0;
   bottom: 0;
-  background: rgba(0,0,0,0.2);
+  background: rgba(0, 0, 0, 0.2);
   z-index: 999;
-  transform: translate(0,100%);
+  transform: translate(0, 100%);
 }
-.add-right{
-   max-width: 300rpx;
+
+.add-right {
+  text-align: right;
   overflow: hidden;
-	  text-overflow: ellipsis;
-	  white-space: nowrap;
-    text-align: right;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  height: 84rpx;
+  line-height: 84rpx;
+  max-width: 300rpx;
 }

+ 4 - 2
pages/statistics/addCustom/addCustom.axml

@@ -1,13 +1,15 @@
 <view>
   <view class="header">
     <view class="title fontColorF">分组名称</view>
-    <input placeholder="请输入分组名称" class="input" value="{{title}}" onInput="setTitle"/>
+    <view style="width:100%">
+        <input placeholder="请输入分组名称" class="input" value="{{title}}" onInput="setTitle"/>
+    </view>
   </view>
   <view class="main">
     <view class="main-herader margin-bottom">
       <view class="title fontColorF">分组成员({{selectUser.length}})</view>
       <view class="flex-box flex-v-ce add">
-        <view class="flex-1 blue" onTap="openAdd">+ 添加员工</view>
+        <view class="blue flex-1" onTap="openAdd">+ 添加员工</view>
         <view class="add-right fontColorF">
           <text a:for="{{selectUser}}">{{item.name}},</text>
           <text>{{selectUser.length}}人</text>

+ 5 - 1
pages/statistics/addCustom/addCustom.js

@@ -13,7 +13,7 @@ Page({
     that = this;
     if (e.id) {
       this.getData(e.id);
-      this.setData({ isbj: e.id });
+      this.setData({ isbj: e.id, });
     }
     dd.setNavigationBar({ title: "新建分组" });
   },
@@ -58,6 +58,10 @@ Page({
     this.data.selectUser.forEach(element => {
       arr.push(element.id);
     });
+    if(arr.length==0){
+      app.globalData.showToast("至少选择一名员工参与");
+      return
+    }
     var data = {
       group_id:that.data.isbj,
       group_name: this.data.title,

+ 5 - 5
pages/statistics/checkDetail/checkDetail.axml

@@ -1,13 +1,13 @@
 <view class="all">
   <view class="header flex-box flex-v-ce border-bottom">
-    <img-box name="{{item.name}}" imgUrl="{{item.img_url}}" height="90rpx" width="90rpx" fSize="28rpx"></img-box>
+    <img-box name="{{item_obj.name}}" imgUrl="{{item_obj.img_url}}" height="90rpx" width="90rpx" fSize="28rpx"></img-box>
     <view class="header-top-right flex-1">
-      <view class="name">{{item.name}}</view>
-      <view class="state">{{item.dept_name}}</view>
+      <view class="name">{{item_obj.name}}</view>
+      <view class="state">{{item_obj.dept_name}}</view>
     </view>
     <view class="text-right">
-      <view class="red">{{item.point}}</view>
-      <view class="fontColorF">第{{item.rank}}名</view>
+      <view class="red">{{item_obj.point}}</view>
+      <view class="fontColorF">第{{item_obj.rank}}名</view>
     </view>
   </view>
   <view class="main">

+ 9 - 4
pages/statistics/checkDetail/checkDetail.js

@@ -11,15 +11,20 @@ Page({
   onLoad(e) {
     that = this;
     dd.setNavigationBar({ title: "排名" });
-    if (e.id) {
+    if (e.item) {
       this.setData({
         item: JSON.parse(e.item)
       })
-      this.getData(e);
+      this.setData({
+        item_obj: that.data.item.item
+      })
+      this.getData();
     }
   },
-  getData(data) {
-    app.$post('api/ad/event', { employee_id:data.id,type:data.type,date_type:data.date_type }).then((res) => {
+  getData() {
+    var item=this.data.item;
+    console.log(item);
+    app.$post('api/ad/event',item).then((res) => {
       var data = res.data.data.list;
       this.setData({
         list: data

+ 4 - 2
pages/statistics/check_top/check_top.axml

@@ -9,9 +9,10 @@
       <text class="{{showDate? 'activeView':''}}" catchTap="selectDate">{{selectDateVal}}</text>
     </view>
     <view class="flex-1">
-      <picker onChange="bingMinute2" value="{{TisrrIndex}}" range="{{tisrrArr}}" range-key="name">
+      <picker a:if="{{tisrrArr.length>0}}" onChange="bingMinute2" value="{{TisrrIndex}}" range="{{tisrrArr}}" range-key="name">
         <text>{{tisrrArr[TisrrIndex].name}}</text>
       </picker>
+      <text class="fontColorT" a:else>无考勤组</text>
     </view>
   </view>
   <view class="main scroll">
@@ -36,8 +37,9 @@
         </view>
         <view class="blue" style="margin-right:28rpx;">{{item.point}}分</view>
       </view>
+              <view class="noDatas" a:if="{{isData}}">没有更多咯</view>
     </scroll-view>
     <no-data a:if="{{list.length==0}}"></no-data>
   </view>
-  <select-date isShow="{{showDate}}" a:if="{{showDate==true}}" onClose="onClose" onConfirm="onConfirmDate"></select-date>
+  <select-date defaultDate="{{defaultDate}}" isShow="{{showDate}}" a:if="{{showDate==true}}" onClose="onClose" onConfirm="onConfirmDate"></select-date>
 </view>

+ 94 - 69
pages/statistics/check_top/check_top.js

@@ -9,15 +9,19 @@ Page({
       { id: 1, name: '总分' },
       { id: 2, name: '早到' },
       { id: 3, name: '迟到' },
-      { id: 2, name: '加班' },
-      { id: 3, name: '请假' },
+      { id: 4, name: '加班' },
+      { id: 5, name: '请假' },
+      { id: 8, name: '早退' },
+      { id: 9, name: '缺卡' },
+      { id: 10, name: '缺勤' },
     ],
     showDate: false,//是否显示时间组件
-    selectDateVal: '月',
+    selectDateVal: '月',
     TisrrIndex: 0,//条件选择
     page: 1,
     date_type: 3,
     getData: '',
+    tisrrArr:[],
   },
   onLoad() {
     that = this;
@@ -25,20 +29,32 @@ Page({
     this.getTisrr();
   },
   openDetail(e) {
-    var item= e.target.dataset.item;
-    var type=that.data.minuteIndex + 1;
+    var item = e.target.dataset.item;
+    var type = that.data.minuteArray[that.data.minuteIndex].id
+    var obj={
+      id:item.id,
+      type:type,
+      date_type:that.data.date_type,
+      item:item,
+    }
+    if (that.data.date_type == 2) {
+      obj.start_date = that.data.dateObj[0];
+      obj.end_date = that.data.dateObj[1];
+    } else {
+      obj.month_date = that.data.dateObj || that.data.date;
+    }
     dd.navigateTo({
-      url: '../checkDetail/checkDetail?id='+item.id+'&type='+type+'&date_type='+that.data.date_type+'&item='+JSON.stringify(item)
+      url: '../checkDetail/checkDetail?item='+JSON.stringify(obj),
     })
   },
   getData(is) {
     dd.showLoading();
     var data = {
-      type: that.data.minuteIndex + 1,
+      type: that.data.minuteArray[that.data.minuteIndex].id,
       date_type: that.data.date_type,
       page: that.data.page,
-      page_size: 10,
-      group_id: that.data.tisrrArr[that.data.TisrrIndex].id,
+      page_size: 20,
+      group_id:that.data.tisrrArr.length>0? that.data.tisrrArr[that.data.TisrrIndex].id:''
     }
     if (that.data.date_type == 2) {
       data.start_date = that.data.dateObj[0];
@@ -48,11 +64,12 @@ Page({
     }
     app.$post('api/ad/rank', data).then((res) => {
       var data = res.data.data.list;
+      dd.hideLoading();
       if (is) {
         if (data.length == 0) {
-          setTimeout(() => {
-            app.globalData.showToast("已无更多咯");
-          }, 1000);
+          this.setData({
+            isData: true
+          })
           return;
         }
         var list = that.data.list;
@@ -60,70 +77,78 @@ Page({
           list: list.concat(data)
         })
       } else {
+        this.setData({ list: [] });
         this.setData({
-          list: data
+          list: data,
+          isData: false
         })
       }
-    dd.hideLoading();
-  })
+    })
+  },
+  //上啦加载
+  onScrollToLower() {
+    if (!that.data.isData) {
+      this.setData({ page: ++that.data.page })
+      this.getData(true);
+    } else {
+      app.globalData.showToast("已无更多咯");
+    }
   },
-//上啦加载
-onScrollToLower() {
-  this.setData({ page: ++that.data.page })
-  this.getData(true);
-},
 
-//选择时间
-onConfirmDate(data) {
-  that.setData({
-    dateObj: data.date,
-    date_type: data.type == 1 ? 3 : data.type,
-    page: 1,
-    selectDateVal:data.type == 1 ? '月' : '日',
-  })
-  this.getData();
-},
-//关闭弹窗
-onClose() {
-  this.setData({ showDate: false})
-},
-//条件选择
-bingMinute(e) {
-  this.setData({
-    minuteIndex: e.detail.value,
-    page: 1
-  });
-  this.getData();
-},
-bingMinute2(e) {
-  this.setData({
-    TisrrIndex: e.detail.value,
-    page: 1
-  });
-  this.getData();
-},
+  //选择时间
+  onConfirmDate(data) {
+    that.setData({
+      defaultDate:data,
+      dateObj: data.date,
+      date_type: data.type == 1 ? 3 : data.type,
+      page: 1,
+      selectDateVal: data.type == 1 ? (data.date==that.data.date? '本月':'月') : '日',
+    })
+    this.getData();
+  },
+  //关闭弹窗
+  onClose() {
+    this.setData({ showDate: false })
+  },
+  //条件选择
+  bingMinute(e) {
+    this.setData({
+      minuteIndex: e.detail.value,
+      page: 1
+    });
+    this.getData();
+  },
+  bingMinute2(e) {
+    this.setData({
+      TisrrIndex: e.detail.value,
+      page: 1
+    });
+    this.getData();
+  },
 
-activeItem(e) {
-  var index = e.target.dataset.index;
-  this.setData({ activeIndex: index })
-},
+  activeItem(e) {
+    var index = e.target.dataset.index;
+    this.setData({ activeIndex: index })
+  },
 
-//显示时间选择组件
-selectDate() {
-  this.setData({ showDate: !this.data.showDate })
-},
+  //显示时间选择组件
+  selectDate() {
+    this.setData({ showDate: !this.data.showDate })
+  },
 
-getTisrr() {
-  app.$get('api/ad/groups', {}).then((res) => {
-    var arr = [];
-    var data = res.data.data.list;
-    for (let k in data) {
-      arr.push({ id: k, name: data[k] })
-    }
-    this.setData({
-      tisrrArr: arr
+  getTisrr() {
+    app.$get('api/ad/groups', {}).then((res) => {
+      var arr = [];
+      var data = res.data.data.list;
+      if(data.length>0){
+        for (let k in data) {
+          arr.push({ id: k, name: data[k] })
+        }
+      }
+      this.setData({
+        tisrrArr: arr
+      })
+      this.getData()
     })
-    this.getData()
-  })
-},
+  },
 });

+ 0 - 2
pages/statistics/customRamking/customRamking.acss

@@ -35,7 +35,6 @@
 }
 
 .message .num {
-  font-size: 24rpx;
   margin-top: 10rpx;
 }
 
@@ -56,7 +55,6 @@
 }
 
 .noDataTop view:nth-child(2) {
-  font-size: 24rpx;
   margin-bottom: 80rpx;
 }
 

+ 2 - 1
pages/statistics/glz_execute/glz_execute.axml

@@ -30,9 +30,10 @@
         <view class="flex-1">{{item.reward_count}}</view>
         <view class="flex-1">{{item.deduct_count}}</view>
       </view>
+              <view class="noDatas" a:if="{{isData}}">没有更多咯</view>
     </scroll-view>
     <no-data a:if="{{list.length==0}}"></no-data>
   </view>
 
-    <select-section isShow="{{showTissue}}" a:if="{{showTissue==true}}" onClose="onClose" onConfirm="onConfirmTissue"></select-section>
+    <select-section defaultSection="{{tissueVal}}" isShow="{{showTissue}}" a:if="{{showTissue==true}}" onClose="onClose" onConfirm="onConfirmTissue"></select-section>
 </view>

+ 14 - 7
pages/statistics/glz_execute/glz_execute.js

@@ -26,10 +26,11 @@ Page({
     var data;
     data = {
       page: that.data.page,
+      page_size:20,
       month: that.data.month,
       dept_id: that.data.tissueVal,
     }
-    app.$get('api/integral/statistics/prize/list', data).then((res) => {
+    app.$get('api/integral/statistics/prize/list',data).then((res) => {
       var data = res.data.data.list || [];
       if (that.data.activeIndex == 0) {
         data.sort(that.sotrs('reward_count'));
@@ -38,9 +39,9 @@ Page({
       }
       if (is) {
         if (data.length == 0) {
-          setTimeout(() => {
-            app.globalData.showToast("已无更多咯");
-          }, 1000);
+          this.setData({
+            isData: true
+          })
           return;
         }
         var list = that.data.list;
@@ -48,16 +49,22 @@ Page({
           list: list.concat(data)
         })
       } else {
+                this.setData({list:[]});
         this.setData({
-          list: data
+          list: data,
+          isData: false
         })
       }
     })
   },
   //上啦加载
   onScrollToLower() {
-    this.setData({ page: ++that.data.page })
-    this.getData(true);
+    if(!that.data.isData){
+      this.setData({ page: ++that.data.page })
+      this.getData(true);
+    }else{
+       app.globalData.showToast("已无更多咯");
+    }
   },
   openDetail(e) {
     var item= e.target.dataset.item;

+ 2 - 2
pages/statistics/index/index.axml

@@ -43,14 +43,14 @@
       </view>
     </view>
     <view class="flex-box flex-v-ce li" data-index="7" onTap="openView">
-      <image class="img-left" mode="scaleToFill" src="../../../image/jk.png"></image>
+      <image class="img-left" mode="scaleToFill" src="../../../image/ljpm.png"></image>
       <view class="flex-box flex-v-ce flex-1 li-right border-bottom">
         <view class="title flex-1">累计B分排名</view>
         <image mode="scaleToFill" src="../../../image/right.png" class="img-right"></image>
       </view>
     </view>
     <view class="flex-box flex-v-ce li" data-index="8" onTap="openView">
-      <image class="img-left" mode="scaleToFill" src="../../../image/jk.png"></image>
+      <image class="img-left" mode="scaleToFill" src="../../../image/zdyfz.png"></image>
       <view class="flex-box flex-v-ce flex-1 li-right">
         <view class="title flex-1">自定义分组B分排名</view>
         <image mode="scaleToFill" src="../../../image/right.png" class="img-right"></image>

+ 0 - 2
pages/statistics/integralEvent/integralEvent.acss

@@ -18,12 +18,10 @@
     text-overflow: ellipsis;
     display: -webkit-box;
     -webkit-line-clamp: 2;
-     font-size: 24rpx;
     -webkit-box-orient: vertical;
     padding: 10rpx 0; 
 }
 .main-right .date{
-   font-size: 24rpx;
    color: #909399;
    
 }

+ 6 - 7
pages/statistics/integralEvent/integralEvent.axml

@@ -1,10 +1,10 @@
 <view>
   <view class="flex-box flex-v-ce tab margin-bottom">
     <view class="flex-1" catchTap="selectDate">
-      <text class="{{showDate? 'activeView blue':''}}" >{{selectDateVal}}</text>
+      <text class="{{showDate? 'activeView blue':''}}">{{selectDateVal}}</text>
     </view>
     <view class="flex-1" catchTap="selectStaff">
-      <text class="{{showStaff? 'activeView blue':''}}" >{{staffVal}}</text>
+      <text class="{{showStaff? 'activeView blue':''}}">{{staffVal}}</text>
     </view>
     <view class="flex-1" catchTap="selectRule">
       <text class="{{showRuleTwo? 'activeView blue':''}}">{{ruleVal}}</text>
@@ -16,10 +16,9 @@
       </picker>
     </view>
   </view>
-
   <view class="main scroll">
     <scroll-view class="scroll" a:if="{{list.length>0}}" scroll-y="{{true}}" onScrollToLower="onScrollToLower">
-      <view class="flex-box li border-bottom"  a:for="{{list}}" catchTap="openDetail" data-item="{{item}}">
+      <view class="flex-box li border-bottom" a:for="{{list}}" catchTap="openDetail" data-item="{{item}}">
         <img-box name="{{item.employee_name}}" imgUrl="{{item.employee_img_url}}" height="80rpx" width="80rpx" fSize="24rpx"></img-box>
         <view class="flex-1 main-right">
           <view class="flex-box flex-v-ce">
@@ -33,11 +32,11 @@
           </view>
         </view>
       </view>
+      <view class="noDatas" a:if="{{isData}}">没有更多咯</view>
     </scroll-view>
     <no-data a:if="{{list.length==0}}"></no-data>
   </view>
-
-  <select-staff isShow="{{showStaff}}" a:if="{{showStaff==true}}" onClose="onClose" onConfirm="onConfirmStaff"></select-staff>
-  <select-date isShow="{{showDate}}" a:if="{{showDate==true}}" onClose="onClose" onConfirm="onConfirmDate"></select-date>
+  <select-staff defaultUser="{{employee_ids}}" isShow="{{showStaff}}" a:if="{{showStaff==true}}" onClose="onClose" onConfirm="onConfirmStaff"></select-staff>
+  <select-date defaultDate="{{defaultDate}}" isShow="{{showDate}}" a:if="{{showDate==true}}" onClose="onClose" onConfirm="onConfirmDate"></select-date>
   <select-rule-two isShow="{{showRuleTwo}}" a:if="{{showRuleTwo==true}}" onClose="onClose" onConfirm="onConfirmRule"></select-rule-two>
 </view>

+ 84 - 48
pages/statistics/integralEvent/integralEvent.js

@@ -1,6 +1,7 @@
 
 var app = getApp()
 var that;
+var typeArr=[];
 Page({
   data: {
     date: app.globalData.month,
@@ -20,37 +21,60 @@ Page({
     types: '',//积分分类
     typesIndex: '0',
 
-    showRuleTwo:false,
-    ruleVal:"规则分类",
+    showRuleTwo: false,
+    ruleVal: "规则分类",
+
+    page: 1,
 
-    page:1,
   },
-  onLoad() {
+  onLoad(e) {
     that = this;
-    var arr = app.globalData.types;
-    arr.unshift({ id: 0, name: '全部' });
-    this.setData({ types: arr })
+    typeArr=[{ id: 0, name: '全部' }];
+    var arr=typeArr.concat(app.globalData.types);
+    this.setData({types:arr})
+    var userData=app.globalData.userData;
     dd.setNavigationBar({ title: "积分事件" });
+    if (e.month) {
+      var typesIndex = "0";
+      if (e.type) {
+        arr.map((item, index) => {
+          if (item.code == e.type) {
+            typesIndex = index
+          }
+        })
+      }
+      this.setData({ 
+        date: e.month,
+        typesIndex: typesIndex,
+        employee_ids :[userData.id],
+        staffVal:userData.name,
+        selectDateVal:e.month==app.globalData.month? '本月':'月',
+        defaultDate:{type:'1',date:e.month},
+      })
+    }
     this.getData();
   },
-  getData(is){
+  getData(is) {
     var data = {
       page: that.data.page,
+      page_size: 20,
       rule_id: that.data.rule_id,
-      pt_id:that.data.types[that.data.typesIndex].id,
-      employee_ids:that.data.employee_ids
+      pt_id: that.data.types[that.data.typesIndex].id,
+      employee_ids: that.data.employee_ids
     }
     if (that.data.date_type == 2) {
-      data.start_date = that.data.dateObj[0];
-      data.end_date = that.data.dateObj[1];
+      data.start_day = that.data.dateObj[0];
+      data.end_day = that.data.dateObj[1];
     } else {
-      data.month_date = that.data.dateObj || that.data.date;
+      data.month = that.data.dateObj || that.data.date;
     }
     app.$get('api/integral/statistics/integral', data).then((res) => {
       var data = res.data.data.list;
       if (is) {
         if (data.length == 0) {
-          app.globalData.showToast("已无更多咯");
+          this.setData({
+            isData: true
+          })
           return;
         }
         var list = that.data.list;
@@ -58,22 +82,28 @@ Page({
           list: list.concat(data)
         })
       } else {
+        this.setData({ list: [] });
         this.setData({
-          list: data
+          list: data,
+          isData: false
         })
       }
     })
   },
-    //上啦加载
+  //上啦加载
   onScrollToLower() {
-    this.setData({ page: ++that.data.page })
-    this.getData(true);
+    if (!that.data.isData) {
+      this.setData({ page: ++that.data.page })
+      this.getData(true);
+    } else {
+      app.globalData.showToast("已无更多咯");
+    }
   },
   //打开兴趣
-  openDetail(e){
-   var item=e.target.dataset.item;
+  openDetail(e) {
+    var item = e.target.dataset.item;
     dd.navigateTo({
-      url: '../prizeBuckleDetail/prizeBuckleDetail?id='+item.id
+      url: '../prizeBuckleDetail/prizeBuckleDetail?id=' + item.id
     })
   },
   //显示规则组件
@@ -96,13 +126,14 @@ Page({
   },
   //选择时间
   onConfirmDate(data) {
-      that.setData({
-        dateObj: data.date,
-        date_type: data.type == 1 ? 3 : data.type,
-        page: 1,
-        selectDateVal:data.type == 1 ? '月' : '日',
-      })
-      this.getData();
+    that.setData({
+      defaultDate:data,
+      dateObj: data.date,
+      date_type: data.type == 1 ? 3 : data.type,
+      page: 1,
+      selectDateVal: data.type == 1 ? (data.date==that.data.date? '本月':'月') : '日',
+    })
+    this.getData();
   },
   //关闭弹窗
   onClose() {
@@ -116,39 +147,44 @@ Page({
   bingIntegralType(e) {
     this.setData({
       typesIndex: e.detail.value,
-      page:1
+      page: 1
     });
-     this.getData();
+    this.getData();
   },
   //选择员工
   onConfirmStaff(data) {
-    console.log(data);
-    if(!data){
-      this.setData({staffVal:'员工',employee_ids:'',page:1})
+    if (!data) {
+      this.setData({ staffVal: '员工', employee_ids: '', page: 1 })
       this.getData();
       return false;
     }
-    if(data.length>1){
-      var str="";
-      var arr=[];
-      data.forEach((item)=>{
-          str+=item.name+','
+    if(data.length>0){
+      if (data.length >1 ) {
+        var str = "";
+        var arr = [];
+        data.forEach((item) => {
+          str += item.name + ','
           arr.push(item.id);
-      })
-      var employee_ids= arr.join(',');
-      this.setData({staffVal:str.substring(0, str.length - 1),employee_ids:employee_ids,page:1})
+        })
+        // var employee_ids = arr.join(',');
+        this.setData({ staffVal: str.substring(0, str.length - 1), employee_ids:JSON.stringify(arr), page: 1 })
+      } else {
+        this.setData({ staffVal: data[0].name, employee_ids: [data[0].id], page: 1 })
+      }
     }else{
-      this.setData({staffVal: data[0].name,employee_ids:[data[0].id],page:1})
+       this.setData({ staffVal: '员工', employee_ids: [], page: 1 })
     }
-     this.getData();
+
+
+    this.getData();
   },
   //选择规则
-  onConfirmRule(e){
-    var data=e.join(',');
+  onConfirmRule(e) {
+    var data = e.join(',');
     this.setData({
-      rule_id:data?data:'',
-      page:1
+      rule_id: data ? data : '',
+      page: 1
     })
-     this.getData();
+    this.getData();
   },
 });

+ 4 - 4
pages/statistics/my_PrizeBuckle/my_PrizeBuckle.acss

@@ -20,7 +20,7 @@
 .selectItems .flex-1{
     padding: 16rpx 0;
     text-align: center;
-    font-size: 24rpx;
+    font-size: 28rpx;
     position: relative;
 }
 .selectItems .active::before{
@@ -52,12 +52,12 @@
     text-overflow: ellipsis;
     display: -webkit-box;
     -webkit-line-clamp: 2;
-     font-size: 24rpx;
+     /* font-size: 24rpx; */
     -webkit-box-orient: vertical;
     padding: 10rpx 0; 
 }
 .main-right .date{
-   font-size: 24rpx;
+   /* font-size: 24rpx; */
    color: #909399;
    
 }
@@ -73,7 +73,7 @@
   border-radius: 6rpx;
   background:rgba(245, 108, 108, 0.1);
   color: #F56C6C;
-  font-size: 20rpx;
+  font-size: 24rpx;
   padding: 0 6rpx;
 }
 .scroll {

+ 3 - 0
pages/statistics/my_PrizeBuckle/my_PrizeBuckle.axml

@@ -28,6 +28,7 @@
           </view>
         </view>
       </view>
+      <view class="noDatas" a:if="{{isData}}">没有更多咯</view>
     </scroll-view>
     <scroll-view class="scroll" a:if="{{activeIndex==2&&list.length>0}}" scroll-y="{{true}}" onScrollToLower="onScrollToLower">
       <view class="flex-box li border-bottom" data-index="2" a:for="{{list}}" catchTap="openDetail" data-item="{{item}}">
@@ -45,6 +46,7 @@
           </view>
         </view>
       </view>
+      <view class="noDatas" a:if="{{isData}}">没有更多咯</view>
     </scroll-view>
     <scroll-view class="scroll" a:if="{{activeIndex==3&&list.length>0}}" scroll-y="{{true}}" onScrollToLower="onScrollToLower">
       <view class="flex-box li border-bottom" data-index="2" a:for="{{list}}" catchTap="openDetail" data-item="{{item}}">
@@ -62,6 +64,7 @@
           </view>
         </view>
       </view>
+      <view class="noDatas" a:if="{{isData}}">没有更多咯</view>
     </scroll-view>
     <no-data a:if="{{list.length==0}}"></no-data>
   </view>

+ 16 - 8
pages/statistics/my_PrizeBuckle/my_PrizeBuckle.js

@@ -25,13 +25,15 @@ Page({
     if (index == 1) {
       data = {
         page: that.data.page,
-        recorder_id: 616,//app.globalData.userData.id
+        page_size:20,
+        recorder_id: app.globalData.userData.id,
         source_type: 1,
         keyword: that.data.keyword
       }
     } else if (index == 2) {
       data = {
         page: that.data.page,
+                page_size:20,
         type: 'waiting',
         pt_id: 0,
         keyword: that.data.keyword
@@ -39,6 +41,7 @@ Page({
     } else {
       data = {
         page: that.data.page,
+                page_size:20,
         type: 'refuse',
         pt_id: 0,
         keyword: that.data.keyword
@@ -48,9 +51,9 @@ Page({
       var data = res.data.data.list;
       if (is) {
         if (data.length == 0) {
-          setTimeout(() => {
-          app.globalData.showToast("已无更多咯");
-          }, 1000);
+          this.setData({
+            isData: true
+          })
           return;
         }
         var list = that.data.list;
@@ -58,8 +61,10 @@ Page({
           list: list.concat(data)
         })
       } else {
+        this.setData({list:[]});
         this.setData({
-          list: data
+          list: data,
+          isData: false
         })
       }
     })
@@ -84,8 +89,11 @@ Page({
   },
   //上啦加载
   onScrollToLower() {
-
-    this.setData({ page: ++that.data.page })
-    this.getData(that.data.activeIndex, true);
+    if(!that.data.isData){
+      this.setData({ page: ++that.data.page })
+      this.getData(that.data.activeIndex, true);
+    }else{
+       app.globalData.showToast("已无更多咯");
+    }
   },
 });

+ 0 - 7
pages/statistics/my_apply/my_apply.acss

@@ -5,10 +5,6 @@
     margin: 0 auto;
     padding:6rpx 10rpx;
 }
-.search input{
-    background-color: #f1f1f1;
-    font-size: 26rpx;
-}
 .search image{
   width: 30rpx;
   height: 30rpx;
@@ -35,7 +31,6 @@
 .selectItems .flex-1{
     padding: 20rpx 0;
     text-align: center;
-    font-size: 24rpx;
     position: relative;
 }
 .selectItems .active::before{
@@ -64,12 +59,10 @@
     text-overflow: ellipsis;
     display: -webkit-box;
     -webkit-line-clamp: 2;
-     font-size: 24rpx;
     -webkit-box-orient: vertical;
     padding: 10rpx 0; 
 }
 .main-right .date{
-   font-size: 24rpx;
    color: #909399;
    
 }

+ 4 - 3
pages/statistics/my_apply/my_apply.axml

@@ -12,11 +12,11 @@
     </view>
   </view>
   <view class="main scroll">
-    <scroll-view class="scroll" a:if="{{list.length>0}}" scroll-y="{{true}}">
-      <view class="flex-box li border-bottom" catchTap="openDetail"  a:for="{{list}}" data-item="{{item}}">
+    <scroll-view class="scroll" a:if="{{list.length>0}}" scroll-y="{{true}}" onScrollToLower="onScrollToLower">
+      <view class="flex-box li border-bottom" catchTap="openDetail" a:for="{{list}}" data-item="{{item}}">
         <view class="flex-1 main-right">
           <view class="flex-box">
-            <view class="name flex-1">{{item.remark.customize || item.remark.rule}}</view>
+            <view class="name flex-1" style="margin-right: 10rpx;">{{item.remark.customize || item.remark.rule}}</view>
             <view class="red" a:if="{{item.review_point > 0}}">+{{item.review_point}}</view>
             <view class="green" a:else>{{item.review_point}}</view>
           </view>
@@ -28,6 +28,7 @@
           </view>
         </view>
       </view>
+      <view class="noDatas" a:if="{{isData}}">没有更多咯</view>
     </scroll-view>
     <no-data a:if="{{list.length==0}}"></no-data>
   </view>

+ 18 - 10
pages/statistics/my_apply/my_apply.js

@@ -4,7 +4,7 @@ var that;
 Page({
   data: {
     activeIndex: 1,
-    page:1
+    page: 1
   },
   onLoad() {
     that = this;
@@ -23,7 +23,7 @@ Page({
     var data = {
       page: that.data.page,
       pt_id: 0,
-      page_size: 30,
+      page_size: 20,
       type: '',
       keyword: that.data.keyword
     }
@@ -40,16 +40,20 @@ Page({
       var data = res.data.data.list;
       if (is) {
         if (data.length == 0) {
-          app.globalData.showToast("已无更多咯");
-          return;
+          this.setData({
+            isData: true
+          })
+           return;
         }
         var list = that.data.list;
         this.setData({
           list: list.concat(data)
         })
       } else {
+        this.setData({ list: [] });
         this.setData({
-          list: data
+          list: data,
+          isData: false
         })
       }
     })
@@ -61,13 +65,17 @@ Page({
   },
   openDetail(e) {
     var id = e.target.dataset.item.id;
-      dd.navigateTo({
-        url: '../../workbench/approveDetail/approveDetail?id='+id+'&is='+true
-      })
+    dd.navigateTo({
+      url: '../../workbench/approveDetail/approveDetail?id=' + id + '&is=' + true
+    })
   },
   //上啦加载
   onScrollToLower() {
-    this.setData({ page: ++that.data.page })
-    this.getData(true);
+    if (!that.data.isData) {
+      this.setData({ page: ++that.data.page })
+      this.getData(true);
+    } else {
+      app.globalData.showToast("已无更多咯");
+    }
   },
 });

+ 2 - 4
pages/statistics/prizeBuckleDetail/prizeBuckleDetail.acss

@@ -28,7 +28,6 @@
   font-weight: 600;
 }
 .mian-title text{
-  font-size: 24rpx;
   color: #909399;
   font-weight: 500;
   position: relative;
@@ -92,12 +91,11 @@
 }
 .name{
   margin: 16rpx 0;
-  font-size: 26rpx;
   font-weight: 600;
 }
 .imgs{
-  width: 80rpx;
-  height: 80rpx;
+  width: 120rpx;
+  height: 120rpx;
   margin-right: 10rpx;
   margin-bottom: 10rpx;
 }

+ 7 - 7
pages/statistics/prizeBuckleDetail/prizeBuckleDetail.axml

@@ -1,7 +1,7 @@
 <view>
   <view class="header margin-bottom">
     <view class="header-top flex-box-v flex-center-center border-bottom">
-      <img-box name="{{dataDetail.employee_name}}" imgUrl="{{dataDetail.img_url}}" height="90rpx" width="90rpx" fSize="28rpx"></img-box>
+      <img-box a:if="{{dataDetail.employee_name}}" name="{{dataDetail.employee_name}}" imgUrl="{{dataDetail.img_url}}" height="90rpx" width="90rpx" fSize="24rpx"></img-box>
       <view class="name">{{dataDetail.employee_name}}</view>
       <view class="num red" a:if="{{dataDetail.point>0}}">+{{dataDetail.point}}
         <text>{{dataDetail.typeName}}</text></view>
@@ -9,7 +9,7 @@
         <text>{{dataDetail.typeName}}</text></view>
     </view>
     <view class="header-main">
-      <view class="flex-box flex-v-ce" a:if="{{dataDetail.remark!=null}}">
+      <view class="flex-box" a:if="{{dataDetail.remark!=null}}">
         <view class="laber">事件内容</view>
         <view class="flex-1">{{dataDetail.remark.customize || dataDetail.remark.rule}}</view>
       </view>
@@ -25,11 +25,11 @@
         <view class="laber">时间</view>
         <view class="flex-1">{{dataDetail.date }}</view>
       </view>
-      <view class="flex-box" a:if="{{dataDetail.files.lenght>0}}">
+      <view class="flex-box" a:if="{{dataDetail.files.length>0}}">
         <view class="laber">图片</view>
         <view class="flex-1 flex-box flex-d-wrap">
-          <block a:for="{{dataDetail.files}}" a:for-item="imgs">
-             <image class="imgs" mode="scaleToFill" src="{{imgs}}"/>
+          <block a:for="{{dataDetail.files}}" a:for-item="imgs"  a:for-index="idx">
+            <image class="imgs" catchTap="showImg" mode="scaleToFill" src="{{imgs}}" data-index="{{idx}}" data-item="{{dataDetail.files}}"/>
           </block>
         </view>
       </view>
@@ -48,7 +48,7 @@
         <view class="laber">规则分类</view>
         <view class="flex-1">{{dataDetail.rule_list }}</view>
       </view>
-      <view class="flex-box flex-v-ce" a:if="{{dataDetail.remark&&dataDetail.remark.rule}}">
+      <view class="flex-box" a:if="{{dataDetail.remark&&dataDetail.remark.rule}}">
         <view class="laber">积分规则</view>
         <view class="flex-1">{{dataDetail.remark.rule}}</view>
       </view>
@@ -61,7 +61,7 @@
         </view>
       </view>
     </view>
-        <!-- 调用过程组件 -->
+    <!-- 调用过程组件 -->
     <process process="{{dataDetail.process}}" a:if="{{dataDetail.process.length>0}}"/>
   </view>
 </view>

+ 9 - 1
pages/statistics/prizeBuckleDetail/prizeBuckleDetail.js

@@ -7,13 +7,21 @@ Page({
 
   },
   onLoad(e) {
-    console.log(e);
     that = this;
+    console.log(e);
     dd.setNavigationBar({ title: "事件详情" });
     if(e.id){
         that.getDetail(e.id);
     }
   },
+  showImg(e){
+      var index=e.target.dataset.index;
+      var item=e.target.dataset.item
+      dd.previewImage({
+        current: index,
+        urls: item
+      });
+  },
   activeItem(e) {
     var index = e.target.dataset.index;
     this.setData({ activeIndex: index })

+ 1 - 1
pages/statistics/prizeBuckleDetail/prizeBuckleDetail.json

@@ -1,6 +1,6 @@
 {
   "usingComponents": {
     "img-box": "/Component/img-box/index",
-        "process": "/Component/process/process"
+    "process": "/Component/process/process"
   }
 }

+ 4 - 3
pages/statistics/sectionRanking/sectionRanking.axml

@@ -33,11 +33,12 @@
         </view>
         <view class="blue" style="margin-right:28rpx;">{{item.point}}</view>
       </view>
+              <view class="noDatas" a:if="{{isData}}">没有更多咯</view>
     </scroll-view>
     <no-data a:if="{{list.length==0}}"></no-data>
   </view>
-  <select-section a:if="{{showTissue==true}}" isShow="{{showTissue}}" onClose="onClose" onConfirm="onConfirmTissue"></select-section>
-  <select-sx a:if="{{showSx==true}}" isShow="{{showSx}}" onClose="onClose" onConfirm="onConfirmSx"></select-sx>
-  <select-date a:if="{{showDate==true}}" isShow="{{showDate}}" onClose="onClose" onConfirm="onConfirmDate"></select-date>
+  <select-section defaultSection="{{dept_id}}" a:if="{{showTissue==true}}" isShow="{{showTissue}}" onClose="onClose" onConfirm="onConfirmTissue"></select-section>
+  <select-sx defaultSx="{{sxObj}}" a:if="{{showSx==true}}" isShow="{{showSx}}" onClose="onClose" onConfirm="onConfirmSx"></select-sx>
+  <select-date dateObj="{{dateObj}}" a:if="{{showDate==true}}" isShow="{{showDate}}" onClose="onClose" onConfirm="onConfirmDate"></select-date>
   <select-rule-two a:if="{{showRuleTwo==true}}" isShow="{{showRuleTwo}}" onClose="onClose" onConfirm="onConfirmRule"></select-rule-two>
 </view>

+ 26 - 14
pages/statistics/sectionRanking/sectionRanking.js

@@ -39,7 +39,7 @@ Page({
       pt_id:app.getTypesItem('BF').id,
       dept_id:that.data.dept_id,
       page: that.data.page,
-      // rule_id: that.data.rule_id,
+      rule_id: that.data.rule_id,
       // month:that.data.month,
       // quarter:that.data.quarter,
       sort:that.data.sort,
@@ -57,7 +57,9 @@ Page({
       var data = res.data.data.list;
       if (is) {
         if (data.length == 0) {
-          app.globalData.showToast("已无更多咯");
+          this.setData({
+            isData: true
+          })
           return;
         }
         var list = that.data.list;
@@ -65,24 +67,31 @@ Page({
           list: list.concat(data)
         })
       } else {
+                this.setData({list:[]});
         this.setData({
-          list: data
+          list: data,
+          isData: false
         })
       }
     })
   },
   //上啦加载
   onScrollToLower() {
-    this.setData({ page: ++that.data.page })
-    this.getData(true);
-  },
-  //打开兴趣
-  openDetail(e) {
-    var item = e.target.dataset.item;
-    dd.navigateTo({
-      url: '../prizeBuckleDetail/prizeBuckleDetail?item=' + item
-    })
+    if(!that.data.isData){
+      this.setData({ page: ++that.data.page })
+      this.getData(true);
+    }else{
+       app.globalData.showToast("已无更多咯");
+    }
   },
+  // //打开兴趣
+  // openDetail(e) {
+  //   var item = e.target.dataset.item;
+  //   console.log(item)
+  //   dd.navigateTo({
+  //     url: '../prizeBuckleDetail/prizeBuckleDetail?id=' + item.employee_id
+  //   })
+  // },
   //显示规则组件
   selectRule() {
     this.setData({
@@ -103,6 +112,9 @@ Page({
   },
   //选择时间
   onConfirmDate(data) {
+    this.setData({
+        dateObj: data,
+    })
     if (data.type == '1') {
       this.setData({
         selectDateVal:data.date,
@@ -136,12 +148,12 @@ Page({
   },
   //选择筛选
   onConfirmSx(data) {
-   this.setData({ sort:data[1],position:data[0],page:1})
+   this.setData({sxObj:data, sort:data[1],position:data[0],page:1})
    this.getData();
   },
   //选择规则
   onConfirmRule(data) {
-    this.setData({ rule_id:data.join(','),page:1})
+    this.setData({rule_id:data.join(','),page:1})
     this.getData();
   },
   //显示部门选择组件

+ 11 - 11
pages/workbench/apply/apply.axml

@@ -12,7 +12,7 @@
           <switch onChange="switchChange" checked="{{item.checked}}" data-index="{{index}}" color="#26A2FF"></switch>
         </view>
         <view class="flex-box flex-v-ce li" a:if="{{item.checked}}" data-index="{{index}}" data-num="1" catchTap="openSelect">
-          <view class="label">选择规则</view>
+          <view class="label isBt">选择规则</view>
           <view class="flex-1" a:if="{{item.selectRule}}">已选择1条</view>
           <view class="flex-1" a:else></view>
           <image mode="scaleToFill" src="../../../image/right.png" class="rightImg"/>
@@ -36,34 +36,34 @@
           </view>
         </view>
         <view class="li">
-          <textarea value="{{item.remark}}" onBlur="bindTextAreaBlur" placeholder="申请内容" data-index="{{index}}"></textarea>
+          <textarea value="{{item.remark}}" maxlength="100" onInput="bindTextAreaBlur" placeholder="申请内容" data-index="{{index}}"></textarea>
           <image mode="scaleToFill" src="../../../image/addImg.png" data-index="{{index}}" class="addImg" catchTap="openImg"/>
+        </view>
+        <view style="background:#fff;padding:0 28rpx;" a:if="{{item.files[0]}}" class="flex-box flex-v-ce">
+          <view a:for="{{item.files}}" key="index" a:for-item="imgs" a:for-index="imgIndex" style="position:relative">
+            <text class="detele" data-itemIndx="{{index}}" data-index="{{imgIndex}}" catchTap="deteleImg">×</text>
+            <image mode="scaleToFill" class="showImg" src="{{imgs}}"/>
+          </view>
         </view>
          <view class="flex-box flex-v-ce li" catchTap="openDate" data-index="{{index}}">
           <view class="label isBt">发生时间</view>
           <view class="flex-1">{{item.event_time}}</view>
           <image mode="scaleToFill" src="../../../image/right.png" class="rightImg"/>
         </view>
-        <view class="flex-box flex-v-ce li" data-index="{{index}}" data-num="2" catchTap="openSelect">
+        <view class="flex-box flex-v-ce li" data-index="{{index}}" data-num="2" data-item="{{{id:item.reviewer_id,name:item.revieweName}}}" catchTap="openSelect">
           <view class="label isBt">审批人</view>
           <view class="flex-1">{{item.revieweName}}</view>
           <image mode="scaleToFill" src="../../../image/right.png" class="rightImg"/>
         </view>
-        <view style="background:#fff;padding:0 28rpx;" a:if="{{item.files[0]}}" class="flex-box flex-v-ce">
-          <view a:for="{{item.files}}" key="index" a:for-item="imgs" a:for-index="imgIndex" style="position:relative">
-            <text class="detele" data-itemIndx="{{index}}" data-index="{{imgIndex}}" catchTap="deteleImg">×</text>
-            <image mode="scaleToFill" class="showImg" src="{{imgs}}"/>
-          </view>
-        </view>
       </view>
     </view>
     <view class="add" catchTap="addArr">+  再加一条</view>
     <view class="btn-area">
-      <view class="defBtn" catchTap="formSubmit">提交</view> 
+      <button type="default" loading="{{disabled}}" class="defBtn" disabled="{{disabled}}" catchTap="formSubmit">提交</button>
     </view>
   </form>
   <view class="box" animation="{{animationInfo}}">
         <select-rule onConfirm="onSelectItem" onClose="onClose" a:if="{{isShowType=='1'}}"/>
-        <select-section-staff-two onClose="onClose" onConfirm="onSelectUser" a:if="{{isShowType=='2'}}"/>
+        <select-section-staff-two onClose="onClose" selectUser="{{reviewerObj}}" onConfirm="onSelectUser" a:if="{{isShowType=='2'}}"/>
   </view>
 </view>

+ 49 - 13
pages/workbench/apply/apply.js

@@ -19,10 +19,24 @@ Page({
     isShowType: true,//是显示选择规则还是显示选择分类
     activeIndex: '',
     isArr: ['奖', '扣'],
+    reviewerObj:[],
+    disabled:false,
   },
   onLoad() {
     that = this;
     dd.setNavigationBar({ title: "申请积分" });
+    this.setData({
+        items: [{//录入选项列表
+        checked: true,//判断是否开启指定规则
+        rule_id: '',//积分分类id
+        item_id: '',//积分细则id 不选可以为0
+        remark: '',//备注
+        event_time: app.globalData.day,//事件时间
+        reviewer_id: app.globalData.userData.employee_detail.superior_list[0].id,//审核人ID
+        revieweName: app.globalData.userData.employee_detail.superior_list[0].name,//审批人姓名(非传)
+        files: '',//附件数组列表
+      }],
+    })
   },
   onShow() {
     animation = dd.createAnimation({
@@ -36,9 +50,15 @@ Page({
     that.setData({
       animationInfo: animation.export()
     });
+    that.setData({
+      isShowType:''
+    });
   },
   //选择规则
   openSelect(e) {
+    if(e.target.dataset.item){
+       that.setData({ reviewerObj: [e.target.dataset.item] });
+    }
     that.setData({ activeIndex: '' });
     that.setData({
       isShowType: e.target.dataset.num,
@@ -64,8 +84,8 @@ Page({
   openImg(e) {
     var index = e.target.dataset.index;
     var files = that.data.items[index].files;
-    if (files.length >= 1) {
-      app.globalData.showToast("最多能选择一张!");
+    if (files.length >= 3) {
+      app.globalData.showToast("最多能选择三张");
       return false;
     }
     dd.chooseImage({
@@ -77,7 +97,7 @@ Page({
   },
   postImg(data, index) {
     var files_box = `items[${index}].files`;
-    dd.showLoading();
+    var files = that.data.items[index].files;
     dd.httpRequest({
       url: app.globalData.imgHttpUrl,
       method: 'POST',
@@ -102,10 +122,15 @@ Page({
           },
           success: (res) => {
             if (res.statusCode == 200) {
+              if(files.length>0){
+                files.push('http://cdn.intesys.g107.com/' + key)
+              }else{
+                files=['http://cdn.intesys.g107.com/' + key];
+              }
               that.setData({
-                [files_box]: ['http://cdn.intesys.g107.com/' + key]
+                [files_box]: files
               });
-              dd.hideLoading();
+             app.globalData.showToast("已上传");
             }
           },
         });
@@ -140,7 +165,6 @@ Page({
     var items = this.data.items;
     var arr = [];
     var isTg = true;
-    console.log(items);
     for (var i = 0; i < items.length; i++) {
       var obj = {};
       var item = items[i];
@@ -157,6 +181,13 @@ Page({
         obj.rule_id = 0;
         obj.item_id = 0;
       }
+      if(item.checked){
+          if(!obj.rule_id){
+              app.globalData.showToast(`第${i + 1}项必须选择规则`);
+              isTg = false;
+              break;
+          }
+      }
       obj.remark = item.remark;
       obj.event_time = item.event_time;
       obj.reviewer_id = item.reviewer_id;
@@ -167,22 +198,27 @@ Page({
       var data = {
         items: JSON.stringify(arr)
       }
+      this.setData({disabled:true});
       app.$post("api/integral/review/apply", data).then((res) => {
         var is = true;
         res.data.data.list.forEach(item => {
-          if (item.status == 0) {
+        if (item.status == 0) {
             is = false;
+            this.setData({disabled:false});
             app.globalData.showToast(item.msg);
           }
         });
         if (is) {
           app.globalData.showToast('已提交');
           setTimeout(() => {
+            this.setData({disabled:false});
             dd.navigateBack({
               delta: 1
             })
           }, 1000);
         }
+      }).catch(err=>{
+        this.setData({disabled:false});
       })
     }
   },
@@ -197,13 +233,14 @@ Page({
     console.log(that.data.items);
   },
   //选择人
-  onSelectUser(item) {
+   onSelectUser(item) {
+    var elm=item.length>0? item[0]:{id:'',name:''};
     var index = this.data.activeIndex;
     var reviewer_id = `items[${index}].reviewer_id`
     var revieweName = `items[${index}].revieweName`
     that.setData({
-      [reviewer_id]: item[0].id,
-      [revieweName]: item[0].name,
+      [reviewer_id]: elm.id,
+      [revieweName]: elm.name,
     });
   },
   //添加一条
@@ -214,8 +251,8 @@ Page({
       item_id: '',//积分细则id 不选可以为0
       remark: '',//备注
       event_time: app.globalData.day,//事件时间
-      reviewer_id: '',//审核人ID
-      revieweName: '',//审批人姓名(非传)
+      reviewer_id: app.globalData.userData.employee_detail.superior_list[0].id,//审核人ID
+      revieweName: app.globalData.userData.employee_detail.superior_list[0].name,//审批人姓名(非传)
       files: '',//附件数组列表
     };
     var list = that.data.items
@@ -247,7 +284,6 @@ Page({
   },
   //选择规则
   onSelectItem(item) {
-    console.log(item);
     var index = this.data.activeIndex;
     var selectRule = `items[${index}].selectRule`
     var remark = `items[${index}].remark`

+ 35 - 64
pages/workbench/approve/approve.axml

@@ -15,7 +15,7 @@
         </view>
         <view class="selectRule margin-bottom">
           <view class="flex-box flex-v-ce">
-            <view a:if="{{item.selectRule.range_type=='1'}}">
+            <view a:if="{{item.selectRule.range_type==1&&item.selectRule.min_point==item.selectRule.max_point}}">
               <text class="red" a:if="{{item.selectRule.min_point>0}}">+{{item.selectRule.min_point}}</text>
               <text class="green" a:else>{{item.selectRule.min_point}}</text>
             </view>
@@ -38,20 +38,21 @@
           <text class="green" a:else style="position: relative;top:8rpx;">-</text>
           <view class="flex-1">
             <view class="flex-box flex-v-ce">
-              <view a:if="{{item.selectRule.range_type==1}}" style="padding-left:10rpx; height:60rpx;line-height:60rpx;" class="flex-1">{{item.point}}</view>
-              <input a:else value="{{item.point}}" name="{{index}}" disabled="disabled" placeholder="0" type="number" onInput="bindKeyInput" data-index="{{index}}" class="flex-1"/>
-              <view class="picker-box" data-index="{{index}}" a:if="{{item.selectRule.range_type!=1}}">
+              <view a:if="{{item.selectRule.range_type==1&&item.selectRule.min_point==item.selectRule.max_point}}" style="padding-left:10rpx; height:60rpx;line-height:60rpx;" class="flex-1">{{item.point}}</view>
+              <input a:else value="{{item.point}}"  placeholder="0" type="number" onInput="bindKeyInput"  class="flex-1"/>
+              <view class="picker-box"  catchTap="bindPickerChange" a:if="{{item.selectRule.range_type!=1}}">
                 <view class="{{item.isArrindex==true ? 'picker-right':'picker-left'}} yuan"></view>
                 <view class="flex-box flex-v-ce" class="picker">
                   <text class="red flex-1">奖</text>
                   <text class="green flex-1">扣</text>
                 </view>
               </view>
+
             </view>
             <block a:if="{{item.selectRule}}">
-              <view class="fontColorT input_text" a:if="{{item.selectRule.range_type==1}}">固定:{{item.selectRule.min_point}} {{item.selectRule.pt_Obj[0].name}}</view>
+              <view class="fontColorT input_text" a:if="{{item.selectRule.range_type==1}}">固定:{{item.selectRule.min_point}} {{item.selectRule.pt_Obj.name}}</view>
               <view class="fontColorT input_text" a:else> 范围(可修改):{{item.selectRule.min_point}}至{{item.selectRule.max_point}}
-                <text>{{item.selectRule.pt_Obj[0].name}}</text></view>
+                <text>{{item.selectRule.pt_Obj.name}}</text></view>
             </block>
           </view>
         </view>
@@ -63,30 +64,6 @@
           <view class="flex-1"></view>
           <view class="fontColorF">{{item.rule_name}}</view>
         </view>
-        <!-- <view class="flex-box flex-v-ce li" data-num="1" catchTap="openSelect">
-          <view class="label">选择规则</view>
-          <view class="flex-1" a:if="{{item.selectRule}}">已选择1条</view>
-          <view class="flex-1" a:else></view>
-          <image mode="scaleToFill" src="../../../image/right.png" class="rightImg"/>
-        </view> -->
-        <!-- <view class="selectRule margin-bottom" a:if="{{item.selectRule}}">
-          <view class="flex-box flex-v-ce">
-            <view a:if="{{item.selectRule.range_type=='1'}}">
-              <text class="red" a:if="{{item.selectRule.min_point>0}}">+{{item.selectRule.min_point}}</text>
-              <text class="green" a:else>{{item.selectRule.min_point}}</text>
-            </view>
-            <view class="green" a:else>
-              <text class="red" a:if="{{item.selectRule.min_point>0}}"> +{{item.selectRule.min_point}}~{{item.selectRule.max_point}}</text>
-              <text class="green" a:else>{{item.selectRule.min_point}} ~ {{item.selectRule.max_point}}</text>
-            </view>
-            <view class="fontColorF" style="margin-left:10rpx;">
-                 {{item.selectRule.pt_Obj.name}}
-            </view>
-          </view>
-          <view style="font-size:24rpx;margin-left:10rpx;" class="fontColorF">
-            {{item.selectRule.remark}}
-          </view>
-        </view> -->
         <view class="margin-bottom"></view>
         <view class="flex-box li margin-bottom" style="padding:15rpx 28rpx;">
           <view class="label isBt" style="position: relative;top:8rpx;">积分</view>
@@ -94,24 +71,16 @@
           <text class="green" a:else style="position: relative;top:8rpx;">-</text>
           <view class="flex-1">
             <view class="flex-box flex-v-ce">
-              <!-- <block a:if="{{item.selectRule}}"> -->
-              <!-- <view a:if="{{item.selectRule.range_type==1}}" style="padding-left:10rpx; height:60rpx;line-height:60rpx;" class="flex-1">{{item.point}}</view> -->
-              <input  value="{{item.point}}" name="{{index}}" placeholder="0" type="number" onInput="bindKeyInput" data-index="{{index}}" class="flex-1"/>
-              <!-- </block> -->
-              <!-- <view  style="padding-left:10rpx; height:60rpx;line-height:60rpx;" class="flex-1">{{item.point}}</view> -->
-              <view class="picker-box" data-index="{{index}}" catchTap="bindPickerChange">
+              <view  style="padding-left:10rpx; height:60rpx;line-height:60rpx;" class="flex-1">{{item.point}}</view>
+              <!-- <input  value="{{item.point}}"  placeholder="0" type="number" onInput="bindKeyInput" class="flex-1"/>
+              <view class="picker-box"  catchTap="bindPickerChange">
                 <view class="{{item.isArrindex==true ? 'picker-right':'picker-left'}} yuan"></view>
                 <view class="flex-box flex-v-ce" class="picker">
                   <text class="red flex-1">奖</text>
                   <text class="green flex-1">扣</text>
                 </view>
-              </view>
+              </view> -->
             </view>
-            <!-- <block a:if="{{item.selectRule}}">
-              <view class="fontColorT input_text" a:if="{{item.selectRule.range_type==1}}">固定:{{item.selectRule.min_point}} {{item.selectRule.pt_Obj[0].name}}</view>
-              <view class="fontColorT input_text" a:else> 范围(可修改):{{item.selectRule.min_point}}至{{item.selectRule.max_point}}
-                <text>{{item.selectRule.pt_Obj[0].name}}</text></view>
-            </block> -->
           </view>
         </view>
       </block>
@@ -122,15 +91,15 @@
           <view class="flex-1"></view>
           <view class="fontColorF">{{item.rule_name}}</view>
         </view>
-        <view class="flex-box flex-v-ce li" data-num="1" catchTap="openSelect">
+        <!-- <view class="flex-box flex-v-ce li" data-num="1" catchTap="openSelect">
           <view class="label">选择规则</view>
           <view class="flex-1" a:if="{{item.selectRule}}">已选择1条</view>
           <view class="flex-1" a:else></view>
           <image mode="scaleToFill" src="../../../image/right.png" class="rightImg"/>
-        </view>
-        <view class="selectRule margin-bottom" a:if="{{item.selectRule}}">
+        </view> -->
+        <!-- <view class="selectRule margin-bottom" a:if="{{item.selectRule}}">
           <view class="flex-box flex-v-ce">
-            <view a:if="{{item.selectRule.range_type=='1'}}">
+            <view a:if="{{item.selectRule.range_type==1&&item.selectRule.min_point==item.selectRule.max_point}}">
               <text class="red" a:if="{{item.selectRule.min_point>0}}">+{{item.selectRule.min_point}}</text>
               <text class="green" a:else>{{item.selectRule.min_point}}</text>
             </view>
@@ -145,17 +114,17 @@
           <view style="font-size:24rpx;margin-left:10rpx;" class="fontColorF">
             {{item.selectRule.remark}}
           </view>
-        </view>
-        <view class="margin-bottom"></view>
+        </view> -->
+        <!-- <view class="margin-bottom"></view> -->
         <view class="flex-box li margin-bottom" style="padding:15rpx 28rpx;">
           <view class="label isBt" style="position: relative;top:8rpx;">积分</view>
           <text class="red" style="position: relative;top:8rpx;" a:if="{{item.isArrindex==true}}">+</text>
           <text class="green" a:else style="position: relative;top:8rpx;">-</text>
           <view class="flex-1">
             <view class="flex-box flex-v-ce">
-              <view a:if="{{item.selectRule.range_type==1}}" style="padding-left:10rpx; height:60rpx;line-height:60rpx;" class="flex-1">{{item.point}}</view>
-              <input a:else value="{{item.point}}" name="{{index}}" placeholder="0" type="number" onInput="bindKeyInput" data-index="{{index}}" class="flex-1"/>
-              <view class="picker-box" data-index="{{index}}" catchTap="bindPickerChange" a:if="{{item.selectRule.range_type!=1}}">
+              <view a:if="{{item.selectRule.range_type==1&&item.selectRule.min_point==item.selectRule.max_point}}" style="padding-left:10rpx; height:60rpx;line-height:60rpx;" class="flex-1">{{item.point}}</view>
+              <input a:else value="{{item.point}}"  placeholder="0" type="number" onInput="bindKeyInput"  class="flex-1"/>
+              <view class="picker-box"  catchTap="bindPickerChange" a:if="{{item.selectRule.range_type!=1}}">
                 <view class="{{item.isArrindex==true ? 'picker-right':'picker-left'}} yuan"></view>
                 <view class="flex-box flex-v-ce" class="picker">
                   <text class="red flex-1">奖</text>
@@ -164,9 +133,9 @@
               </view>
             </view>
             <block a:if="{{item.selectRule}}">
-              <view class="fontColorT input_text" a:if="{{item.selectRule.range_type==1}}">固定:{{item.selectRule.min_point}} {{item.selectRule.pt_Obj[0].name}}</view>
+              <view class="fontColorT input_text" a:if="{{item.selectRule.range_type==1}}">固定:{{item.selectRule.min_point}} {{item.selectRule.pt_Obj.name}}</view>
               <view class="fontColorT input_text" a:else> 范围(可修改):{{item.selectRule.min_point}}至{{item.selectRule.max_point}}
-                <text>{{item.selectRule.pt_Obj[0].name}}</text></view>
+                <text>{{item.selectRule.pt_Obj.name}}</text></view>
             </block>
           </view>
         </view>
@@ -191,7 +160,7 @@
         </view>
         <view a:if="{{item.selectRule&&item.checked}}" class="selectRule margin-bottom">
           <view class="flex-box flex-v-ce">
-            <view a:if="{{item.selectRule.range_type=='1'}}">
+            <view a:if="{{item.selectRule.range_type==1&&item.selectRule.min_point==item.selectRule.max_point}}">
               <text class="red" a:if="{{item.selectRule.min_point>0}}">+{{item.selectRule.min_point}}</text>
               <text class="green" a:else>{{item.selectRule.min_point}}</text>
             </view>
@@ -214,9 +183,9 @@
           <text class="green" a:else style="position: relative;top:8rpx;">-</text>
           <view class="flex-1">
             <view class="flex-box flex-v-ce">
-              <view a:if="{{item.selectRule.range_type==1}}" style="padding-left:10rpx; height:60rpx;line-height:60rpx;" class="flex-1">{{item.point}}</view>
-              <input a:else value="{{item.point}}" name="{{index}}" placeholder="0" type="number" onInput="bindKeyInput" data-index="{{index}}" class="flex-1"/>
-              <view class="picker-box" data-index="{{index}}" catchTap="bindPickerChange" a:if="{{item.selectRule.range_type!=1}}">
+              <view a:if="{{item.selectRule.range_type==1&&item.selectRule.min_point==item.selectRule.max_point}}" style="padding-left:10rpx; height:60rpx;line-height:60rpx;" class="flex-1">{{item.point}}</view>
+              <input a:else value="{{item.point}}"  placeholder="0" type="number" onInput="bindKeyInput" class="flex-1"/>
+              <view class="picker-box" catchTap="bindPickerChange" a:if="{{item.selectRule.range_type!=1}}">
                 <view class="{{item.isArrindex==true ? 'picker-right':'picker-left'}} yuan"></view>
                 <view class="flex-box flex-v-ce" class="picker">
                   <text class="red flex-1">奖</text>
@@ -225,9 +194,9 @@
               </view>
             </view>
             <block a:if="{{item.selectRule}}">
-              <view class="fontColorT input_text" a:if="{{item.selectRule.range_type==1}}">固定:{{item.selectRule.min_point}} {{item.selectRule.pt_Obj[0].name}}</view>
+              <view class="fontColorT input_text" a:if="{{item.selectRule.range_type==1}}">固定:{{item.selectRule.min_point}} {{item.selectRule.pt_Obj.name}}</view>
               <view class="fontColorT input_text" a:else> 范围(可修改):{{item.selectRule.min_point}}至{{item.selectRule.max_point}}
-                <text>{{item.selectRule.pt_Obj[0].name}}</text></view>
+                <text>{{item.selectRule.pt_Obj.name}}</text></view>
             </block>
           </view>
         </view>
@@ -237,8 +206,8 @@
           <text class="green" a:else style="position: relative;top:8rpx;">-</text>
           <view class="flex-1">
             <view class="flex-box flex-v-ce">
-              <input value="{{item.point2}}" name="{{index}}" placeholder="0" type="number" onInput="bindKeyInput2" data-index="{{index}}" class="flex-1"/>
-              <view class="picker-box" data-index="{{index}}" catchTap="bindPickerChange2">
+              <input value="{{item.point2}}"  placeholder="0" type="number" onInput="bindKeyInput2" class="flex-1"/>
+              <view class="picker-box"  catchTap="bindPickerChange2">
                 <view class="{{item.isArrindex2==true? 'picker-right':'picker-left'}} yuan"></view>
                 <view class="flex-box flex-v-ce" class="picker">
                   <text class="red flex-1">奖</text>
@@ -249,11 +218,13 @@
           </view>
         </view>
       </block>
+
+
       <view class="fontColorF" style="font-size:24rpx;padding-left:28rpx">奖票多用于优秀表现和重要事项的表彰</view>
       <view class="flex-box flex-v-ce li margin-bottom" style="padding:26rpx 28rpx;">
         <view class="label">发放奖票</view>
         <view class="flex-1"></view>
-        <switch onChange="switchChange2" checked="{{item.ticket_count}}" color="#26A2FF"></switch>
+        <switch onChange="switchChange2" disabled="{{item.pid}}" checked="{{item.ticket_count}}" color="#26A2FF"></switch>
       </view>
       <view class="flex-box flex-v-ce li margin-bottom" data-num="3" catchTap="openSelect">
         <view class="label">递交审批</view>
@@ -261,12 +232,12 @@
         <image mode="scaleToFill" src="../../../image/right.png" class="rightImg"/>
       </view>
       <view class="li">
-        <textarea value="{{item.remark}}" onBlur="bindTextAreaBlur" placeholder="审批意见(选填)" data-index="{{index}}"></textarea>
+        <textarea  maxlength="300" value="{{item.remark}}" onInput="bindTextAreaBlur" placeholder="审批意见(选填)"></textarea>
       </view>
     </view>
   </form>
   <view class="btn-seve">
-    <view class="defBtn" catchTap="formSubmit">提交</view>
+    <button type="default" loading="{{disabled}}" class="defBtn" disabled="{{disabled}}" catchTap="formSubmit">提交</button>
   </view>
   <view class="box" animation="{{animationInfo}}">
     <select-rule onConfirm="onSelectItem" onClose="onClose" a:if="{{isShowType=='1'}}"/>

+ 19 - 12
pages/workbench/approve/approve.js

@@ -17,6 +17,7 @@ Page({
       reviewer_id: '',//递交者
       remark: '',//备注
       ticket_count: false,//奖票数量
+      disabled:false,
     },
     users: {
       id:''
@@ -115,15 +116,20 @@ Page({
       remark: item.remark,
       ticket_count: item.ticket_count ? 1 : 0,
     }
-    // console.log(data);
-    // return;
+    this.setData({disabled:true});
     app.$post("api/integral/review", data).then((res) => {
-      that.showToast("已审批");
-      setTimeout(() => {
-        dd.navigateBack({
-          delta: 2
-        })
-      }, 1000);
+      if(res.data.code==1){
+        this.showToast("已审批");
+        setTimeout(() => {
+          this.setData({disabled:false});
+          dd.navigateBack({delta: 2})
+        }, 1000);
+      }else{
+        this.setData({disabled:false});
+         this.showToast(res.data.msg);
+      }
+    }).catch(err=>{
+        this.setData({disabled:false});
     })
   },
   bindKeyInput(e) {
@@ -173,12 +179,12 @@ Page({
       strMin = item.min_point;
     }
     that.setData({
+      ['item.rule_id']: item.rule_id,
       ['item.selectRule']: item,
-      ['item.rule_id']: item.id,
+      ['item.item']: item.id,
       ['item.point']: Number(strMin),
       ['item.isArrindex']: item.min_point > 0 ? true : false,
     })
-    console.log(that.data.item);
   },
   //显示规则
   openSelect(e) {
@@ -215,6 +221,7 @@ Page({
           min_point: data.item_min_point,
           max_point: data.item_max_point,
           remark: data.item_name,
+          pt_Obj:app.getTypesItem(data.pt_id),
         }
       } else if (data.rule_id && data.point) {
         console.log(2);
@@ -231,6 +238,7 @@ Page({
       }
       that.setData({
         isData: isData,
+        ['item.pid']: data.pid==0 ? false:true,
         ['item.review_id']: data.id,
         ['item.checked']: checked,
         ['item.selectRule']: selectRule,
@@ -240,8 +248,7 @@ Page({
         ['item.point']: getPoint == 0 ? '' : getPoint,
         ['item.isArrindex']: data.point >= 0 ? true : false,
       })
-      console.log(that.data.item);
-
+      console.log(this.data.item);
     })
   },
 });

+ 7 - 6
pages/workbench/approveDetail/approveDetail.acss

@@ -34,8 +34,10 @@
 }
 .bottom{
   background: #fff;
-  position: sticky;
+  position: fixed;
   bottom: 0;
+  left: 0;
+  right: 0;
   z-index: 2;
   text-align: center;
   padding: 16rpx;
@@ -65,24 +67,23 @@
   margin-bottom: 120rpx;
 }
 .header-main .imgs{
-  width: 80rpx;
-  height: 80rpx;
+  width: 120rpx;
+  height: 120rpx;
   margin-right: 10rpx;
   margin-bottom: 10rpx;
 }
 .main-title{
   padding:16rpx 32rpx;
   background: #fff;
-  font-size: 30rpx;
+  font-size: 32rpx;
   color: #222;
   font-weight: 600;
 }
 .main-title text{
-  font-size: 24rpx;
+  font-size: 28rpx;
   color: #909399;
   font-weight: 500;
   position: relative;
-  top: -3rpx;
   padding-left: 20rpx;
 }
 

+ 7 - 7
pages/workbench/approveDetail/approveDetail.axml

@@ -9,7 +9,7 @@
         <view class="green" a:if="{{dataDetail.review_status==2}}">{{dataDetail.status_mark}}</view>
       </view>
     </view>
-     <view class="header-top flex-box-v flex-center-center border-bottom" a:if="{{dataDetail.status==1||dataDetail.status==2}}">
+    <view class="header-top flex-box-v flex-center-center border-bottom" a:if="{{dataDetail.status==1||dataDetail.status==2}}">
       <img-box a:if="{{dataDetail.process[0].name}}" imgUrl="{{dataDetail.process[0].img_url}}" name="{{dataDetail.process[0].name}}" height="90rpx" width="90rpx" fSize="28rpx"></img-box>
       <view style="font-weight: 600;margin: 10rpx 0">{{dataDetail.process[0].name}}</view>
       <view class="green" style="font-weight: 600;margin-bottom: 10rpx" a:if="{{dataDetail.status==1}}">
@@ -23,7 +23,7 @@
         </text>
         <text style="margin-left:10rpx;">{{dataDetail.typeName}}</text>
       </view>
-      <view>{{dataDetail.status_mark}}</view> 
+      <view>{{dataDetail.status_mark}}</view>
     </view>
     <view class="header-main">
       <view class="flex-box" a:for="{{dataDetail.detail}}">
@@ -34,14 +34,14 @@
         <block a:if="{{item.type=='image'&&item.value}}">
           <view class="laber">{{item.key}}</view>
           <view class="flex-1 flex-box flex-d-wrap">
-            <image class="imgs" mode="scaleToFill" src="{{imgs}}" a:for="{{item.value}}" a:for-item="imgs"/>
+            <image catchTap="showImg" data-index="{{idx}}" data-item="{{item.value}}" a:for-index="idx" class="imgs" mode="scaleToFill" src="{{imgs}}" a:for="{{item.value}}" a:for-item="imgs"/>
           </view>
         </block>
       </view>
     </view>
   </view>
   <view class="main">
-    <block a:if="{{dataDetail.rule_id && dataDetail.item_id}}">
+    <block a:if="{{dataDetail.rule_id}}">
       <view class="main-title border-bottom">规则依据
         <text>此事件打分参考以下积分规则</text></view>
       <view class="header-main">
@@ -49,7 +49,7 @@
           <view class="laber">规则分类</view>
           <view class="flex-1">{{ dataDetail.rule_name }}</view>
         </view>
-        <view class="flex-box flex-v-ce" a:if="{{dataDetail.item_name&& dataDetail.item_id>0}}">
+        <view class="flex-box" a:if="{{dataDetail.item_name&& dataDetail.item_id>0}}">
           <view class="laber">积分规则</view>
           <view class="flex-1">{{ dataDetail.item_name }}</view>
         </view>
@@ -81,14 +81,14 @@
       <text class="flex-2 fontColorF">撤回后需重新审批</text>
       <view></view>
       <view class="flex-1 blueBtn" catchTap="openCx">撤销</view>
-    </block> 
+    </block>
   </view>
   <!-- 弹出框 -->
   <view class="windows" a:if="{{isBh}}">
     <view class="windows-box">
       <view class="windows-title">确认驳回</view>
       <view class="windows-content">
-        <textarea onBlur="bindTextAreaBlur" maxlength="50" placeholder="请输入审批意见"/>
+        <textarea onInput="bindTextAreaBlur" maxlength="50" placeholder="请输入审批意见"/>
       </view>
       <view class="windows-btn flex-box flex-v-ce">
         <view class="flex-1" catchTap="openBh">取消</view>

+ 24 - 14
pages/workbench/approveDetail/approveDetail.js

@@ -9,16 +9,24 @@ Page({
   },
   onLoad(e) {
     that = this;
-    
+
     dd.setNavigationBar({ title: "详情" });
     if (e.id) {
-      that.setData({ review_id: e.id});
+      that.setData({ review_id: e.id });
       that.getData();
     }
-    if(e.is){
-      that.setData({ is: e.is});
+    if (e.is) {
+      that.setData({ is: e.is });
     }
   },
+  showImg(e) {
+    var index = e.target.dataset.index;
+    var item = e.target.dataset.item
+    dd.previewImage({
+      current: index,
+      urls: item
+    });
+  },
   submit() {
     dd.navigateTo({
       url: '../approve/approve?id=' + that.data.dataDetail.id
@@ -30,7 +38,7 @@ Page({
     });
   },
   openBh(e) {
-    this.setData({ isBh: !this.data.isBh })
+    this.setData({ isBh: !this.data.isBh, textArea: '' })
   },
   confirmBh() {
     var item = that.data.bhItem;
@@ -41,7 +49,7 @@ Page({
     app.$post("api/integral/review", { review_id: that.data.review_id, remark: that.data.textArea, action: "refuse", ticket_count: 0 }).then((res) => {
       app.globalData.showToast("已审批");
       setTimeout(() => {
-         dd.navigateBack({ delta: 1 });
+        dd.navigateBack({ delta: 1 });
       }, 1000);
     })
   },
@@ -52,14 +60,16 @@ Page({
       confirmButtonText: '确定',
       cancelButtonText: '取消',
       success: (result) => {
-        app.$post("api/integral/review/destroy", { review_id: that.data.review_id }).then((res) => {
-          app.globalData.showToast("已撤销");
-          setTimeout(() => {
-            dd.navigateBack({
-              delta: 1
-            })
-          }, 1000);
-        })
+        if (result.confirm) {
+          app.$post("api/integral/review/destroy", { review_id: that.data.review_id }).then((res) => {
+            app.globalData.showToast("已撤销");
+            setTimeout(() => {
+              dd.navigateBack({
+                delta: 1
+              })
+            }, 1000);
+          })
+        }
       },
     });
   },

+ 38 - 8
pages/workbench/index/index.acss

@@ -24,7 +24,7 @@
 .head .flex-1 view:nth-child(2){
   color: #C0C4CC;
   margin-bottom: 5rpx;
-  font-size: 24rpx;
+  font-size: 28rpx;
 }
 .headed{
   background-color: #fff;
@@ -58,18 +58,19 @@
   padding: 28rpx 32rpx;
   color: #222;
 }
-.main .main-title text{
+.main .main-title .text2{
   border-radius: 50%;
   border:1px solid #909399;
   color: #909399;
-  width: 24rpx;
-  height: 24rpx;
-  font-size: 24rpx;
+  width: 26rpx;
+  height: 26rpx;
+  font-size: 22rpx;
   text-align: center;
   display: inline-block;
   margin-left: 10rpx;
   position: relative;
-  line-height: 24rpx;
+  line-height: 26rpx;
+  box-sizing: border-box;
 }
 .main-main{
   text-align: center;
@@ -88,7 +89,7 @@
 .main-main .flex-1 view:nth-child(3){
   color: #C0C4CC;
   margin-bottom: 5rpx;
-  font-size: 24rpx;
+  font-size: 28rpx;
 }
 /* 底部 */
 .bottom{
@@ -132,5 +133,34 @@
   text-align: center;
   color: #909399;
   line-height: 60rpx;
-  font-size: 24rpx;
+  font-size: 28rpx;
+}
+.windows-box{
+  background: #fff;
+  margin: 0 32rpx;
+  margin-top: 30%;
+  border-radius: 20rpx; 
+}
+.windows-title{
+  text-align: center;
+  padding: 28rpx 0;
+  border-bottom: 1px solid #f1f1f1;
+}
+.windows-btn{
+   border-top: 1px solid #f1f1f1;
+}
+.windows-btn view:nth-child(1){
+  text-align: center;
+  padding: 28rpx 0;
+  border-right: 1px solid #f1f1f1;
+}
+.windows-btn view:nth-child(2){
+  text-align: center;
+  padding: 28rpx 0;
+  color: #26A2FF;
+}
+.windows-content{
+  height: 100rpx;
+  padding: 28rpx;
+  text-align: center
 }

+ 17 - 5
pages/workbench/index/index.axml

@@ -36,9 +36,12 @@
 
   </view>
   <!-- 奖扣展示 -->
-  <view class="main margin-bottom" a:if="{{userData.task}}" data-index="7" catchTap="openView">
-      <view class="main-title">本月B分奖扣<text catchTap="showText">?</text></view>
-      <view class="main-main flex-box flex-center-center">
+  <view class="main margin-bottom" a:if="{{userData.task}}">
+      <view class="main-title flex-box flex-v-ce">
+          <text>本月B分奖扣</text>
+          <text class="text2" catchTap="showText">?</text>
+      </view>
+      <view class="main-main flex-box flex-center-center" data-index="7" catchTap="openView">
         <view class="flex-1">
             <view>{{userData.task.reward.point}}</view>
             <view>奖分</view>
@@ -75,7 +78,16 @@
           <view class="date">{{item.event_time}}</view>
         </view>
     </view>
-    <no-data a:if="{{incidentLsit.length==0}}"/>
+    <no-data a:if="{{incidentLsit.list.length==0}}"/>
+  </view>
+  <view data-index="9" onTap="openView" a:if="{{incidentLsit.total>5}}" class="more">查看更多</view>
+  <view class="windows" a:if="{{isBh}}">
+    <view class="windows-box">
+      <view class="windows-title">温馨提示</view>
+      <view class="windows-content">作为管理者,管理执行力是关键,每月按要求完成奖分和扣分任务</view>
+      <view class="windows-btn flex-box flex-v-ce">
+        <view class="flex-1" catchTap="showText">我知道了</view>
+      </view>
+    </view>
   </view>
-  <view data-index="8" onTap="openView" a:if="{{incidentLsit.total>5}}" class="more">查看更多</view>
 </view>

+ 23 - 20
pages/workbench/index/index.js

@@ -4,25 +4,26 @@ var that;
 Page({
   data: {
     userData: {},
+    isBh:false
   },
   onLoad(query) {
     that = this;
   },
   onShow(query) {
-    app.login(app.globalData.corpId, function () {
+    if (app.globalData.userData) {
       that.getUserData();
       that.getIncidentLsit();
       that.getIncidentNum();
-    })
+    } else {
+      app.login(app.globalData.corpId, function () {
+        that.getUserData();
+        that.getIncidentLsit();
+        that.getIncidentNum();
+      })
+    }
   },
   showText() {
-    dd.confirm({
-      title: '温馨提示',
-      content: '作为管理者,管理执行力是关键,每月按要求完成奖分和扣分任务',
-      confirmButtonText: '已阅读',
-      cancelButtonText: '取消',
-      success: (result) => {},
-    });
+    this.setData({isBh:!this.data.isBh})
   },
   //跳转
   openView(e) {
@@ -32,23 +33,25 @@ Page({
       urls = [
         { url: '../statistics_B/statistics_B', query: '' },
         { url: '../statistics_A/statistics_A', query: '' },
-        { url: '../jk_B/jk_B', query: '' },
-        { url: '../jk_A/jk_A', query: '' },
+        { url: '../jk_B/jk_B', query: 'type=B' },
+        { url: '../jk_B/jk_B', query: 'type=A' },
         { url: '../apply/apply', query: '' },
         { url: '../my_approve/my_approve', query: '' },
         { url: '../prize_buckle/prize_buckle', query: '' },
-        { url: '../../statistics/prizeBuckleDetail/prizeBuckleDetail', query: 'event_id=' + e.target.dataset.item.id },
+        { url: '../../statistics/prizeBuckleDetail/prizeBuckleDetail', query: 'id=' + e.target.dataset.item.id },
+        { url: '../../statistics/integralEvent/integralEvent', query: '' },
       ];
     } else {
       urls = [
         { url: '../statistics_B/statistics_B', query: '' },
         { url: '../statistics_A/statistics_A', query: '' },
-        { url: '../jk_B/jk_B', query: '' },
-        { url: '../jk_A/jk_A', query: '' },
+        { url: '../jk_B/jk_B', query: 'type=B' },
+        { url: '../jk_B/jk_B', query: 'type=A' },
         { url: '../apply/apply', query: '' },
         { url: '../my_approve/my_approve', query: '' },
         { url: '../prize_buckle/prize_buckle', query: '' },
         { url: '../../statistics/prizeBuckleDetail/prizeBuckleDetail', query: '' },
+        { url: '../../statistics/integralEvent/integralEvent', query: '' },
       ];
     }
     dd.navigateTo({
@@ -59,13 +62,13 @@ Page({
   getUserData() {
     app.$get("api/integral/statistics", { employee_id: 0, month: app.globalData.month }).then((res) => {
       var data = res.data.data;
-      var task=data.task;
+      var task = data.task;
       dd.setNavigationBar({ title: data.name });
-      var  ratio=task.reward.point === 0 || task.deduction.point === 0? '-':`${task.ratio.ratio}:1`
-      var  target_ratio=task.ratio.target_ratio <= 0 ? '0:0' : `${task.ratio.target_ratio}:1`
-      data.ratio={
-        ratio:ratio,
-        target_ratio:target_ratio
+      var ratio = task.reward.point === 0 || task.deduction.point === 0 ? '-' : `${task.ratio.ratio}:1`
+      var target_ratio = task.ratio.target_ratio <= 0 ? '0:0' : `${task.ratio.target_ratio}:1`
+      data.ratio = {
+        ratio: ratio,
+        target_ratio: target_ratio
       }
       this.setData({
         userData: data

+ 1 - 2
pages/workbench/index/index.json

@@ -2,6 +2,5 @@
   "usingComponents": {
     "img-box":"/Component/img-box/index",
       "no-data":"/Component/noData/noData"
-  },
-  "pullRefresh": true
+  }
 }

+ 14 - 10
pages/workbench/jk_A/jk_A.axml

@@ -2,7 +2,11 @@
   <form>
     <view class="flex-box flex-v-ce form-top" catchTap="openSelect"  data-num="3">
       <view class="label isBt">录入对象</view>
-      <view class="flex-1">{{users.name}}</view>
+      <view class="flex-1 font-flex-word">
+          <block a:for="{{users}}">
+              <text>{{item.name}},</text>
+          </block>
+      </view>
       <image mode="scaleToFill" src="../../../image/right.png" class="rightImg"/>
     </view>
     <view a:for="{{items}}" a:for-index="index" key="{{index}}">
@@ -34,9 +38,9 @@
           <text class="green" a:else style="position: relative;top:8rpx;">-</text>
           <view class="flex-1">
             <view class="flex-box flex-v-ce">
-              <view a:if="{{item.selectRule.range_type==1}}" style="padding-left:10rpx; height:60rpx;line-height:60rpx;" class="flex-1">{{item.point}}</view>
+              <view a:if="{{item.selectRule.range_type==1&&item.selectRule.min_point==item.selectRule.max_point}}" style="padding-left:10rpx; height:60rpx;line-height:60rpx;" class="flex-1">{{item.point}}</view>
               <input a:else value="{{item.point}}" name="{{index}}" placeholder="0" type="number" onInput="bindKeyInput" data-index="{{index}}" class="flex-1"/>
-              <view class="picker-box" data-index="{{index}}" catchTap="bindPickerChange">
+              <view class="picker-box" data-index="{{index}}" catchTap="bindPickerChange" a:if="{{item.selectRule.range_type!=1}}">
                 <view class="{{item.isArrindex==true? 'picker-right':'picker-left'}} yuan"></view>
                 <view class="flex-box flex-v-ce" class="picker">
                   <text class="red flex-1">奖</text>
@@ -45,7 +49,7 @@
               </view>
             </view>
             <block a:if="{{item.selectRule}}">
-              <view class="fontColorT input_text" a:if="{{item.selectRule.range_type==1}}">固定:{{item.selectRule.min_point}} {{item.selectRule.pt_Obj[0].name}}</view>
+              <view class="fontColorT input_text" a:if="{{item.selectRule.range_type==1&&item.selectRule.min_point==item.selectRule.max_point}}">固定:{{item.selectRule.min_point}} {{item.selectRule.pt_Obj[0].name}}</view>
               <view class="fontColorT input_text" a:else> 范围(可修改):{{item.selectRule.min_point}}至{{item.selectRule.max_point}}
                 <text>{{item.selectRule.pt_Obj[0].name}}</text></view>
             </block>
@@ -74,13 +78,13 @@
           <view class="flex-1">{{item.event_time}}</view>
           <image mode="scaleToFill" src="../../../image/right.png" class="rightImg"/>
         </view>
-        <view class="flex-box flex-v-ce li" data-index="{{index}}"  data-num="4"  catchTap="openSelect">
+        <view class="flex-box flex-v-ce li" data-index="{{index}}"  data-num="4" data-item="{{{id:item.reviewer_id,name:item.revieweName}}}"  catchTap="openSelect">
           <view class="label">审批人</view>
           <view class="flex-1">{{item.revieweName}}</view>
           <image mode="scaleToFill" src="../../../image/right.png" class="rightImg"/>
         </view>
         <view class="li">
-          <textarea value="{{item.remark}}" onBlur="bindTextAreaBlur" placeholder="请输入事件内容" data-index="{{index}}"></textarea>
+          <textarea maxlength="100" value="{{item.remark}}" onInput="bindTextAreaBlur" placeholder="请输入事件内容" data-index="{{index}}"></textarea>
           <image mode="scaleToFill" src="../../../image/addImg.png" data-index="{{index}}" class="addImg" catchTap="openImg"/>
         </view>
         <view style="background:#fff;padding:0 28rpx;" a:if="{{item.files[0]}}" class="flex-box flex-v-ce">
@@ -93,13 +97,13 @@
     </view>
     <view class="add" catchTap="addArr">+  再加一条</view>
     <view class="btn-area">
-      <view class="defBtn" catchTap="formSubmit">提交</view> 
+      <button type="default" loading="{{disabled}}" class="defBtn" disabled="{{disabled}}" catchTap="formSubmit">提交</button>
     </view>
   </form>
-  <view class="box" animation="{{animationInfo}}">
+  <view class="box" animation="{{animationInfo}}" a:if="{{isShowType}}">
     <select-rule isGzType="AF" onConfirm="onSelectItem" onClose="onClose" a:if="{{isShowType=='1'}}"/>
     <select-type isGzType="AF" onConfirm="onSelectType" onClose="onClose" a:if="{{isShowType=='2'}}"/>
-    <select-section-staff-two onClose="onClose" onConfirm="onSelectUser" a:if="{{isShowType=='3'}}"/>
-    <select-section-staff-two onClose="onClose" onConfirm="onSelectUser2" a:if="{{isShowType=='4'}}"/>
+    <select-section-staff isLeadership="{{true}}" selectUser="{{users}}" onClose="onClose" onConfirm="onSelectUser" a:if="{{isShowType=='3'}}"/>
+    <select-section-staff-two isLeadership="{{false}}" selectUser="{{reviewerObj}}" onClose="onClose" onConfirm="onSelectUser2" a:if="{{isShowType=='4'}}"/>
   </view>
 </view>

+ 111 - 75
pages/workbench/jk_A/jk_A.js

@@ -3,36 +3,41 @@ var that;
 var animation;
 Page({
   data: {
-    users: {},
-    items: [{//录入选项列表
-      checked: true,//判断是否开启指定规则
-      rule_id: '',//积分分类id
-      rule_id2:'',
-      rule_name: '',//积分分类名称
-
-      item_id: 0,//积分细则id 不选可以为0
-
-      point: '',//录入积分可为正负值,不能为0(细则)
-      point2: '',//录入积分可为正负值,不能为0(分类)
-
-      remark: '',//备注
-      event_time: app.globalData.day,//事件时间
-      pt_id: '',//积分种类id
-      reviewer_id: '',//审核人ID
-      revieweName: '',//审批人姓名(非传)
-      files: '',//附件数组列表
-      isArrindex: true,//奖扣索引(默认奖)(细则)
-      isArrindex2: true,//奖扣索引(默认奖)(分类)
-      selectRule: '',//选择的规则
-    }],
+    users: [],
+    items: [],
     animationInfo: '',
     isShowType: '',//是显示选择规则还是显示选择分类
     activeIndex: '',
     isArr: ['奖', '扣'],
+    reviewerObj:[],//默认的审批人
+     disabled:false,
   },
   onLoad() {
     that = this;
     dd.setNavigationBar({ title: "奖扣A分" });
+    this.setData({
+      items: [{//录入选项列表
+              checked: true,//判断是否开启指定规则
+              rule_id: '',//积分分类id
+              rule_id2: '',
+              rule_name: '',//积分分类名称
+
+              item_id: 0,//积分细则id 不选可以为0
+
+              point: '',//录入积分可为正负值,不能为0(细则)
+              point2: '',//录入积分可为正负值,不能为0(分类)
+
+              remark: '',//备注
+              event_time: app.globalData.day,//事件时间
+              pt_id: '',//积分种类id
+              reviewer_id: '',//审核人ID
+              revieweName: '',//审批人姓名(非传)
+              files: '',//附件数组列表
+              isArrindex: true,//奖扣索引(默认奖)(细则)
+              isArrindex2: true,//奖扣索引(默认奖)(分类)
+              selectRule: '',//选择的规则
+            }],
+    })
   },
   onShow() {
     animation = dd.createAnimation({
@@ -44,18 +49,18 @@ Page({
   bindPickerChange(e) {
     var index = e.target.dataset.index;
     var isArrindex = `items[${index}].isArrindex`;
-    var isTrue=that.data.items[index].isArrindex
+    var isTrue = that.data.items[index].isArrindex
     this.setData({
-      [isArrindex]:!isTrue,
+      [isArrindex]: !isTrue,
     });
   },
   //选择奖还是扣(分类)
   bindPickerChange2(e) {
     var index = e.target.dataset.index;
     var isArrindex2 = `items[${index}].isArrindex2`;
-    var isTrue=that.data.items[index].isArrindex2
+    var isTrue = that.data.items[index].isArrindex2
     this.setData({
-      [isArrindex2]:!isTrue,
+      [isArrindex2]: !isTrue,
     });
   },
   //关闭规则
@@ -64,10 +69,14 @@ Page({
     that.setData({
       animationInfo: animation.export()
     });
+    that.setData({isShowType: ''});
   },
   //选择规则
   openSelect(e) {
     that.setData({ activeIndex: '' });
+    if(e.target.dataset.item){
+       that.setData({ reviewerObj: [e.target.dataset.item] });
+    }
     that.setData({
       isShowType: e.target.dataset.num,
       activeIndex: e.target.dataset.index,
@@ -88,25 +97,25 @@ Page({
     });
 
   },
-  //图片选择
+   //图片选择
   openImg(e) {
-    var index = e.target.dataset.index;
-    var files = that.data.items[index].files;
-    // var files_box = `items[${index}].files`;
+    var index2 = e.target.dataset.index;
+    var files = that.data.items[index2].files;
     if (files.length >= 3) {
-      app.globalData.showToast("最多能选择一张!");
+      app.globalData.showToast("只能上传三张");
       return false;
     }
     dd.chooseImage({
       count: 1,
       success: (res) => {
-        that.postImg(res, index);
+        console.log(res);
+          that.postImg(res.filePaths[0], index2);
       },
     });
   },
-  postImg(data, index) {
+  postImg(img_url,index) {
     var files_box = `items[${index}].files`;
-    dd.showLoading();
+    var files=this.data.items[index].files;
     dd.httpRequest({
       url: app.globalData.imgHttpUrl,
       method: 'POST',
@@ -121,7 +130,7 @@ Page({
           url: app.globalData.ALIOSS_URL,
           fileType: 'image',
           fileName: 'file',
-          filePath: data.filePaths[0],
+          filePath:img_url,
           formData: {
             key: key,
             policy: obj.policy,
@@ -131,12 +140,20 @@ Page({
           },
           success: (res) => {
             if (res.statusCode == 200) {
+              if(files.length>0){
+                files.push('http://cdn.intesys.g107.com/' + key)
+              }else{
+                files=['http://cdn.intesys.g107.com/' + key];
+              }
               that.setData({
-                [files_box]: ['http://cdn.intesys.g107.com/' + key]
+                [files_box]: files
               });
-              dd.hideLoading();
+             app.globalData.showToast("已上传");
             }
           },
+          fail:(err)=>{
+            console.log(err);
+          }
         });
 
       },
@@ -158,6 +175,7 @@ Page({
   },
   //备注输入
   bindTextAreaBlur: function (e) {
+    console.log(e);
     var index = e.target.dataset.index;
     var remark = `items[${index}].remark`
     this.setData({
@@ -230,7 +248,7 @@ Page({
     var arr = {//录入选项列表
       checked: true,
       rule_id: '',
-      rule_id2:'',
+      rule_id2: '',
       rule_name: '',
       item_id: 0,
       point: '',
@@ -238,8 +256,8 @@ Page({
       remark: '',
       event_time: app.globalData.day,
       pt_id: '',
-      reviewer_id: '',
-      revieweName: '',
+      reviewer_id:'',//审核人ID
+      revieweName:'',//审批人姓名(非传)
       files: '',
       isArrindex: true,
       isArrindex2: true,
@@ -259,11 +277,11 @@ Page({
     var userData = this.data.users;
     var arr = [];
     var isTg = true;
-    var pt_id=app.getTypesItem("AF").id;
-    if (userData.id == '' || userData.id == null || userData.id == undefined) { 
+    var pt_id = app.getTypesItem("AF").id;
+    if(userData.length==0){
       this.showToast('请输入录入对象')
-      return ; 
-    };
+      return;
+    }
     for (var i = 0; i < items.length; i++) {
       var obj = {};
       var item = items[i];
@@ -275,70 +293,83 @@ Page({
         } else {
           point = num;
         }
-        if(point<item.selectRule.min_point||point>item.selectRule.max_point){
-           this.showToast(`第${i+1}项,积分超出可输入范围`);
+        if (point < item.selectRule.min_point || point > item.selectRule.max_point) {
+          this.showToast(`第${i + 1}项,积分超出可输入范围`);
+          isTg = false;
         }
       } else {
-        if (item.isArrindex2 !=true) {
+        if (item.isArrindex2 != true) {
           point = 0 - num;
         } else {
           point = num;
         }
       }
-      if(item.checked){
+      if (item.checked) {
         if (!item.rule_id) {
-          this.showToast(`第${i+1}项请选择规则`);
+          this.showToast(`第${i + 1}项请选择规则`);
           isTg = false;
           break;
         }
-      }else{
+      } else {
         if (!item.rule_id2) {
-          this.showToast(`第${i+1}项请选择规则分类`);
+          this.showToast(`第${i + 1}项请选择规则分类`);
           isTg = false;
           break;
         }
       }
       if (point == 0 || !point) {
-        this.showToast(`第${i+1}项积分不能为0或者为空`);
+        this.showToast(`第${i + 1}项积分不能为0或者为空`);
         isTg = false;
         break;
       }
 
       if (!item.remark) {
-        this.showToast(`第${i+1}项事件内容不能为空`);
+        this.showToast(`第${i + 1}项事件内容不能为空`);
         isTg = false;
         break;
       }
-      obj.rule_id = item.checked ? item.rule_id:item.rule_id2;
+      obj.rule_id = item.checked ? item.rule_id : item.rule_id2;
       obj.item_id = item.checked ? item.item_id : 0;
       obj.point = point;
       obj.remark = item.remark;
       obj.event_time = item.event_time;
       obj.pt_id = pt_id;
-      obj.reviewer_id = item.reviewer_id;
+      obj.reviewer_id = item.reviewer_id? item.reviewer_id:0;
       obj.files = item.files;
       arr.push(obj);
     }
+    var userIds=[]
+    userData.map(item=>{
+      userIds.push(item.id)
+    })
     if (isTg) {
       var data = {
-        members: JSON.stringify([userData.id]),
+        members: JSON.stringify(userIds),
         items: JSON.stringify(arr)
       }
-        app.$post("api/integral/review/a/entry",data).then((res) => {
-          var is=true;
-            res.data.data.list.forEach(item=>{
-              if(item.status!=1){
-                this.showToast(item.msg);
-                is=false;
-              }
-            })
-            if(is){
-              this.showToast('已提交');
-              dd.navigateBack({
-                  delta: 1
-              })
-            }
+       this.setData({disabled:true});
+      app.$post("api/integral/review/a/entry", data).then((res) => {
+        var is = true;
+        var msg;
+        res.data.data.forEach(item => {
+          if (item.status != 1) {
+            is = false;
+            msg=item.rule_item;
+          }
         })
+        if (is) {
+          this.showToast('已提交');
+          setTimeout(() => {
+            this.setData({disabled:false});
+            dd.navigateBack({ delta: 1})
+          }, 1000);
+        }else{
+          this.setData({disabled:false});
+          this.showToast(msg);
+        }
+      }).catch(err=>{
+          this.setData({disabled:false}); 
+      })
     }
   },
   switchChange(e) {
@@ -364,18 +395,22 @@ Page({
   },
   //选择人
   onSelectUser(item) {
-    this.setData({
-      users: item[0]
-    })
+    console.log(item);
+    var elm=item.length>0? item:[];
+      this.setData({
+        users: elm
+      })
+    
   },
   //选择人2
   onSelectUser2(item) {
+    var elm=item.length>0? item[0]:{id:'',name:''};
     var index = this.data.activeIndex;
     var reviewer_id = `items[${index}].reviewer_id`
     var revieweName = `items[${index}].revieweName`
     that.setData({
-      [reviewer_id]: item[0].id,
-      [revieweName]: item[0].name,
+      [reviewer_id]: elm.id,
+      [revieweName]: elm.name,
     });
   },
 
@@ -415,3 +450,4 @@ Page({
     });
   },
 });
+

+ 3 - 4
pages/workbench/jk_A/jk_A.json

@@ -2,8 +2,7 @@
   "usingComponents": {
     "select-rule":"/Component/selectRule/selectRule",
     "select-type":"/Component/selectType/selectType",
-    "select-section-staff-two":"/Component/selectSectionStaff_tow/selectSectionStaff_tow"
-  },
-   "component": true
-
+    "select-section-staff-two":"/Component/selectSectionStaff_tow/selectSectionStaff_tow",
+    "select-section-staff":"/Component/selectSectionStaff/selectSectionStaff"
+  }
 }

+ 15 - 11
pages/workbench/jk_B/jk_B.axml

@@ -2,7 +2,11 @@
   <form>
     <view class="flex-box flex-v-ce form-top" catchTap="openSelect"  data-num="3">
       <view class="label isBt">录入对象</view>
-      <view class="flex-1">{{users.name}}</view>
+      <view class="flex-1 font-flex-word">
+          <block a:for="{{users}}">
+              <text>{{item.name}},</text>
+          </block>
+      </view>
       <image mode="scaleToFill" src="../../../image/right.png" class="rightImg"/>
     </view>
     <view a:for="{{items}}" a:for-index="index" key="{{index}}">
@@ -34,9 +38,9 @@
           <text class="green" a:else style="position: relative;top:8rpx;">-</text>
           <view class="flex-1">
             <view class="flex-box flex-v-ce">
-              <view a:if="{{item.selectRule.range_type==1}}" style="padding-left:10rpx; height:60rpx;line-height:60rpx;" class="flex-1">{{item.point}}</view>
+              <view a:if="{{item.selectRule.range_type==1&&item.selectRule.min_point==item.selectRule.max_point}}" style="padding-left:10rpx; height:60rpx;line-height:60rpx;" class="flex-1">{{item.point}}</view>
               <input a:else value="{{item.point}}" name="{{index}}" placeholder="0" type="number" onInput="bindKeyInput" data-index="{{index}}" class="flex-1"/>
-              <view class="picker-box" data-index="{{index}}" catchTap="bindPickerChange">
+              <view class="picker-box" data-index="{{index}}" catchTap="bindPickerChange" a:if="{{item.selectRule.range_type!=1}}">
                 <view class="{{item.isArrindex==true? 'picker-right':'picker-left'}} yuan"></view>
                 <view class="flex-box flex-v-ce" class="picker">
                   <text class="red flex-1">奖</text>
@@ -45,7 +49,7 @@
               </view>
             </view>
             <block a:if="{{item.selectRule}}">
-              <view class="fontColorT input_text" a:if="{{item.selectRule.range_type==1}}">固定:{{item.selectRule.min_point}} {{item.selectRule.pt_Obj[0].name}}</view>
+              <view class="fontColorT input_text" a:if="{{item.selectRule.range_type==1&&item.selectRule.min_point==item.selectRule.max_point}}">固定:{{item.selectRule.min_point}} {{item.selectRule.pt_Obj[0].name}}</view>
               <view class="fontColorT input_text" a:else> 范围(可修改):{{item.selectRule.min_point}}至{{item.selectRule.max_point}}
                 <text>{{item.selectRule.pt_Obj[0].name}}</text></view>
             </block>
@@ -74,13 +78,13 @@
           <view class="flex-1">{{item.event_time}}</view>
           <image mode="scaleToFill" src="../../../image/right.png" class="rightImg"/>
         </view>
-        <view class="flex-box flex-v-ce li" data-index="{{index}}"  data-num="4"  catchTap="openSelect">
+        <view class="flex-box flex-v-ce li" data-index="{{index}}"  data-num="4"  data-item="{{{id:item.reviewer_id,name:item.revieweName}}}"  catchTap="openSelect">
           <view class="label">审批人</view>
           <view class="flex-1">{{item.revieweName}}</view>
           <image mode="scaleToFill" src="../../../image/right.png" class="rightImg"/>
         </view>
         <view class="li">
-          <textarea value="{{item.remark}}" onBlur="bindTextAreaBlur" placeholder="请输入事件内容" data-index="{{index}}"></textarea>
+          <textarea maxlength="100" value="{{item.remark}}" onInput="bindTextAreaBlur" placeholder="请输入事件内容" data-index="{{index}}"></textarea>
           <image mode="scaleToFill" src="../../../image/addImg.png" data-index="{{index}}" class="addImg" catchTap="openImg"/>
         </view>
         <view style="background:#fff;padding:0 28rpx;" a:if="{{item.files[0]}}" class="flex-box flex-v-ce">
@@ -93,13 +97,13 @@
     </view>
     <view class="add" catchTap="addArr">+  再加一条</view>
     <view class="btn-area">
-      <view class="defBtn" catchTap="formSubmit">提交</view> 
+        <button type="default" loading="{{disabled}}" class="defBtn" disabled="{{disabled}}" catchTap="formSubmit">提交</button>
     </view>
   </form>
   <view class="box" animation="{{animationInfo}}">
-    <select-rule isGzType="BF" onConfirm="onSelectItem" onClose="onClose" a:if="{{isShowType=='1'}}"/>
-    <select-type isGzType="BF" onConfirm="onSelectType" onClose="onClose" a:if="{{isShowType=='2'}}"/>
-    <select-section-staff-two onClose="onClose" onConfirm="onSelectUser" a:if="{{isShowType=='3'}}"/>
-    <select-section-staff-two onClose="onClose" onConfirm="onSelectUser2" a:if="{{isShowType=='4'}}"/>
+    <select-rule isGzType="{{isGzType}}" onConfirm="onSelectItem" onClose="onClose" a:if="{{isShowType=='1'}}"/>
+    <select-type isGzType="{{isGzType}}" onConfirm="onSelectType" onClose="onClose" a:if="{{isShowType=='2'}}"/>
+    <select-section-staff isLeadership="{{true}}" selectUser="{{users}}" onClose="onClose" onConfirm="onSelectUser" a:if="{{isShowType=='3'}}"/>
+    <select-section-staff-two superior_list="{{superior_list}}" isLeadership="{{false}}" selectUser="{{reviewerObj}}" onClose="onClose" onConfirm="onSelectUser2" a:if="{{isShowType=='4'}}"/>
   </view>
 </view>

+ 172 - 58
pages/workbench/jk_B/jk_B.js

@@ -3,36 +3,52 @@ var that;
 var animation;
 Page({
   data: {
-    users: {},
-    items: [{//录入选项列表
-      checked: true,//判断是否开启指定规则
-      rule_id: '',//积分分类id
-      rule_id2: '',
-      rule_name: '',//积分分类名称
-
-      item_id: 0,//积分细则id 不选可以为0
-
-      point: '',//录入积分可为正负值,不能为0(细则)
-      point2: '',//录入积分可为正负值,不能为0(分类)
-
-      remark: '',//备注
-      event_time: app.globalData.day,//事件时间
-      pt_id: '',//积分种类id
-      reviewer_id: '',//审核人ID
-      revieweName: '',//审批人姓名(非传)
-      files: '',//附件数组列表
-      isArrindex: true,//奖扣索引(默认奖)(细则)
-      isArrindex2: true,//奖扣索引(默认奖)(分类)
-      selectRule: '',//选择的规则
-    }],
+    users: [],
+    items: [],
     animationInfo: '',
     isShowType: '',//是显示选择规则还是显示选择分类
     activeIndex: '',
     isArr: ['奖', '扣'],
+    reviewerObj:[],//默认的审批人
+    disabled:false,
+    employeeList:[],//人员列表
+    superior_list:[],//领导人员
+    type:'B',
+    isGzType:'BF',
   },
-  onLoad() {
+  onLoad(data) {
     that = this;
-    dd.setNavigationBar({ title: "奖扣B分" });
+    this.setData({
+      type:data.type,
+      isGzType:data.type=="B"? "BF":"AF",
+      items: [{//录入选项列表
+              checked: true,//判断是否开启指定规则
+              rule_id: '',//积分分类id
+              rule_id2: '',
+              rule_name: '',//积分分类名称
+
+              item_id: 0,//积分细则id 不选可以为0
+
+              point: '',//录入积分可为正负值,不能为0(细则)
+              point2: '',//录入积分可为正负值,不能为0(分类)
+
+              remark: '',//备注
+              event_time: app.globalData.day,//事件时间
+              pt_id: '',//积分种类id
+              reviewer_id: '',//审核人ID
+              revieweName: '',//审批人姓名(非传)
+              files: '',//附件数组列表
+              isArrindex: true,//奖扣索引(默认奖)(细则)
+              isArrindex2: true,//奖扣索引(默认奖)(分类)
+              selectRule: '',//选择的规则
+            }],
+    })
+    if(data.type=="B"){
+       dd.setNavigationBar({ title: "奖扣B分" });
+    }else{
+       dd.setNavigationBar({ title: "奖扣A分" });
+    }
+    that.getEmployeeList();
   },
   onShow() {
     animation = dd.createAnimation({
@@ -64,12 +80,29 @@ Page({
     that.setData({
       animationInfo: animation.export()
     });
+    that.setData({isShowType: ''});
   },
-  //选择规则
+  //选择弹窗
   openSelect(e) {
+    var num=e.target.dataset.num;
+    var userData = this.data.users;
+    var superior_list = this.data.superior_list;
+    if(num==4){
+        if(userData.length==0){
+          this.showToast('请先录入对象')
+          return;
+        }
+        if(superior_list.length==0){
+          this.showToast('您没有审批人,请联系管理员')
+          return;
+        }
+    }
     that.setData({ activeIndex: '' });
+    if(e.target.dataset.item){
+       that.setData({ reviewerObj: [e.target.dataset.item] });
+    }
     that.setData({
-      isShowType: e.target.dataset.num,
+      isShowType: num,
       activeIndex: e.target.dataset.index,
     });
     animation.translateY(0).step();
@@ -88,25 +121,25 @@ Page({
     });
 
   },
-  //图片选择
+   //图片选择
   openImg(e) {
-    var index = e.target.dataset.index;
-    var files = that.data.items[index].files;
-    // var files_box = `items[${index}].files`;
+    var index2 = e.target.dataset.index;
+    var files = that.data.items[index2].files;
     if (files.length >= 3) {
-      app.globalData.showToast("最多能选择一张!");
+      app.globalData.showToast("只能上传三张");
       return false;
     }
     dd.chooseImage({
       count: 1,
       success: (res) => {
-        that.postImg(res, index);
+        console.log(res);
+          that.postImg(res.filePaths[0], index2);
       },
     });
   },
-  postImg(data, index) {
+  postImg(img_url,index) {
     var files_box = `items[${index}].files`;
-    dd.showLoading();
+    var files=this.data.items[index].files;
     dd.httpRequest({
       url: app.globalData.imgHttpUrl,
       method: 'POST',
@@ -121,7 +154,7 @@ Page({
           url: app.globalData.ALIOSS_URL,
           fileType: 'image',
           fileName: 'file',
-          filePath: data.filePaths[0],
+          filePath:img_url,
           formData: {
             key: key,
             policy: obj.policy,
@@ -131,12 +164,20 @@ Page({
           },
           success: (res) => {
             if (res.statusCode == 200) {
+              if(files.length>0){
+                files.push('http://cdn.intesys.g107.com/' + key)
+              }else{
+                files=['http://cdn.intesys.g107.com/' + key];
+              }
               that.setData({
-                [files_box]: ['http://cdn.intesys.g107.com/' + key]
+                [files_box]: files
               });
-              dd.hideLoading();
+             app.globalData.showToast("已上传");
             }
           },
+          fail:(err)=>{
+            console.log(err);
+          }
         });
 
       },
@@ -238,8 +279,8 @@ Page({
       remark: '',
       event_time: app.globalData.day,
       pt_id: '',
-      reviewer_id: '',
-      revieweName: '',
+      reviewer_id:'',//审核人ID
+      revieweName:'',//审批人姓名(非传)
       files: '',
       isArrindex: true,
       isArrindex2: true,
@@ -259,11 +300,11 @@ Page({
     var userData = this.data.users;
     var arr = [];
     var isTg = true;
-    var pt_id = app.getTypesItem("BF").id;
-    if (userData.id == '' || userData.id == null || userData.id == undefined) {
+    var pt_id =app.getTypesItem(this.data.isGzType).id
+    if(userData.length==0){
       this.showToast('请输入录入对象')
       return;
-    };
+    }
     for (var i = 0; i < items.length; i++) {
       var obj = {};
       var item = items[i];
@@ -277,6 +318,7 @@ Page({
         }
         if (point < item.selectRule.min_point || point > item.selectRule.max_point) {
           this.showToast(`第${i + 1}项,积分超出可输入范围`);
+          isTg = false;
         }
       } else {
         if (item.isArrindex2 != true) {
@@ -315,29 +357,50 @@ Page({
       obj.remark = item.remark;
       obj.event_time = item.event_time;
       obj.pt_id = pt_id;
-      obj.reviewer_id = item.reviewer_id;
+      obj.reviewer_id = item.reviewer_id? item.reviewer_id:0;
       obj.files = item.files;
       arr.push(obj);
     }
+    var userIds=[]
+    userData.map(item=>{
+      userIds.push(item.id)
+    })
     if (isTg) {
       var data = {
-        members: JSON.stringify([userData.id]),
+        members: JSON.stringify(userIds),
         items: JSON.stringify(arr)
       }
-      app.$post("api/integral/point/entry", data).then((res) => {
-        var is = true;
-        res.data.data.list.forEach(item => {
-          if (item.status != 1) {
-            is = false;
-            this.showToast(item.msg);
-          }
-        })
+      this.setData({disabled:true});
+      var url=this.data.type=='B'? 'api/integral/point/entry':'api/integral/review/a/entry'
+      app.$post(url, data).then((res) => {
+        var is = true,msg;
+        if(this.data.type=='B'){
+          res.data.data.list.forEach(item => {
+            if (item.status != 1) {
+              is = false;
+              msg=item.msg;
+            }
+          })
+        }else{
+          res.data.data.forEach(item => {
+            if (item.status != 1) {
+              is = false;
+              msg=item.rule_item;
+            }
+          })
+        }
         if (is) {
           this.showToast('已提交');
-          dd.navigateBack({
-            delta: 1
-          })
+          setTimeout(() => {
+            this.setData({disabled:false});
+            dd.navigateBack({ delta: 1})
+          }, 1000);
+        }else{
+          this.setData({disabled:false});
+          this.showToast(msg);
         }
+      }).catch(err=>{
+          this.setData({disabled:false});
       })
     }
   },
@@ -364,18 +427,50 @@ Page({
   },
   //选择人
   onSelectUser(item) {
+    //空数据
+    this.data.items.forEach((obj,index)=>{
+      var reviewer_id = `items[${index}].reviewer_id`
+      var revieweName = `items[${index}].revieweName`
+      if(obj.reviewer_id){
+        that.setData({
+          [reviewer_id]: '',
+          [revieweName]: '',
+        });
+      }
+    })
     this.setData({
-      users: item[0]
+        users: elm,
+        superior_list:[]
     })
+    var elm=item.length>0? item:[];
+    var arr=[],employeeList=this.data.employeeList;
+    if(item.length>0){
+      if(employeeList.length>0){
+        employeeList.forEach(item=>{
+          elm.forEach(item2=>{
+            if(item.id==item2.id){
+              arr.push(item.superior_list)
+            }
+          })
+        })
+      }
+      var superior_list=this.intersection(arr);
+      this.setData({
+          users: elm,
+          superior_list:superior_list
+      })
+    }
+
   },
   //选择人2
   onSelectUser2(item) {
+    var elm=item.length>0? item[0]:{id:'',name:''};
     var index = this.data.activeIndex;
     var reviewer_id = `items[${index}].reviewer_id`
     var revieweName = `items[${index}].revieweName`
     that.setData({
-      [reviewer_id]: item[0].id,
-      [revieweName]: item[0].name,
+      [reviewer_id]: elm.id,
+      [revieweName]: elm.name,
     });
   },
 
@@ -413,5 +508,24 @@ Page({
       [rule_id]: item.rule_id,
       [item_id]: item.id,
     });
+  },
+      //获取人员列表
+  getEmployeeList() {
+      app.$get("api/employee/list").then((res) => {
+      this.setData({
+          employeeList:res.data.data.list
+        })
+      })
+  },
+  intersection (arr) {
+      const arrSet = []
+      const intersectionSet = new Set()
+      arr.forEach(items => {
+        arrSet.push(new Set(items.map(item => item.id)))
+        items.forEach(item => intersectionSet.add(item.id))
+      })
+
+      return [...intersectionSet].filter(item => arrSet.every(set => set.has(item)))
   },
 });
+

+ 3 - 4
pages/workbench/jk_B/jk_B.json

@@ -2,8 +2,7 @@
   "usingComponents": {
     "select-rule":"/Component/selectRule/selectRule",
     "select-type":"/Component/selectType/selectType",
-    "select-section-staff-two":"/Component/selectSectionStaff_tow/selectSectionStaff_tow"
-  },
-   "component": true
-
+    "select-section-staff-two":"/Component/selectSectionStaff_tow/selectSectionStaff_tow",
+    "select-section-staff":"/Component/selectSectionStaff/selectSectionStaff"
+  }
 }

+ 5 - 5
pages/workbench/my_approve/my_approve.acss

@@ -41,7 +41,6 @@
 .selectItems .flex-1 {
   padding: 16rpx 0;
   text-align: center;
-  font-size: 26rpx;
   position: relative;
 }
 
@@ -49,12 +48,13 @@
   position: absolute;
   content: " ";
   height: 4rpx;
-  width: 100rpx;
+  width: 120rpx;
   background: #26A2FF;
   bottom: 0rpx;
 }
 .li {
   padding: 24rpx 28rpx;
+  padding-bottom: 0rpx;
 }
 .main{
   background: #fff;
@@ -73,13 +73,13 @@
   text-overflow: ellipsis;
   display: -webkit-box;
   -webkit-line-clamp: 2;
-  font-size: 24rpx;
+  font-size: 28rpx;
   -webkit-box-orient: vertical;
   padding: 10rpx 0;
 }
 
 .main-right .date {
-  font-size: 24rpx;
+  font-size: 28rpx;
   color: #909399;
 }
 
@@ -89,7 +89,7 @@
 }
 
 .main-right text:nth-child(1) {
-  margin-right: 20rpx;
+  padding: 24rpx 32rpx;
 }
 
 .index {

+ 18 - 16
pages/workbench/my_approve/my_approve.axml

@@ -2,7 +2,7 @@
   <view class="header margin-bottom">
     <view class="search flex-box flex-v-ce">
       <image mode="scaleToFill" src="../../../image/ss.png"/>
-      <input placeholder="请输入姓名或内容" onInput="bindKeyInput"  onConfirm="bindKeyInput" class="flex-1"/>
+      <input placeholder="请输入姓名或内容" onInput="bindKeyInput" onConfirm="bindKeyInput" class="flex-1"/>
     </view>
     <view class="flex-box flex-v-ce selectItems border-bottom">
       <view data-index="1" class="{{activeIndex == 1? 'active':''}} flex-1" catchTap="activeItem">待我审批</view>
@@ -32,22 +32,23 @@
           </view>
         </view>
       </view>
+      <view class="noDatas" a:if="{{isData}}">没有更多咯</view>
     </scroll-view>
     <scroll-view class="scroll" scroll-y="{{true}}" a:if="{{dataList.length>0&&activeIndex==2}}" onScrollToLower="onScrollToLower">
       <view class="flex-box li border-bottom" data-item="{{item}}" catchTap="openDetail" a:for="{{dataList}}">
         <img-box name="{{item.employee_name}}" height="70rpx" width="70rpx" fSize="24rpx"></img-box>
         <view class="flex-1 main-right">
           <view class="flex-box flex-v-ce">
-          <view class="name flex-1" a:if="{{item.source_type == 2}}">{{item.employee_name}}提交的积分申请</view>
-          <view class="name flex-1" a:if="{{item.source_type == 1}}">{{item.employee_name}}完成的积分任务</view>
-          <view class="name flex-1" a:if="{{item.source_type == 3}}">{{item.employee_name}}提交的积分奖扣</view>
-          <view class="name flex-1" a:if="{{item.source_type == 4}}">{{item.employee_name}}提交的绩效工作</view>
+            <view class="name flex-1" a:if="{{item.source_type == 2}}">{{item.employee_name}}提交的积分申请</view>
+            <view class="name flex-1" a:if="{{item.source_type == 1}}">{{item.employee_name}}完成的积分任务</view>
+            <view class="name flex-1" a:if="{{item.source_type == 3}}">{{item.employee_name}}提交的积分奖扣</view>
+            <view class="name flex-1" a:if="{{item.source_type == 4}}">{{item.employee_name}}提交的绩效工作</view>
             <block a:if="{{item.status==1}}">
-            <view class="red" a:if="{{item.review_point>0}}">+{{item.review_point}}</view>
-            <view class="green" a:else>{{item.review_point}}</view>
+              <view class="red" a:if="{{item.review_point>0}}">+{{item.review_point}}</view>
+              <view class="green" a:else>{{item.review_point}}</view>
             </block>
           </view>
-           <view class="context" a:if="{{item.remark.customize}}">{{item.remark.customize}}</view>
+          <view class="context" a:if="{{item.remark.customize}}">{{item.remark.customize}}</view>
           <view class="context" a:else>{{item.remark.rule}}</view>
           <view class="flex-box flex-v-ce">
             <view class="date flex-1">{{item.event_time}}</view>
@@ -56,19 +57,20 @@
           </view>
         </view>
       </view>
+      <view class="noDatas" a:if="{{isData}}">没有更多咯</view>
     </scroll-view>
   </view>
   <!-- 弹出框 -->
   <view class="windows" a:if="{{isBh}}">
     <view class="windows-box">
-        <view class="windows-title">确认驳回</view>
-        <view class="windows-content">
-            <textarea value="{{textArea}}" onBlur="bindTextAreaBlur" maxlength="50" placeholder="请输入审批意见"/>
-        </view>
-        <view class="windows-btn flex-box flex-v-ce">
-          <view class="flex-1" catchTap="closeBh">取消</view>
-          <view class="flex-1" catchTap="confirmBh">确定</view>
-        </view>      
+      <view class="windows-title">确认驳回</view>
+      <view class="windows-content">
+        <textarea value="{{textArea}}" onInput="bindTextAreaBlur" maxlength="50" placeholder="请输入审批意见"/>
+      </view>
+      <view class="windows-btn flex-box flex-v-ce">
+        <view class="flex-1" catchTap="closeBh">取消</view>
+        <view class="flex-1" catchTap="confirmBh">确定</view>
+      </view>
     </view>
   </view>
 </view>

+ 17 - 21
pages/workbench/my_approve/my_approve.js

@@ -16,6 +16,9 @@ Page({
     dd.setNavigationBar({ title: "我的审批" });
   },
   onShow() {
+    this.setData({
+       page: 1,
+    });
     that.getData();
   },
   bindTextAreaBlur(e) {
@@ -25,7 +28,7 @@ Page({
   },
   confirmBh() {
     var item = that.data.bhItem;
-    if (!that.data.textArea) {
+    if (that.data.textArea=='') {
       app.globalData.showToast("请输入审批意见");
       return;
     }
@@ -33,14 +36,13 @@ Page({
       that.closeBh()
       app.globalData.showToast("已驳回");
       setTimeout(() => {
-          that.setData({textArea:'', page: 1});
-          that.getData();
+        that.setData({ textArea: '', page: 1 });
+        that.getData();
       }, 1000);;
-      
     })
   },
   closeBh() {
-    this.setData({ isBh: false })
+    this.setData({ isBh: false,textArea:''})
   },
   openBh(e) {
     var item = e.target.dataset.item;
@@ -78,7 +80,7 @@ Page({
     })
   },
   getData(type) {
-    app.$get("api/integral/review/list", { type: that.data.httpType, page: that.data.page, pt_id: 0, keyword: that.data.keyword }).then((res) => {
+    app.$get("api/integral/review/list", { type: that.data.httpType, page: that.data.page, pt_id: 0, page_size: 20, keyword: that.data.keyword }).then((res) => {
       var data = res.data.data.list || [];
       var dataList = that.data.dataList || [];
       if (type == '2') {
@@ -87,27 +89,21 @@ Page({
             dataList: dataList.concat(data)
           })
         } else {
-          app.globalData.showToast("已无更多咯");
+          this.setData({ isData: true })
           return;
         }
-      } else if (type == '1'){
-        this.setData({ dataList: data })
-        if (type == '1') {
-          dd.stopPullDownRefresh()
-        }
-      }else{
-        this.setData({ dataList: data })
+      } else {
+        this.setData({ dataList: data,isData: false })
       }
     })
   },
-  //下拉刷新
-  onPullDownRefresh() {
-    this.setData({ page: 1 })
-    this.getData("1");
-  },
   //上啦加载
   onScrollToLower() {
-    this.setData({ page: ++that.data.page })
-    this.getData("2");
+    if (!that.data.isData) {
+      this.setData({ page: ++that.data.page })
+      this.getData("2");
+    } else {
+      app.globalData.showToast("已无更多咯");
+    }
   },
 });

+ 6 - 6
pages/workbench/prize_buckle/prize_buckle.acss

@@ -27,7 +27,7 @@
   color: #222;
   position: relative;
   padding: 0rpx 16rpx 28rpx 16rpx;
-  font-size: 24rpx;
+  font-size: 28rpx;
 }
 .title::before{
   position: absolute;
@@ -57,7 +57,7 @@
   color: #303133;
 }
 .text1{
-  font-size: 24rpx;
+  font-size: 28rpx;
   margin-left: 30rpx;
   position: relative;
 }
@@ -73,7 +73,7 @@
   border-radius: 50rpx;
 }
 .text2{
-  font-size: 24rpx;
+  font-size: 28rpx;
   margin-left: 30rpx;
   position:  relative;
 }
@@ -99,7 +99,7 @@
   border-radius: 6rpx;
   background: #67C23A;
   color: #fff;
-  font-size: 20rpx;
+  font-size: 24rpx;
   padding: 0 6rpx;
 }
 .num{
@@ -109,11 +109,11 @@
 .jiangfen{
   color: #303133;
   position: relative;
-  font-size: 24rpx;
+  font-size: 28rpx;
 }
 .target{
   color: #909399;
-  font-size: 22rpx;
+  font-size: 24rpx;
 }
 /* .jiangfen::after{
   position: absolute;

+ 1 - 1
pages/workbench/prize_buckle/prize_buckle.axml

@@ -10,7 +10,7 @@
       <view class="flex-box flex-v-ce">
         <img-box name="{{userData.name}}" imgUrl="{{userData.img_url}}" height="70rpx" width="70rpx" fSize="24rpx"></img-box>
         <view class="name">{{userData.name}}</view>
-        <text class="index">全部指标</text>
+        <text class="index" a:if="{{isDb}}">全部达标</text>
       </view>
       <view class="flex-box flex-v-ce target_items">
         <view class="flex-1">

+ 22 - 13
pages/workbench/prize_buckle/prize_buckle.js

@@ -7,11 +7,11 @@ Page({
   data: {
     date: app.globalData.month,
     employee_id:0,
+    isDb:false,
   },
   onLoad(e) {
     that = this;
     dd.setNavigationBar({ title: "奖扣统计" });
-    console.log(e);
     if (e.id && e.month) {
       that.setData({
         date: e.month,
@@ -32,11 +32,11 @@ Page({
     });
     chart1.legend(false);
     chart1.axis('time', {
-      line: {
-        lineWidth: 2,
-        stroke: '#F56C6C',
-        top: true, // 展示在最上层
-      },
+      // line: {
+      //   lineWidth: 2,
+      //   stroke: '#F56C6C',
+      //   top: true, // 展示在最上层
+      // },
       label: function label(text, index, total) {
         const textCfg = {};
         if (index === 0) {
@@ -47,7 +47,7 @@ Page({
         return textCfg;
       },
     });
-    chart1.line().position('time*value').color('type');
+    chart1.line().position('time*value').color('type', [ '#F56C6C', '#67C23A']);
     chart1.render();
     return chart1;
   },
@@ -62,11 +62,11 @@ Page({
     });
     chart2.legend(false);
     chart2.axis('time', {
-      line: {
-        lineWidth: 2,
-        stroke: '#F56C6C',
-        top: true, // 展示在最上层
-      },
+      // line: {
+      //   lineWidth: 2,
+      //   // stroke: '#F56C6C',
+      //   top: true, // 展示在最上层
+      // },
       label: function label(text, index, total) {
         const textCfg = {};
         if (index === 0) {
@@ -77,7 +77,7 @@ Page({
         return textCfg;
       },
     });
-    chart2.line().position('time*value').color('type');
+    chart2.line().position('time*value').color('type', [ '#F56C6C', '#67C23A']);
     chart2.render();
     return chart2;
   },
@@ -89,6 +89,13 @@ Page({
       dd.setNavigationBar({ title: data.name });
       var ratio = task.reward.point === 0 || task.deduction.point === 0 ? '-' : `${task.ratio.ratio}:1`
       var target_ratio = task.ratio.target_ratio <= 0 ? '0:0' : `${task.ratio.target_ratio}:1`
+      if(data.task.reward.point>data.task.reward.target_point&&data.task.deduction.point>data.task.deduction.target_point&&data.task.exec.count>data.task.exec.target_count){
+          if(task.ratio.ratio>task.ratio.target_ratio){
+              this.setData({
+                isDb: true
+              }) 
+          }
+      }
       data.ratio = {
         ratio: ratio,
         target_ratio: target_ratio
@@ -133,6 +140,8 @@ Page({
         that.setData({
           date: res.date
         })
+          that.getUserData();
+          that.getIncidentLsit();
       },
     });
   }

+ 2 - 3
pages/workbench/statistics_A/statistics_A.acss

@@ -38,7 +38,7 @@
 .head .flex-1 view:nth-child(2){
   color: #C0C4CC;
   margin-bottom: 5rpx;
-  font-size: 24rpx;
+  font-size: 28rpx;
 }
 .headed{
   background-color: #fff;
@@ -51,7 +51,7 @@
   color: #222;
   position: relative;
   padding: 0rpx 16rpx 28rpx 16rpx;
-  font-size: 24rpx;
+  /* font-size: 24rpx; */
 }
 .title::before{
   position: absolute;
@@ -88,5 +88,4 @@
 }
 .gengduo{
   color: #303133;
-  font-size: 24rpx;
 }

+ 4 - 2
pages/workbench/statistics_A/statistics_A.axml

@@ -10,7 +10,7 @@
     </view>
     <view class="flex-1">
       <view>{{data_a.total_point}}</view>
-      <view>计A分</view>
+      <view>计A分</view>
     </view>
   </view>
   <view class="headed margin-bottom">
@@ -30,13 +30,15 @@
   <view class="main">
       <view class="flex-box">
          <view class="title flex-1">近半年的A分</view>
-         <view class="gengduo">更多<image mode="scaleToFill"  src="../../../image/right.png"/></view>
+         <view class="gengduo" catchTap="openMore">更多<image mode="scaleToFill"  src="../../../image/right.png"/></view>
       </view>
       <view>
           <view class="flex-box list" a:for="{{dataList}}">
+          <block a:if="{{index<=4}}">
             <view class="text flex-1">{{item.remark}}</view>
             <view class="num red" a:if="{{item.point>0}}">+{{item.point}}</view>
             <view class="num green" a:else>{{item.point}}</view>
+            </block>
           </view>
            <no-data a:if="{{dataList.length==0}}" content="无数据"/>
       </view>

+ 8 - 2
pages/workbench/statistics_A/statistics_A.js

@@ -10,8 +10,13 @@ Page({
   },
   onLoad() {
     that = this;
-    dd.setNavigationBar({ title: "我的B分统计" });
-    that.getIncidentLsit();
+    dd.setNavigationBar({ title: "我的A分统计" });
+  },
+  //打开更多
+  openMore(){
+    dd.navigateTo({
+      url: '../../statistics/integralEvent/integralEvent?month=' + this.data.date + '&type=AF'
+    })
   },
   //则线图
   onInitChart(F2, config) {
@@ -28,6 +33,7 @@ Page({
       lineWidth: 1
     });
     chart1.render();
+    that.getIncidentLsit();
     return chart1;
   },
   //时间选择

+ 1 - 3
pages/workbench/statistics_B/statistics_B.acss

@@ -38,7 +38,7 @@
 .head .flex-1 view:nth-child(2){
   color: #C0C4CC;
   margin-bottom: 5rpx;
-  font-size: 24rpx;
+  font-size: 28rpx;
 }
 .headed{
   background-color: #fff;
@@ -51,7 +51,6 @@
   color: #222;
   position: relative;
   padding: 0rpx 16rpx 28rpx 16rpx;
-  font-size: 24rpx;
 }
 .title::before{
   position: absolute;
@@ -88,5 +87,4 @@
 }
 .gengduo{
   color: #303133;
-  font-size: 24rpx;
 }

+ 15 - 11
pages/workbench/statistics_B/statistics_B.axml

@@ -10,7 +10,7 @@
     </view>
     <view class="flex-1">
       <view>{{data_b.total_point}}</view>
-      <view>计B分</view>
+      <view>计B分</view>
     </view>
   </view>
   <view class="headed margin-bottom">
@@ -37,14 +37,16 @@
   <view class="main margin-bottom">
       <view class="flex-box">
          <view class="title flex-1">奖分最多</view>
-         <view class="gengduo">更多<image mode="scaleToFill"  src="../../../image/right.png"/></view>
+         <view class="gengduo" catchTap="openMore">更多<image mode="scaleToFill"  src="../../../image/right.png"/></view>
       </view>
       <view>
           <view class="flex-box list" a:for="{{data_good}}">
-            <view class="text flex-1" a:if="{{item.remark.customize}}">{{item.remark.customize}}</view>
-            <view class="text flex-1" a:else>{{item.remark.rule}}</view>
-            <view class="num red" a:if="{{item.point>0}}">+{{item.point}}</view>
-            <view class="num green" a:else>{{item.point}}</view>
+            <block a:if="{{index<=4}}">
+              <view class="text flex-1" a:if="{{item.remark.customize}}">{{item.remark.customize}}</view>
+              <view class="text flex-1" a:else>{{item.remark.rule}}</view>
+              <view class="num red" a:if="{{item.point>0}}">+{{item.point}}</view>
+              <view class="num green" a:else>{{item.point}}</view>
+            </block>
           </view>
           <no-data a:if="{{data_good.length==0}}" content="无数据" />
       </view>
@@ -52,14 +54,16 @@
     <view class="main">
       <view class="flex-box">
          <view class="title flex-1">扣分最多</view>
-         <view class="gengduo">更多<image mode="scaleToFill" src="../../../image/right.png"/></view>
+         <view class="gengduo" catchTap="openMore">更多<image mode="scaleToFill" src="../../../image/right.png"/></view>
       </view>
       <view>
           <view class="flex-box list" a:for="{{data_bad}}">
-            <view class="text flex-1" a:if="{{item.remark.customize}}">{{item.remark.customize}}</view>
-            <view class="text flex-1" a:else>{{item.remark.rule}}</view>
-            <view class="num red" a:if="{{item.point>0}}">+{{item.point}}</view>
-            <view class="num green" a:else>{{item.point}}</view>
+            <block a:if="{{index<=4}}">
+              <view class="text flex-1" a:if="{{item.remark.customize}}">{{item.remark.customize}}</view>
+              <view class="text flex-1" a:else>{{item.remark.rule}}</view>
+              <view class="num red" a:if="{{item.point>0}}">+{{item.point}}</view>
+              <view class="num green" a:else>{{item.point}}</view>
+            </block>
           </view>
            <no-data a:if="{{data_bad.length==0}}" content="无数据" />
       </view>

+ 22 - 18
pages/workbench/statistics_B/statistics_B.js

@@ -8,12 +8,19 @@ Page({
     date: app.globalData.month,
     data_b: [],
     chartData: [],//折线图数据
-    pieData: [],//饼型图数据
+    pieData: [1],//饼型图数据
   },
   onLoad() {
     that = this;
+    chart1,chart2='';
     dd.setNavigationBar({ title: "我的B分统计" });
-    that.getIncidentLsit();
+  
+  },
+    //打开更多
+  openMore(){
+    dd.navigateTo({
+      url: '../../statistics/integralEvent/integralEvent?month=' + this.data.date + '&type=BF'
+    })
   },
   //则线图
   onInitChart(F2, config) {
@@ -35,14 +42,6 @@ Page({
   //饼型图
   onInitChart2(F2, config) {
     chart2 = new F2.Chart(config);
-    // const map = {
-    //   芳华: '40%',
-    //   妖猫传: '20%',
-    //   机器之血: '18%',
-    //   心理罪: '15%',
-    //   寻梦环游记: '5%',
-    //   其他: '2%'
-    // };
     chart2.source(that.data.pieData, {
       percent: {
         formatter: function formatter(val) {
@@ -52,9 +51,15 @@ Page({
     });
     chart2.legend({
       position: 'right',
-      // itemFormatter: function itemFormatter(val) {
-      //   return val + '  ' + map[val];
-      // }
+      itemFormatter: function itemFormatter(val,index) {
+        var str='';
+        that.data.pieData.forEach(item=>{
+          if(item.name==val){
+              str=val + '  ' + item.percent+'分';
+          }
+        })
+        return str;
+      }
     });
     chart2.tooltip(false);
     chart2.coord('polar', {
@@ -71,6 +76,7 @@ Page({
       });
     chart2.render();
     // 注意:需要把chart return 出来
+    that.getIncidentLsit();
     return chart2;
   },
   //时间选择
@@ -94,7 +100,7 @@ Page({
       if (resArr[0].data.code == 1) {
         const { b, chart, good, bad } = resArr[0].data.data
         const points = chart.reward.map((rewardItem, index) => {
-          return { date: rewardItem.month, value: rewardItem.point + (chart.deduction[index].point || 0) }
+          return { date: rewardItem.month, value: rewardItem.point - (chart.deduction[index].point || 0) }
         })
         chart1.changeData(points);
         that.setData({
@@ -107,14 +113,12 @@ Page({
         let totalPoint = 0
         const pieData = resArr[1].data.data.list.map((item, index) => {
           totalPoint += item.point
-          return { name: item.name, percent: item.point, a: '1' }
+          return { name: item.name, percent: item.point<0? 0:item.point, a: '1' }
         })
         that.setData({
           pieData: pieData
         });
-        if (pieData.length > 0) {
-          chart2.changeData(pieData);
-        }
+        chart2.changeData(pieData);
       }
     }).catch(e => {
       console.error(e)

+ 1 - 1
utils/feedback.js

@@ -1,4 +1,4 @@
-export function showToast(text='',type='none',date=3000){
+export function showToast(text='',type='none',date=2000){
   dd.showToast({
      type: type,
      content: text,