mainTableExpenseCNYModal.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. <template>
  2. <!-- 成本分配 主表 人民币费用支出 弹框 -->
  3. <a-modal
  4. title="人民币费用支出"
  5. v-model="mainTableExpenseCNYModVis"
  6. :confirmLoading="confirmLoading"
  7. width="86%"
  8. style="top:330px;left:100px;"
  9. :footer="null"
  10. >
  11. <!-- tabel 加载 -->
  12. <a-spin :spinning="confirmLoading">
  13. <!-- 查询 -->
  14. <div class="table-page-search-wrapper">
  15. <a-form layout="inline" @keyup.enter.native="searchQuery">
  16. <a-row :gutter="24">
  17. <a-col :md="6" :sm="8">
  18. <a-form-item label="账套号" >
  19. <a-input v-model="queryParam.setNo"></a-input>
  20. </a-form-item>
  21. </a-col>
  22. <a-col :md="6" :sm="8">
  23. <a-form-item label="供应商" >
  24. <a-input v-model="queryParam.supplier"></a-input>
  25. </a-form-item>
  26. </a-col>
  27. <a-col :md="6" :sm="8">
  28. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  29. <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  30. <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  31. <a @click="handleToggleSearch" style="margin-left: 8px">
  32. {{ toggleSearchStatus ? '收起' : '展开' }}
  33. <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
  34. </a>
  35. </span>
  36. </a-col>
  37. </a-row>
  38. </a-form>
  39. </div>
  40. <!-- table -->
  41. <div>
  42. <a-table
  43. bordered
  44. :loading="loading"
  45. :columns="mainTableExpenseCNYColumns"
  46. :data-source="mainTableExpenseCNYData"
  47. :scroll="{ y: 500 }"
  48. :pagination="false"
  49. >
  50. </a-table>
  51. <!-- 返回 -->
  52. <a-row style="marginTop:20px;">
  53. <a-col :md="24" :sm="12">
  54. <span style="float: right;" class="table-operator">
  55. <a-button type="primary" @click="backCostAllocationTable" icon="rollback">返回</a-button>
  56. </span>
  57. </a-col>
  58. </a-row>
  59. </div>
  60. </a-spin>
  61. </a-modal>
  62. </template>
  63. <script>
  64. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  65. import JEllipsis from '@/components/jeecg/JEllipsis'
  66. export default {
  67. name: 'MainTableExpenseCNYModVis', // 成本分配统计 主表 人民币费用支出
  68. mixins: [JeecgListMixin],
  69. components: { JEllipsis },
  70. data() {
  71. return {
  72. loading: false, // 表格加载
  73. // orderDataform: this.$form.createForm(this),
  74. confirmLoading: false,
  75. mainTableExpenseCNYModVis: false,
  76. // 人民币费用支出 表头
  77. mainTableExpenseCNYColumns: [
  78. {
  79. title: '账套号',
  80. dataIndex: 'setNo',
  81. width: 120,
  82. className: 'replacecolor'
  83. },
  84. {
  85. title: '项目',
  86. dataIndex: 'expenseItem',
  87. width: 120,
  88. className: 'replacecolor'
  89. },
  90. {
  91. title: '金额',
  92. dataIndex: 'disbursedLocalmoney',
  93. width: 120,
  94. className: 'replacecolor'
  95. },
  96. {
  97. title: '供应商',
  98. dataIndex: 'processUnit',
  99. width: 120,
  100. className: 'replacecolor'
  101. }
  102. ],
  103. mainTableExpenseCNYData: [],
  104. fixedData:[],
  105. // 查询条件
  106. queryParam: {
  107. setNo: '', // 账套号
  108. supplier: '' // 供应商
  109. }
  110. }
  111. },
  112. // 接收父组件 方法
  113. props: {
  114. father: {
  115. type: Function,
  116. default: null
  117. }
  118. },
  119. created() {},
  120. methods: {
  121. // 返回
  122. backCostAllocationTable() {
  123. console.log('返回成本分配统计表')
  124. // this.$router.push('fabricLoss-table')
  125. // this.invoiceNumModVis = false
  126. this.close()
  127. },
  128. // 弹框查询按钮
  129. searchQuery() {
  130. var data = []
  131. this.fixedData.map(item =>{
  132. if(item.setNo.includes(this.queryParam.setNo) && item.processUnit.includes(this.queryParam.supplier)){
  133. data.push(item)
  134. }
  135. })
  136. this.mainTableExpenseCNYData = data
  137. },
  138. // 重置
  139. searchReset() {
  140. // console.log('人民币重置查询条件')
  141. // this.queryParam = {}
  142. this.queryParam.setNo = ''
  143. this.queryParam.supplier = ''
  144. this.mainTableExpenseCNYData = this.fixedData
  145. // this.getShipmentList()
  146. },
  147. close() {
  148. this.$emit('close')
  149. this.mainTableExpenseCNYModVis = false
  150. }
  151. }
  152. }
  153. </script>
  154. <style lang="less" scoped>
  155. @import '~@assets/less/common.less';
  156. @import '~@assets/less/overwriter.less';
  157. /deep/ .ant-table-thead > tr > th {
  158. text-align: center;
  159. // font-weight: 700;
  160. }
  161. /deep/ .ant-table-tbody {
  162. text-align: center;
  163. }
  164. // /deep/ th.replacecolor {
  165. // background-color: #ccc;
  166. // }
  167. </style>