AdvanceInList.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. <!-- by j i s h e n g h u a -->
  2. <template>
  3. <a-row :gutter="24">
  4. <a-col :md="24">
  5. <a-card :style="cardStyle" :bordered="false">
  6. <!-- 查询区域 -->
  7. <div class="table-page-search-wrapper">
  8. <!-- 搜索区域 -->
  9. <a-form layout="inline" @keyup.enter.native="searchQuery">
  10. <a-row :gutter="24">
  11. <a-col :md="6" :sm="24">
  12. <a-form-item label="单据编号" :labelCol="labelCol" :wrapperCol="wrapperCol">
  13. <a-input placeholder="请输入单据编号" v-model="queryParam.billNo"></a-input>
  14. </a-form-item>
  15. </a-col>
  16. <a-col :md="6" :sm="24">
  17. <a-form-item label="单据日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
  18. <a-range-picker
  19. style="width: 100%"
  20. v-model="queryParam.createTimeRange"
  21. format="YYYY-MM-DD"
  22. :placeholder="['开始时间', '结束时间']"
  23. @change="onDateChange"
  24. @ok="onDateOk"
  25. />
  26. </a-form-item>
  27. </a-col>
  28. <a-col :md="6" :sm="24">
  29. <a-form-item label="付款会员" :labelCol="labelCol" :wrapperCol="wrapperCol">
  30. <a-select
  31. placeholder="请选择付款会员"
  32. showSearch
  33. optionFilterProp="children"
  34. v-model="queryParam.organId"
  35. >
  36. <a-select-option v-for="(item, index) in retailList" :key="index" :value="item.id">
  37. {{ item.supplier }}
  38. </a-select-option>
  39. </a-select>
  40. </a-form-item>
  41. </a-col>
  42. <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
  43. <a-col :md="6" :sm="24">
  44. <a-button type="primary" @click="searchQuery">查询</a-button>
  45. <a-button style="margin-left: 8px" @click="searchReset">重置</a-button>
  46. <a @click="handleToggleSearch" style="margin-left: 8px">
  47. {{ toggleSearchStatus ? '收起' : '展开' }}
  48. <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
  49. </a>
  50. </a-col>
  51. </span>
  52. </a-row>
  53. <template v-if="toggleSearchStatus">
  54. <a-row :gutter="24">
  55. <a-col :md="6" :sm="24">
  56. <a-form-item label="操作员" :labelCol="labelCol" :wrapperCol="wrapperCol">
  57. <a-select
  58. placeholder="请选择操作员"
  59. showSearch
  60. optionFilterProp="children"
  61. v-model="queryParam.creator"
  62. >
  63. <a-select-option v-for="(item, index) in userList" :key="index" :value="item.id">
  64. {{ item.userName }}
  65. </a-select-option>
  66. </a-select>
  67. </a-form-item>
  68. </a-col>
  69. <a-col :md="6" :sm="24">
  70. <a-form-item label="财务人员" :labelCol="labelCol" :wrapperCol="wrapperCol">
  71. <a-select
  72. placeholder="请选择财务人员"
  73. showSearch
  74. optionFilterProp="children"
  75. v-model="queryParam.handsPersonId"
  76. >
  77. <a-select-option v-for="(item, index) in personList" :key="index" :value="item.id">
  78. {{ item.name }}
  79. </a-select-option>
  80. </a-select>
  81. </a-form-item>
  82. </a-col>
  83. <a-col :md="6" :sm="24">
  84. <a-form-item label="单据状态" :labelCol="labelCol" :wrapperCol="wrapperCol">
  85. <a-select placeholder="请选择单据状态" v-model="queryParam.status">
  86. <a-select-option value="0">未审核</a-select-option>
  87. <a-select-option value="9" v-if="!checkFlag">审核中</a-select-option>
  88. <a-select-option value="1">已审核</a-select-option>
  89. </a-select>
  90. </a-form-item>
  91. </a-col>
  92. <a-col :md="6" :sm="24">
  93. <a-form-item label="单据备注" :labelCol="labelCol" :wrapperCol="wrapperCol">
  94. <a-input placeholder="请输入单据备注" v-model="queryParam.remark"></a-input>
  95. </a-form-item>
  96. </a-col>
  97. </a-row>
  98. </template>
  99. </a-form>
  100. </div>
  101. <!-- 操作按钮区域 -->
  102. <div class="table-operator" style="margin-top: 5px">
  103. <a-button v-if="btnEnableList.indexOf(1) > -1" @click="myHandleAdd" type="primary" icon="plus">新增</a-button>
  104. <a-button v-if="btnEnableList.indexOf(1) > -1" icon="delete" @click="batchDel">删除</a-button>
  105. <!-- <a-button v-if="checkFlag && btnEnableList.indexOf(2) > -1" icon="check" @click="batchSetStatus(1)"
  106. >审核</a-button
  107. >
  108. <a-button v-if="checkFlag && btnEnableList.indexOf(7) > -1" icon="stop" @click="batchSetStatus(0)"
  109. >反审核</a-button
  110. > -->
  111. <a-button v-if="isShowExcel && btnEnableList.indexOf(3) > -1" icon="download" @click="handleExport"
  112. >导出</a-button
  113. >
  114. <a-tooltip placement="left" title="针对会员模块,对会员收取预付款。" slot="action">
  115. <a-icon v-if="btnEnableList.indexOf(1) > -1" type="question-circle" style="font-size: 20px; float: right" />
  116. </a-tooltip>
  117. </div>
  118. <!-- table区域-begin -->
  119. <div>
  120. <a-table
  121. ref="table"
  122. size="middle"
  123. bordered
  124. rowKey="id"
  125. :columns="columns"
  126. :dataSource="dataSource"
  127. :components="handleDrag(columns)"
  128. :pagination="ipagination"
  129. :scroll="scroll"
  130. :loading="loading"
  131. :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
  132. @change="handleTableChange"
  133. >
  134. <span slot="action" slot-scope="text, record">
  135. <a @click="myHandleDetail(record, '收预付款', prefixNo)">查看</a>
  136. <a-divider v-if="btnEnableList.indexOf(1) > -1" type="vertical" />
  137. <a v-if="btnEnableList.indexOf(1) > -1" @click="myHandleEdit(record)">编辑</a>
  138. <a-divider v-if="btnEnableList.indexOf(1) > -1" type="vertical" />
  139. <a-popconfirm
  140. v-if="btnEnableList.indexOf(1) > -1"
  141. title="确定删除吗?"
  142. @confirm="() => myHandleDelete(record)"
  143. >
  144. <a>删除</a>
  145. </a-popconfirm>
  146. </span>
  147. <template slot="customRenderStatus" slot-scope="status">
  148. <a-tag v-if="status == '0'" color="red">未审核</a-tag>
  149. <a-tag v-if="status == '1'" color="green">已审核</a-tag>
  150. <a-tag v-if="status == '9'" color="orange">审核中</a-tag>
  151. </template>
  152. </a-table>
  153. </div>
  154. <!-- table区域-end -->
  155. <!-- 表单区域 -->
  156. <advance-in-modal ref="modalForm" @ok="modalFormOk" @close="modalFormClose"></advance-in-modal>
  157. <financial-detail ref="modalDetail" @ok="modalFormOk" @close="modalFormClose"></financial-detail>
  158. <bill-excel-iframe ref="billExcelIframe" @ok="modalFormOk" @close="modalFormClose"></bill-excel-iframe>
  159. </a-card>
  160. </a-col>
  161. </a-row>
  162. </template>
  163. <script>
  164. import AdvanceInModal from './modules/AdvanceInModal'
  165. import FinancialDetail from './dialog/FinancialDetail'
  166. import BillExcelIframe from '@/components/tools/BillExcelIframe'
  167. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  168. import { FinancialListMixin } from './mixins/FinancialListMixin'
  169. import JDate from '@/components/jeecg/JDate'
  170. import Vue from 'vue'
  171. export default {
  172. name: 'AdvanceInList',
  173. mixins: [JeecgListMixin, FinancialListMixin],
  174. components: {
  175. AdvanceInModal,
  176. FinancialDetail,
  177. BillExcelIframe,
  178. JDate,
  179. },
  180. data() {
  181. return {
  182. labelCol: {
  183. span: 5,
  184. },
  185. wrapperCol: {
  186. span: 18,
  187. offset: 1,
  188. },
  189. // 查询条件
  190. queryParam: {
  191. billNo: '',
  192. searchMaterial: '',
  193. type: '收预付款',
  194. organId: undefined,
  195. creator: undefined,
  196. handsPersonId: undefined,
  197. status: undefined,
  198. remark: '',
  199. },
  200. prefixNo: 'SYF',
  201. // 表头
  202. columns: [
  203. {
  204. title: '操作',
  205. dataIndex: 'action',
  206. width: 200,
  207. align: 'center',
  208. scopedSlots: { customRender: 'action' },
  209. },
  210. { title: '付款会员', dataIndex: 'organName', width: 140, ellipsis: true },
  211. { title: '单据编号', dataIndex: 'billNo', width: 160 },
  212. { title: '单据日期 ', dataIndex: 'billTimeStr', width: 160 },
  213. { title: '操作员', dataIndex: 'userName', width: 100, ellipsis: true },
  214. { title: '财务人员', dataIndex: 'handsPersonName', width: 100 },
  215. { title: '合计金额', dataIndex: 'totalPrice', width: 80 },
  216. { title: '收款金额', dataIndex: 'changeAmount', width: 80 },
  217. { title: '备注', dataIndex: 'remark', width: 200 },
  218. {
  219. title: '状态',
  220. dataIndex: 'status',
  221. width: 80,
  222. align: 'center',
  223. scopedSlots: { customRender: 'customRenderStatus' },
  224. },
  225. ],
  226. url: {
  227. list: '/accountHead/list',
  228. delete: '/accountHead/delete',
  229. deleteBatch: '/accountHead/deleteBatch',
  230. batchSetStatusUrl: '/accountHead/batchSetStatus',
  231. },
  232. }
  233. },
  234. computed: {},
  235. created() {
  236. this.initSystemConfig()
  237. this.initRetail()
  238. this.initUser()
  239. this.initPerson()
  240. this.initAccount()
  241. },
  242. methods: {},
  243. }
  244. </script>
  245. <style scoped>
  246. @import '~@assets/less/common.less';
  247. </style>