wagesuser.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  1. <template>
  2. <div style="background-color: #FFFFFF;">
  3. <!-- <div class="top" @click="ret()">
  4. <div style="width: 10%;height: 5px;"></div>
  5. <div style="margin-left: 10px;">
  6. <span style="float: left;width: 20px;height: 20px;">
  7. <image src="../../static/icon/fanhui3.png" style="width: 18px;height: 18px;"></image>
  8. </span>
  9. <div style="margin-top: 5px;">
  10. <span style="color: #FFFFFF;">返回</span>
  11. </div>
  12. </div>
  13. <div style="text-align: center;margin-top: -22px;">
  14. <span style="color: #FFFFFF;">工资发放情况</span>
  15. </div>
  16. </div> -->
  17. <cu-custom bgColor="bg-gradual-pink" :isBack="true">
  18. <block slot="backText">返回</block>
  19. <block slot="content" >工资发放情况</block>
  20. </cu-custom>
  21. <div class="ins">
  22. <div style="height: 3px;"></div>
  23. <input placeholder="🔍 搜索" style="text-align: center;" v-model="name" />
  24. </div>
  25. <br>
  26. <div>
  27. <span style="color: #0081FF;margin-left: 20px;font-size: 18px;">工资发放情况</span>
  28. <div style="width: 100%;height: 10px;"></div>
  29. </div>
  30. <div style="width: 100%;height: 10px;background-color:#F1F1F1 ;"></div>
  31. <view class="cu-list menu radius" >
  32. <view class="cu-item "v-for='(item,index) in data'>
  33. <navigator class="content" @click="details(item.id)" hover-class="none">
  34. <div style="margin-top: -10px;">
  35. <span class="imgs">
  36. <image :src="item.avatar" class="imgs"></image>
  37. </span>
  38. </div>
  39. <div style="margin-top: -40px;">
  40. <text style="margin-left: 30%;">{{item.realname}}</text>
  41. </div>
  42. <div style="margin-top: -25px;">
  43. <text class="text-grey" style="margin-left: 60%;">{{item.orgCodeTxt}}</text>
  44. </div>
  45. </navigator>
  46. </view>
  47. </view>
  48. <!-- <div style="margin-left: 10px;">
  49. <ul>
  50. <li class="s" v-for='(item,index) in data' @click="details(item.id)">
  51. <br>
  52. <span class="imgs">
  53. <image :src="item.avatar" class="imgs"></image>
  54. </span>
  55. <div style="margin-left: 50px;margin-top: -40px;">
  56. <div>
  57. <h3>{{item.realname}}</h3>
  58. </div>
  59. <div style="margin-top: -27px;margin-left: 80px;">
  60. <span style="margin-left: 15%;color: #0081FF;font-size: 15px;">{{item.orgCodeTxt}}</span>
  61. <span style="float: right;width: 20px;height: 10px;"></span>
  62. </div>
  63. </div>
  64. <br>
  65. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
  66. </li>
  67. </ul>
  68. </div> -->
  69. </div>
  70. </template>
  71. <script>
  72. import api from '@/api/api'
  73. export default {
  74. data() {
  75. return {
  76. name:'',
  77. data:[],
  78. userUrl:'/sys/user/querywagesList'
  79. }
  80. },
  81. watch:{
  82. name:{
  83. handler(newVal, objVal) {
  84. this.querys(newVal);
  85. },
  86. }
  87. },
  88. created(){
  89. this.query()
  90. },
  91. methods:{
  92. ss(){
  93. this.$Router.push({name:'dome'})
  94. },
  95. // 返回 类似 2016-01-02 格式的字符串
  96. formatDate: function(year, month, day) {
  97. var y = year
  98. var m = month
  99. if (m < 10) m = '0' + m
  100. var d = day
  101. if(day!=null &&day !=""){
  102. if (d < 10) d = '0' + d
  103. return y + '-' + m + '-' + d
  104. }else{
  105. return y + '-' + m
  106. }
  107. },
  108. details(item){
  109. this.$store.commit('SET_WAGESID',item);
  110. this.$Router.push({name:'wagesdetail2'})
  111. },
  112. query(){
  113. this.data=[];
  114. this.$http.get(this.userUrl,{params:{username:this.name}}).then(res=>{
  115. if(res.data.length>0){
  116. for(var i=0;i<res.data.length;i++){
  117. var s={
  118. id:res.data[i].id,
  119. realname:res.data[i].realname,
  120. post:res.data[i].post,
  121. avatar:(res.data[i].avatar && res.data[i].avatar.length > 0)? api.getFileAccessHttpUrl(res.data[i].avatar):'/static/avatar_boy.png',
  122. orgCodeTxt:res.data[i].orgCodeTxt,
  123. del:res.data[i].del
  124. }
  125. this.data.push(s)
  126. }
  127. }
  128. }).catch(err => {
  129. console.log(err);
  130. });
  131. },
  132. querys(s){
  133. this.data=[];
  134. this.$http.get(this.userUrl,{params:{username:s}}).then(res=>{
  135. if(res.data.length>0){
  136. for(var i=0;i<res.data.length;i++){
  137. var s={
  138. id:res.data[i].id,
  139. realname:res.data[i].realname,
  140. post:res.data[i].post,
  141. avatar:(res.data[i].avatar && res.data[i].avatar.length > 0)? api.getFileAccessHttpUrl(res.data[i].avatar):'/static/avatar_boy.png',
  142. orgCodeTxt:res.data[i].orgCodeTxt,
  143. del:res.data[i].del
  144. }
  145. this.data.push(s)
  146. }
  147. }
  148. }).catch(err => {
  149. console.log(err);
  150. });
  151. },
  152. ret(){
  153. this.$Router.push({name:'index'})
  154. }
  155. }
  156. }
  157. </script>
  158. <style>
  159. .month ul {
  160. margin: 0;
  161. padding: 0;
  162. display: flex;
  163. justify-content: space-between;
  164. height: 35px;
  165. }
  166. .year-month {
  167. display: flex;
  168. align-items: center;
  169. justify-content: space-around;
  170. margin-top: 10px;
  171. }
  172. .choose-month {
  173. text-align: center;
  174. font-size: 12px;
  175. }
  176. .arrow {
  177. padding: 15px;
  178. color: #999999;
  179. }
  180. .month ul li {
  181. font-size: 12px;
  182. text-transform: uppercase;
  183. letter-spacing: 3px;
  184. }
  185. #calendar {
  186. font-size: 12px;
  187. width: 100%;
  188. margin: 0 auto;
  189. box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.1),
  190. 0 1px 5px 0 rgba(0, 0, 0, 0.12);
  191. }
  192. .month {
  193. width: 100%;
  194. color: #333333;
  195. background: #ffffff;
  196. }
  197. .ins{
  198. background-color: #F1F1F1;
  199. width: 90%;
  200. height: 30px;
  201. margin:0 auto;
  202. border-radius:5px 5px 5px 5px;
  203. margin-top: 10px;
  204. }
  205. .s{
  206. list-style-type:none;
  207. margin-left: -40px;
  208. }
  209. .imgs{
  210. width: 40px;
  211. height: 40px;
  212. border-radius:5px 5px 5px 5px;
  213. }
  214. .top{
  215. background-color: #5677AC;
  216. width: 100%;
  217. height: 40px;
  218. }
  219. </style>