MoneyOutList.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275
  1. <!-- by 75 27 18 920 -->
  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 supList" :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
  86. placeholder="请选择付款账户"
  87. showSearch
  88. optionFilterProp="children"
  89. v-model="queryParam.accountId"
  90. >
  91. <a-select-option v-for="(item, index) in accountList" :key="index" :value="item.id">
  92. {{ item.name }}
  93. </a-select-option>
  94. </a-select>
  95. </a-form-item>
  96. </a-col>
  97. <a-col :md="6" :sm="24">
  98. <a-form-item label="单据状态" :labelCol="labelCol" :wrapperCol="wrapperCol">
  99. <a-select placeholder="请选择单据状态" v-model="queryParam.status">
  100. <a-select-option value="0">未审核</a-select-option>
  101. <a-select-option value="9" v-if="!checkFlag">审核中</a-select-option>
  102. <a-select-option value="1">已审核</a-select-option>
  103. </a-select>
  104. </a-form-item>
  105. </a-col>
  106. <a-col :md="6" :sm="24">
  107. <a-form-item label="采购单号" :labelCol="labelCol" :wrapperCol="wrapperCol">
  108. <a-input placeholder="请输入采购单号" v-model="queryParam.number"></a-input>
  109. </a-form-item>
  110. </a-col>
  111. <a-col :md="6" :sm="24">
  112. <a-form-item label="单据备注" :labelCol="labelCol" :wrapperCol="wrapperCol">
  113. <a-input placeholder="请输入单据备注" v-model="queryParam.remark"></a-input>
  114. </a-form-item>
  115. </a-col>
  116. </a-row>
  117. </template>
  118. </a-form>
  119. </div>
  120. <!-- 操作按钮区域 -->
  121. <div class="table-operator" style="margin-top: 5px">
  122. <a-button v-if="btnEnableList.indexOf(1) > -1" @click="myHandleAdd" type="primary" icon="plus">新增</a-button>
  123. <a-button v-if="btnEnableList.indexOf(1) > -1" icon="delete" @click="batchDel">删除</a-button>
  124. <!-- <a-button v-if="checkFlag && btnEnableList.indexOf(2) > -1" icon="check" @click="batchSetStatus(1)"
  125. >审核</a-button
  126. >
  127. <a-button v-if="checkFlag && btnEnableList.indexOf(7) > -1" icon="stop" @click="batchSetStatus(0)"
  128. >反审核</a-button
  129. > -->
  130. <a-button v-if="isShowExcel && btnEnableList.indexOf(3) > -1" icon="download" @click="handleExport"
  131. >导出</a-button
  132. >
  133. <a-tooltip
  134. placement="left"
  135. title="付款单的要素和录入原则与“收款单”相同。
  136. 付款单中优惠金额计入支出类中的付款优惠中,为负值 (因优惠意味着实际少付款)。"
  137. slot="action"
  138. >
  139. <a-icon v-if="btnEnableList.indexOf(1) > -1" type="question-circle" style="font-size: 20px; float: right" />
  140. </a-tooltip>
  141. </div>
  142. <!-- table区域-begin -->
  143. <div>
  144. <a-table
  145. ref="table"
  146. size="middle"
  147. bordered
  148. rowKey="id"
  149. :columns="columns"
  150. :dataSource="dataSource"
  151. :components="handleDrag(columns)"
  152. :pagination="ipagination"
  153. :scroll="scroll"
  154. :loading="loading"
  155. :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
  156. @change="handleTableChange"
  157. >
  158. <span slot="action" slot-scope="text, record">
  159. <a @click="myHandleDetail(record, '付款', prefixNo)">查看</a>
  160. <a-divider v-if="btnEnableList.indexOf(1) > -1" type="vertical" />
  161. <a v-if="btnEnableList.indexOf(1) > -1" @click="myHandleEdit(record)">编辑</a>
  162. <a-divider v-if="btnEnableList.indexOf(1) > -1" type="vertical" />
  163. <a-popconfirm
  164. v-if="btnEnableList.indexOf(1) > -1"
  165. title="确定删除吗?"
  166. @confirm="() => myHandleDelete(record)"
  167. >
  168. <a>删除</a>
  169. </a-popconfirm>
  170. </span>
  171. <template slot="customRenderStatus" slot-scope="status">
  172. <a-tag v-if="status == '0'" color="red">未审核</a-tag>
  173. <a-tag v-if="status == '1'" color="green">已审核</a-tag>
  174. <a-tag v-if="status == '9'" color="orange">审核中</a-tag>
  175. </template>
  176. </a-table>
  177. </div>
  178. <!-- table区域-end -->
  179. <!-- 表单区域 -->
  180. <money-out-modal ref="modalForm" @ok="modalFormOk" @close="modalFormClose"></money-out-modal>
  181. <financial-detail ref="modalDetail" @ok="modalFormOk" @close="modalFormClose"></financial-detail>
  182. <bill-excel-iframe ref="billExcelIframe" @ok="modalFormOk" @close="modalFormClose"></bill-excel-iframe>
  183. </a-card>
  184. </a-col>
  185. </a-row>
  186. </template>
  187. <script>
  188. import MoneyOutModal from './modules/MoneyOutModal'
  189. import FinancialDetail from './dialog/FinancialDetail'
  190. import BillExcelIframe from '@/components/tools/BillExcelIframe'
  191. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  192. import { FinancialListMixin } from './mixins/FinancialListMixin'
  193. import JDate from '@/components/jeecg/JDate'
  194. import Vue from 'vue'
  195. export default {
  196. name: 'MoneyOutList',
  197. mixins: [JeecgListMixin, FinancialListMixin],
  198. components: {
  199. MoneyOutModal,
  200. FinancialDetail,
  201. BillExcelIframe,
  202. JDate,
  203. },
  204. data() {
  205. return {
  206. labelCol: {
  207. span: 5,
  208. },
  209. wrapperCol: {
  210. span: 18,
  211. offset: 1,
  212. },
  213. // 查询条件
  214. queryParam: {
  215. billNo: '',
  216. searchMaterial: '',
  217. type: '付款',
  218. organId: undefined,
  219. creator: undefined,
  220. handsPersonId: undefined,
  221. accountId: undefined,
  222. status: undefined,
  223. remark: '',
  224. number: '',
  225. },
  226. prefixNo: 'FK',
  227. // 表头
  228. columns: [
  229. {
  230. title: '操作',
  231. dataIndex: 'action',
  232. width: 200,
  233. align: 'center',
  234. scopedSlots: { customRender: 'action' },
  235. },
  236. { title: '供应商', dataIndex: 'organName', width: 140, ellipsis: true },
  237. { title: '单据编号', dataIndex: 'billNo', width: 160 },
  238. { title: '单据日期 ', dataIndex: 'billTimeStr', width: 160 },
  239. { title: '操作员', dataIndex: 'userName', width: 100, ellipsis: true },
  240. { title: '财务人员', dataIndex: 'handsPersonName', width: 100 },
  241. { title: '付款账户', dataIndex: 'accountName', width: 100, ellipsis: true },
  242. { title: '合计付款', dataIndex: 'totalPrice', width: 80 },
  243. { title: '优惠金额', dataIndex: 'discountMoney', width: 80 },
  244. { title: '实际付款', dataIndex: 'changeAmount', width: 80 },
  245. { title: '备注', dataIndex: 'remark', width: 200 },
  246. {
  247. title: '状态',
  248. dataIndex: 'status',
  249. width: 80,
  250. align: 'center',
  251. scopedSlots: { customRender: 'customRenderStatus' },
  252. },
  253. ],
  254. url: {
  255. list: '/accountHead/list',
  256. delete: '/accountHead/delete',
  257. deleteBatch: '/accountHead/deleteBatch',
  258. batchSetStatusUrl: '/accountHead/batchSetStatus',
  259. },
  260. }
  261. },
  262. computed: {},
  263. created() {
  264. this.initSystemConfig()
  265. this.initSupplier()
  266. this.initUser()
  267. this.initPerson()
  268. this.initAccount()
  269. },
  270. methods: {},
  271. }
  272. </script>
  273. <style scoped>
  274. @import '~@assets/less/common.less';
  275. </style>