receiptManage.vue 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. <template>
  2. <div>
  3. <el-row class="handle-box" style="margin-bottom: 10px">
  4. <el-col :span="8">
  5. <div class="Pageform">
  6. <div class="formlabel">买受人</div>
  7. <div class="formvalue">
  8. <el-input v-model="search.buyerName" class="ch-input ch-input-size" placeholder="买受人" size="small" @keyup.enter.native="handleSearch()" />
  9. </div>
  10. </div>
  11. </el-col>
  12. <el-col :span="8">
  13. <div class="Pageform">
  14. <div class="formlabel">房屋</div>
  15. <div class="formvalue">
  16. <el-input v-model="search.houseName" class="ch-input ch-input-size" placeholder="房号" size="small" @keyup.enter.native="handleSearch()" />
  17. </div>
  18. </div>
  19. </el-col>
  20. <el-col :span="8">
  21. <div class="Pageform">
  22. <div class="formlabel">身份证</div>
  23. <div class="formvalue">
  24. <el-input v-model="search.buyerIdentityCard" class="ch-input ch-input-size" placeholder="身份证" size="small" @keyup.enter.native="handleSearch()" />
  25. </div>
  26. </div>
  27. </el-col>
  28. <el-col :span="8">
  29. <div class="Pageform">
  30. <div class="formlabel">批次号</div>
  31. <div class="formvalue">
  32. <el-input v-model="search.batchNumber" class="ch-input ch-input-size" placeholder="批次号" size="small" @keyup.enter.native="handleSearch()" />
  33. </div>
  34. </div>
  35. </el-col>
  36. </el-row>
  37. <el-row class="handle-box" style="margin-bottom: 10px;text-align: right">
  38. <el-col :span="24" style="margin-top: 20px">
  39. <el-button size="small" class="ch-button-warning" @click="handleReset()"><i class="el-icon-refresh" />&nbsp;重置</el-button>
  40. <el-button size="small" class="ch-button" @click="handleSearch()"><i class="el-icon-search" />&nbsp;查询</el-button>
  41. </el-col>
  42. </el-row>
  43. <el-row class="handle-box">
  44. <el-col :span="24">
  45. <el-table
  46. v-loading="loading"
  47. :data="AllData"
  48. row-class-name="g_table_row"
  49. border
  50. :header-cell-style="{background:'#f2f2f2'}"
  51. @selection-change="handleSelectionChange"
  52. >
  53. <el-table-column type="selection" width="55" />
  54. <el-table-column type="index" width="60" />
  55. <el-table-column label="批次号" prop="number" />
  56. <el-table-column label="买受人" prop="buyerName" width="200" />
  57. <el-table-column label="房屋" prop="houseName" width="200" />
  58. <el-table-column label="票据类型" prop="receiptTypeStr" />
  59. <el-table-column label="票面金额" prop="receiptMoney" />
  60. <el-table-column label="票据编号" prop="receiptNumber" width="200">
  61. <template scope="scope">
  62. <el-button size="mini" type="text" @click="downLoad(scope.row)">
  63. {{ scope.row.receiptNumber }}
  64. </el-button>
  65. </template>
  66. </el-table-column>
  67. <el-table-column label="经办人" prop="createdName" />
  68. <el-table-column label="经办时间" prop="createdAt" width="110" />
  69. <el-table-column label="票据状态" prop="receiptStatusStr">
  70. <template scope="scope">
  71. <span
  72. :style="{'color':scope.row.receiptStatusStr==='已红冲'?'red'
  73. :scope.row.receiptStatusStr==='已开'?'green':'gray'}"
  74. >
  75. {{ scope.row.receiptStatusStr }}
  76. </span>
  77. </template>
  78. </el-table-column>
  79. <el-table-column label="关联票号" prop="associationNumber" width="200">
  80. <template scope="scope">
  81. <el-button size="mini" type="text" @click="downLoad(scope.row)">
  82. {{ scope.row.associationNumber }}
  83. </el-button>
  84. </template>
  85. </el-table-column>
  86. </el-table>
  87. <div class="table-page">
  88. <el-pagination
  89. :current-page.sync="currentPage"
  90. :page-sizes="[10, 20, 50, 100]"
  91. :page-size="pageSize"
  92. background
  93. layout="total, sizes, prev, pager, next, jumper"
  94. :total="allpage"
  95. @size-change="handleSizeChange"
  96. @current-change="handleCurrentChange"
  97. />
  98. </div>
  99. </el-col>
  100. </el-row>
  101. </div>
  102. </template>
  103. <script>
  104. import Base from '@/views/base/base'
  105. import BaseData from '@/views/base/baseData'
  106. import constant from '@/static/utils/constant'
  107. export default {
  108. name: 'ReceiptManage',
  109. components: { },
  110. mixins: [Base, BaseData],
  111. data() {
  112. return {
  113. dc_key: ['RECEIPT_TYPE', 'RECEIPT_STATUS'],
  114. // 列表相关
  115. search: {
  116. },
  117. AllData: [],
  118. loading: false,
  119. // 弹框相关
  120. dialogVisible: false,
  121. dialogTitle: '新增',
  122. selected: [],
  123. excelFlag: false,
  124. dialogBatchVisible: false,
  125. dialogBatchTitle: ''
  126. }
  127. },
  128. mounted() {
  129. this.initDict(this.dc_key).then((res) => {
  130. this.getData()
  131. })
  132. },
  133. methods: {
  134. getData: function() {
  135. const _this = this
  136. _this.loading = true
  137. _this.AllData = []
  138. this.search.pageNum = this.currentPage
  139. this.search.pageSize = this.pageSize
  140. this.baseRequest('listByModel', this.search).then((res) => {
  141. if (res.data.rows) {
  142. res.data.rows.forEach(function(item) {
  143. const json = _this.getItemJson(item)
  144. _this.AllData.push(json)
  145. })
  146. _this.allpage = res.data.total
  147. }
  148. _this.loading = false
  149. }).catch((e) => {
  150. // console.log(e)
  151. })
  152. // this.initOutData()
  153. },
  154. handleSearch: function() {
  155. this.getData()
  156. },
  157. handleReset: function() {
  158. for (const i in this.search) {
  159. if (i !== 'pageNum' && i !== 'pageSize') {
  160. this.search[i] = ''
  161. }
  162. }
  163. this.handleSearch()
  164. },
  165. getItemJson: function(item) {
  166. item.number = item.batchNumber + '-' + item.roomSelectionNumber
  167. item.receiptTypeStr = this.dc_map.RECEIPT_TYPE[item.receiptType]
  168. item.receiptStatusStr = this.dc_map.RECEIPT_STATUS[item.receiptStatus]
  169. return item
  170. },
  171. handleView(val) {
  172. },
  173. handleSelectionChange(val) {
  174. this.selected = val
  175. },
  176. cancel: function() {
  177. this.dialogVisible = false
  178. },
  179. downLoad(row) {
  180. const url = constant.BASE_URI + '/ReceiptManageController/downLoadReceipt?id=' + row.id
  181. window.open(url, '_blank')
  182. },
  183. baseRequest(opUrl, postData) {
  184. return this.$channel.globeRequest('ReceiptManageController', opUrl, postData, 'project')
  185. }
  186. }
  187. }
  188. </script>
  189. <style lang="scss">
  190. .Pageform{
  191. display: flex;
  192. align-items: center;
  193. .formlabel{
  194. width: 15%;
  195. text-align: right;
  196. font-size:14px ;
  197. }
  198. .formvalue{
  199. width: 75%;
  200. display: flex;
  201. margin-left: 2%;
  202. .ch-input{
  203. width: 100%;
  204. }
  205. .zhi{
  206. width: 60px;
  207. text-align: center;
  208. }
  209. }
  210. }
  211. </style>
  212. <style scoped>
  213. .ch-input .el-input__inner {
  214. border-color: #32323A;
  215. }
  216. .ch-input-size {
  217. width: 150px;
  218. }
  219. .ch-button {
  220. border-color: #32323A;
  221. background-color: #32323A;
  222. color: #fff;
  223. }
  224. .ch-button-warning {
  225. margin-left: 10px;
  226. border-color: #E6A23C;
  227. background-color: #E6A23C;
  228. color: #fff;
  229. }
  230. .ch-button-export {
  231. margin-left: 10px;
  232. border-color: #98CC1F;
  233. background-color: #98CC1F;
  234. color: #fff;
  235. }
  236. /deep/.el-dialog__header {
  237. padding: 10px 20px;
  238. }
  239. /deep/.el-dialog__body {
  240. padding: 10px 20px;
  241. }
  242. </style>