pettyAccount.vue 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  1. //备用金账户
  2. <template>
  3. <div class="container">
  4. <el-row class="row_top">
  5. <el-col :span="12">
  6. <h2 class="bg-left title">备用金账户</h2>
  7. </el-col>
  8. <el-col :span="12" class="bg-right">
  9. <el-button class="bg-bottom" type="primary" size="small" @click="returnsales()"><img width="6" height="10"
  10. style="vertion-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
  11. </el-button>
  12. </el-col>
  13. </el-row>
  14. <div class="center">
  15. <el-row style="margin-bottom: 10px;display: flex;">
  16. <el-col :span="18">
  17. <el-button style="margin-left: 10px" @click="typeChange('')" :type="searchType == '' ? 'primary' : ''">全部
  18. </el-button>
  19. <el-button @click="typeChange(1)" :type="searchType == 1 ? 'primary' : ''">有余额</el-button>
  20. <el-button @click="typeChange(3)" :type="searchType == 3 ? 'primary' : ''">无余额</el-button>
  21. </el-col>
  22. <el-col :span="18">
  23. <div class="datascreen">
  24. <el-input style="width: 500px;" class="options_css" v-model="searchKeyWord" placeholder="可按员工姓名进行查找" clearable maxlength="500" type="input"
  25. @keyup.enter.native="find()"></el-input>
  26. <el-button class="find" type="primary" @click="find()"><img width="16" height="16" style="left: -8px"
  27. src="../../../public/img/sousuo.png" alt="" /></el-button>
  28. </div>
  29. </el-col>
  30. </el-row>
  31. <div class="fromdata">
  32. <el-table :data="tableData" stripe style="width: 100%">
  33. <el-table-column type="index" label="序号">
  34. <template scope="scope">
  35. <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
  36. <span v-else>{{ scope.$index + 1 }}</span>
  37. </template>
  38. </el-table-column>
  39. <el-table-column prop="userName" label="员工姓名">
  40. </el-table-column>
  41. <el-table-column prop="deptName" label="部门名称">
  42. </el-table-column>
  43. <el-table-column prop="amountMoney" label="账户余额(元)">
  44. </el-table-column>
  45. <el-table-column label="账单">
  46. <template slot-scope="scope">
  47. <span @click="billView(scope.row)" style="color:blue">查看</span>
  48. </template>
  49. </el-table-column>
  50. </el-table>
  51. </div>
  52. <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
  53. style="text-align: center" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper"
  54. :total="deptBudgetTotal">
  55. </el-pagination>
  56. <el-dialog width='30%' :visible.sync="dialogVisible" title="账单">
  57. <el-form ref="form" label-width="90px">
  58. <div v-if="pettAccount.expenseInfoList">
  59. <div v-for="item in pettAccount.expenseInfoList">
  60. <div class="flex">
  61. <div style="display: block;">
  62. <el-form-item>
  63. <span v-if="item.expensesType == 1">退款</span>
  64. <span v-else-if="item.expensesPurpose != 7 && item.expensesType == 2 ">付款</span>
  65. <span v-else-if="item.expensesType == 2">请款</span>
  66. </el-form-item>
  67. <el-form-item>
  68. {{item.costNo}}
  69. </el-form-item>
  70. </div>
  71. <div style="display:block">
  72. <el-form-item>
  73. {{item.amountMoney}}元
  74. </el-form-item>
  75. <el-form-item>
  76. {{item.createDate.split(" ")[0] }}
  77. </el-form-item>
  78. </div>
  79. </div>
  80. <div style="border-bottom:1px solid #ccc;margin-bottom:18px;"></div>
  81. </div>
  82. </div>
  83. <div style="margin-left:150px">
  84. <el-form-item>
  85. <el-button @click="dialogVisible=false">关闭</el-button>
  86. </el-form-item>
  87. </div>
  88. </el-form>
  89. </el-dialog>
  90. </div>
  91. </div>
  92. </template>
  93. <script>
  94. import WsUpload from '@/components/WsUpload'
  95. import {
  96. pettAccountList
  97. } from '@/model/profitable/index'
  98. export default {
  99. components: {
  100. WsUpload,
  101. },
  102. data() {
  103. return {
  104. value: '',
  105. tableData: [],
  106. tableData1: [],
  107. deptBudgetTotal: 0,
  108. currentPage: 1,
  109. pageSize: 10,
  110. showFlag: false,
  111. size: 100,
  112. expensesPurpose: '',
  113. recordList: [],
  114. dialogVisible: false,
  115. toExamineType: '',
  116. compId: localStorage.getItem('ws-pf_compId'),
  117. deptCircularPage: {},
  118. searchType: '',
  119. searchKeyWord: '',
  120. pettAccount:{},
  121. userName:'',
  122. title: '附件',
  123. title1: '',
  124. outtotal: 0,
  125. intotal: 0,
  126. fujianshow: false,
  127. statusdata: {},
  128. appendixIdss: [],
  129. appendixIdss1: '',
  130. approveStatus: false,
  131. currectdata: {},
  132. choiceObj: [],
  133. }
  134. },
  135. activated() {
  136. this.getList()
  137. },
  138. methods: {
  139. getList1() {
  140. this.currentPage = 1
  141. this.getList()
  142. },
  143. returnsales() {
  144. this.$router.go(-1)
  145. },
  146. typeChange(num) {
  147. this.searchType = num
  148. this.getList()
  149. },
  150. getList() {
  151. pettAccountList({
  152. compId: localStorage.getItem('ws-pf_compId'),
  153. searchKeyWord: this.searchKeyWord,
  154. expenseName:this.expenseName,
  155. currentPage: this.currentPage,
  156. pageSize: this.pageSize,
  157. searchType: this.searchType,
  158. })
  159. .toPromise()
  160. .then((response) => {
  161. this.tableData = response.records
  162. this.deptBudgetTotal = response.total
  163. })
  164. },
  165. billView(row){
  166. this.pettAccount = row
  167. this.dialogVisible = true
  168. },
  169. find() {
  170. this.currentPage = 1
  171. this.getList()
  172. },
  173. handleSizeChange(val) {
  174. console.log(`每页 ${val} 条`)
  175. this.pageSize = val
  176. this.getList()
  177. },
  178. handleCurrentChange(val) {
  179. this.currentPage = val
  180. console.log(`当前页: ${val}`)
  181. this.getList()
  182. },
  183. },
  184. }
  185. </script>
  186. <style lang="scss" scoped>
  187. .container {
  188. background: #e8ecf6;
  189. }
  190. .center {
  191. margin: 0 auto;
  192. background: #ffffff;
  193. // height: calc(100vh - 13vh);
  194. border-radius: 4px;
  195. padding: 20px 0;
  196. /deep/.el-table td,
  197. /deep/.el-table th {
  198. text-align: center;
  199. }
  200. }
  201. .row_top {
  202. background: #f6f7fc;
  203. border-radius: 4px;
  204. margin-bottom: 10px;
  205. .bg-left {
  206. padding-left: 30px;
  207. }
  208. .bg-right {
  209. padding-right: 10px;
  210. text-align: right;
  211. }
  212. .title {
  213. position: relative;
  214. }
  215. .title::before {
  216. content: '';
  217. display: inline-block;
  218. width: 5px;
  219. height: 30px;
  220. background: #5473e8;
  221. position: absolute;
  222. left: 0;
  223. }
  224. }
  225. .datascreen {
  226. display: flex;
  227. justify-content: right;
  228. .data_css {
  229. width: 40%;
  230. }
  231. .input_css {
  232. width: 50%;
  233. margin: 0 10px;
  234. }
  235. .find {
  236. margin-right: 10px;
  237. }
  238. }
  239. .fromdata {
  240. margin: 20px 0;
  241. overflow-y: scroll;
  242. height: 546px;
  243. }
  244. .top_info {
  245. margin: 10px 0 0 10px;
  246. min-width: 712px;
  247. .info_css {
  248. margin-right: 20px;
  249. }
  250. }
  251. .bg-right {
  252. padding-top: 15px;
  253. }
  254. .options_css {
  255. margin: 0 5px;
  256. }
  257. </style>