list.vue 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. <template>
  2. <a-card :bordered="false" class="companyCollectionPaymentList-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="companyCollectionPaymentList-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="companyCollectionPaymentList-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="companyCollectionPaymentList-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="companyCollectionPaymentList-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="companyCollectionPaymentList-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="companyCollectionPaymentList-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="companyCollectionPaymentList-refresh">查询</a-button>
  60. <a-button style="margin-left: 8px" @click="resetSearchForm()" :disabled="disabled" id="companyCollectionPaymentList-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="sss" slot-scope="text, record">
  89. <span>{{record.state == 1 ? '现金' : '微信'}}</span>
  90. </template>
  91. <!-- 操作 -->
  92. <template slot="action" slot-scope="text, record">
  93. <a-button size="small" type="dashed" @click="handleDetail(record)" id="companyCollectionPaymentList-detail-btn">详情</a-button>
  94. </template>
  95. </s-table>
  96. </a-card>
  97. </template>
  98. <script>
  99. import { STable, VSelect } from '@/components'
  100. // import { getRoleList, getServiceList } from '@/api/manage'
  101. export default {
  102. components: { STable, VSelect },
  103. data () {
  104. return {
  105. advanced: false, // 高级搜索 展开/关闭
  106. disabled: false, // 查询、重置按钮是否可操作
  107. // 查询参数
  108. queryParam: {},
  109. // 表头
  110. columns: [
  111. { title: '序号', dataIndex: 'no', align: 'center' },
  112. { title: '单位名称', dataIndex: 'name', align: 'center', customRender: function (text) { return text || '--' } },
  113. { title: '单位类型', dataIndex: 'pssayType', align: 'center', customRender: function (text) { return text || '--' } },
  114. { title: '结算类型', dataIndex: 'paddyType', align: 'center', customRender: function (text) { return text || '--' } },
  115. { title: '结算单号', scopedSlots: { customRender: 'purchaseNo' }, align: 'center' },
  116. { title: '结算金额', dataIndex: 'totalP', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
  117. { title: '结算时间', dataIndex: 'creatDate', align: 'center', customRender: function (text) { return text || '--' } },
  118. { title: '操作人', dataIndex: 'payType', align: 'center', customRender: function (text) { return text || '--' } },
  119. { title: '结算方式', scopedSlots: { customRender: 'sss' }, width: 270, align: 'center' },
  120. { title: '操作', scopedSlots: { customRender: 'action' }, width: 160, align: 'center' }
  121. ],
  122. // 加载数据方法 必须为 Promise 对象
  123. loadData: parameter => {
  124. this.disabled = true
  125. // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).then(res => {
  126. // const data = res.data
  127. // const no = (data.pageNo - 1) * data.pageSize
  128. // for (var i = 0; i < data.list.length; i++) {
  129. // data.list[i].no = no + i + 1
  130. // }
  131. // this.disabled = false
  132. // return data
  133. // })
  134. const _this = this
  135. return new Promise(function(resolve, reject){
  136. const data = {
  137. pageNo: 1,
  138. pageSize: 10,
  139. list: [
  140. { id: '1', purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
  141. ],
  142. count: 10
  143. }
  144. const no = (data.pageNo - 1) * data.pageSize
  145. for (var i = 0; i < data.list.length; i++) {
  146. data.list[i].no = no + i + 1
  147. }
  148. _this.disabled = false
  149. resolve(data)
  150. })
  151. },
  152. }
  153. },
  154. methods: {
  155. // 详情
  156. handleDetail(row){
  157. this.$router.push({ path: `/financialManagement/companyCollectionPayment/detail/${row.id}`})
  158. },
  159. // 审核
  160. handleExamine(row, type){
  161. const _this = this
  162. this.$confirm({
  163. title: '提示',
  164. content: '操作后不可恢复,确定要进行'+ (type==1 ? ' 通过 ' : ' 不通过 ') +'操作吗?',
  165. okText: '确定',
  166. cancelText: '取消',
  167. centered: true,
  168. onOk () {
  169. // delectRolePower({
  170. // id: row.id
  171. // }).then(res => {
  172. // console.log(res, 'res1111')
  173. // if (res.status == 200) {
  174. // _this.$message.success(res.message)
  175. // _this.$refs.table.refresh()
  176. // }
  177. // })
  178. }
  179. })
  180. },
  181. // 重置
  182. resetSearchForm () {
  183. this.queryParam.orderBundleNo = ''
  184. this.queryParam.orderBundle.custMobile = ''
  185. this.queryParam.bundleName = ''
  186. this.queryParam.itemName = ''
  187. this.oldTime = undefined
  188. this.newTime = undefined
  189. this.$refs.table.refresh(true)
  190. },
  191. }
  192. }
  193. </script>
  194. <style lang="less">
  195. .companyCollectionPaymentList-wrap{
  196. .sTable{
  197. margin-top: 15px;
  198. }
  199. }
  200. </style>