list.vue 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. <template>
  2. <a-card :bordered="false" class="unitCollectionPaymentList-wrap">
  3. <!-- 搜索条件 -->
  4. <div class="table-page-search-wrapper">
  5. <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
  6. <a-row :gutter="15">
  7. <a-col :md="6" :sm="24">
  8. <a-form-item label="单位名称">
  9. <a-input id="unitCollectionPaymentList-purchaseNo" v-model.trim="queryParam.purchaseNo" allowClear placeholder="请输入单位名称"/>
  10. </a-form-item>
  11. </a-col>
  12. <a-col :md="6" :sm="24">
  13. <a-form-item label="单位类型">
  14. <v-select
  15. v-model="queryParam.billStatus"
  16. ref="billStatus"
  17. id="unitCollectionPaymentList-billStatus"
  18. code="PAYMENT_TYPE"
  19. placeholder="请选择单位类型"
  20. allowClear></v-select>
  21. </a-form-item>
  22. </a-col>
  23. <a-col :md="6" :sm="24">
  24. <a-form-item label="结算类型">
  25. <v-select
  26. v-model="queryParam.billStatus"
  27. ref="billStatus"
  28. id="unitCollectionPaymentList-billStatus"
  29. code="PAYMENT_TYPE"
  30. placeholder="请选择结算类型"
  31. allowClear></v-select>
  32. </a-form-item>
  33. </a-col>
  34. <template v-if="advanced">
  35. <a-col :md="6" :sm="24">
  36. <a-form-item label="结算单号">
  37. <a-input id="unitCollectionPaymentList-purchaseNo" v-model.trim="queryParam.purchaseNo" allowClear placeholder="请输入结算单号"/>
  38. </a-form-item>
  39. </a-col>
  40. <a-col :md="6" :sm="24">
  41. <a-form-item label="结算时间">
  42. <a-range-picker v-model="queryParam.creatDate" id="unitCollectionPaymentList-creatDate"/>
  43. </a-form-item>
  44. </a-col>
  45. <a-col :md="6" :sm="24">
  46. <a-form-item label="结算方式">
  47. <v-select
  48. v-model="queryParam.billStatus"
  49. ref="billStatus"
  50. id="unitCollectionPaymentList-billStatus"
  51. code="PAYMENT_TYPE"
  52. placeholder="请选择结算方式"
  53. allowClear></v-select>
  54. </a-form-item>
  55. </a-col>
  56. </template>
  57. <a-col :md="6" :sm="24">
  58. <span class="table-page-search-submitButtons">
  59. <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="unitCollectionPaymentList-refresh">查询</a-button>
  60. <a-button style="margin-left: 8px" @click="resetSearchForm()" :disabled="disabled" id="unitCollectionPaymentList-reset">重置</a-button>
  61. <a @click="advanced=!advanced" style="margin-left: 8px">
  62. {{ advanced ? '收起' : '展开' }}
  63. <a-icon :type="advanced ? 'up' : 'down'"/>
  64. </a>
  65. </span>
  66. </a-col>
  67. </a-row>
  68. </a-form>
  69. </div>
  70. <!-- alert -->
  71. <a-alert type="info" showIcon style="margin-bottom:15px">
  72. <div slot="message">共 <strong>6</strong> 条记录,其中收款单 <strong>14</strong> 条,收款金额合计 <strong>¥14</strong> ,付款单 <strong>14</strong> 条,付款金额合计 <strong>¥14</strong> </div>
  73. </a-alert>
  74. <!-- 列表 -->
  75. <s-table
  76. class="sTable"
  77. ref="table"
  78. size="default"
  79. :rowKey="(record) => record.id"
  80. :columns="columns"
  81. :data="loadData"
  82. bordered>
  83. <!-- 结算单号 -->
  84. <template slot="purchaseNo" slot-scope="text, record">
  85. <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{record.purchaseNo}}</span>
  86. </template>
  87. <!-- 结算方式 -->
  88. <template slot="action" slot-scope="text, record">
  89. <span>{{record.state == 1 ? '现金' : '微信'}}</span>
  90. </template>
  91. </s-table>
  92. </a-card>
  93. </template>
  94. <script>
  95. import { STable, VSelect } from '@/components'
  96. // import { getRoleList, getServiceList } from '@/api/manage'
  97. export default {
  98. components: { STable, VSelect },
  99. data () {
  100. return {
  101. advanced: false, // 高级搜索 展开/关闭
  102. disabled: false, // 查询、重置按钮是否可操作
  103. // 查询参数
  104. queryParam: {},
  105. // 表头
  106. columns: [
  107. { title: '序号', dataIndex: 'no', align: 'center' },
  108. { title: '单位名称', dataIndex: 'name', align: 'center' },
  109. { title: '单位类型', dataIndex: 'pssayType', align: 'center' },
  110. { title: '结算类型', dataIndex: 'paddyType', align: 'center' },
  111. { title: '结算单号', scopedSlots: { customRender: 'purchaseNo' }, align: 'center' },
  112. { title: '结算金额', dataIndex: 'totalP', align: 'center' },
  113. { title: '结算时间', dataIndex: 'creatDate', align: 'center' },
  114. { title: '操作人', dataIndex: 'payType', align: 'center' },
  115. { title: '结算方式', scopedSlots: { customRender: 'action' }, width: 270, align: 'center' }
  116. ],
  117. // 加载数据方法 必须为 Promise 对象
  118. loadData: parameter => {
  119. this.disabled = true
  120. // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).then(res => {
  121. // const data = res.data
  122. // const no = (data.pageNo - 1) * data.pageSize
  123. // for (var i = 0; i < data.list.length; i++) {
  124. // data.list[i].no = no + i + 1
  125. // }
  126. // this.disabled = false
  127. // return data
  128. // })
  129. const _this = this
  130. return new Promise(function(resolve, reject){
  131. const data = {
  132. pageNo: 1,
  133. pageSize: 10,
  134. list: [
  135. { id: '1', purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
  136. ],
  137. count: 10
  138. }
  139. const no = (data.pageNo - 1) * data.pageSize
  140. for (var i = 0; i < data.list.length; i++) {
  141. data.list[i].no = no + i + 1
  142. }
  143. _this.disabled = false
  144. resolve(data)
  145. })
  146. },
  147. }
  148. },
  149. methods: {
  150. // 详情
  151. handleDetail(row){
  152. this.$router.push({ path: `/financialManagement/unitCollectionPayment/detail/${row.id}`})
  153. },
  154. // 审核
  155. handleExamine(row, type){
  156. const _this = this
  157. this.$confirm({
  158. title: '提示',
  159. content: '操作后不可恢复,确定要进行'+ (type==1 ? ' 通过 ' : ' 不通过 ') +'操作吗?',
  160. okText: '确定',
  161. cancelText: '取消',
  162. centered: true,
  163. onOk () {
  164. // delectRolePower({
  165. // id: row.id
  166. // }).then(res => {
  167. // console.log(res, 'res1111')
  168. // if (res.status == 200) {
  169. // _this.$message.success(res.message)
  170. // _this.$refs.table.refresh()
  171. // }
  172. // })
  173. }
  174. })
  175. },
  176. // 重置
  177. resetSearchForm () {
  178. this.queryParam.orderBundleNo = ''
  179. this.queryParam.orderBundle.custMobile = ''
  180. this.queryParam.bundleName = ''
  181. this.queryParam.itemName = ''
  182. this.oldTime = undefined
  183. this.newTime = undefined
  184. this.$refs.table.refresh(true)
  185. },
  186. }
  187. }
  188. </script>
  189. <style lang="less">
  190. .unitCollectionPaymentList-wrap{
  191. .sTable{
  192. margin-top: 15px;
  193. }
  194. }
  195. </style>