mainTableExpenseUSDModal.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. <template>
  2. <!-- 成本分配 主表 美元费用支出 弹框 -->
  3. <a-modal
  4. title="美元费用支出"
  5. v-model="mainTableExpenseUSDModVis"
  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 placeholder="请输入账套号" 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 placeholder="请输入供应商" v-model="queryParam.supplier"></a-input>
  25. </a-form-item>
  26. </a-col>
  27. <!-- 重置 -->
  28. <a-col :md="6" :sm="8">
  29. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  30. <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  31. <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  32. <a @click="handleToggleSearch" style="margin-left: 8px">
  33. {{ toggleSearchStatus ? '收起' : '展开' }}
  34. <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
  35. </a>
  36. </span>
  37. </a-col>
  38. </a-row>
  39. </a-form>
  40. </div>
  41. <!-- table -->
  42. <div>
  43. <a-table
  44. bordered
  45. :loading="loading"
  46. :columns="mainTableExpenseUSDColumns"
  47. :data-source="mainTableExpenseUSDData"
  48. :pagination="false"
  49. :scroll="{ y: 500 }"
  50. >
  51. </a-table>
  52. <!-- 返回 -->
  53. <a-row style="marginTop:20px;">
  54. <a-col :md="24" :sm="12">
  55. <span style="float: right;" class="table-operator">
  56. <a-button type="primary" @click="backCostAllocationTable" icon="rollback">返回</a-button>
  57. </span>
  58. </a-col>
  59. </a-row>
  60. </div>
  61. </a-spin>
  62. </a-modal>
  63. </template>
  64. <script>
  65. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  66. import JEllipsis from '@/components/jeecg/JEllipsis'
  67. export default {
  68. name: 'MainTableExpenseUSDModVis', // 成本分配统计 主表 美元费用支出
  69. mixins: [JeecgListMixin],
  70. components: { JEllipsis },
  71. data() {
  72. return {
  73. loading: false, // 表格加载
  74. // orderDataform: this.$form.createForm(this),
  75. confirmLoading: false,
  76. mainTableExpenseUSDModVis: false,
  77. // 表头
  78. mainTableExpenseUSDColumns: [
  79. {
  80. title: '账套号',
  81. dataIndex: 'setNo',
  82. width: 120,
  83. className: 'replacecolor'
  84. },
  85. {
  86. title: '项目',
  87. dataIndex: 'expenseItem',
  88. width: 120,
  89. className: 'replacecolor'
  90. },
  91. {
  92. title: '美元',
  93. dataIndex: 'disbursedOriginalmoney',
  94. width: 120,
  95. className: 'replacecolor' ,
  96. customRender: (text, record, index) => {
  97. if(text!==''&&text){
  98. return Number(text).toFixed(2)
  99. }
  100. },
  101. },
  102. {
  103. title: '人民币(不含税)',
  104. dataIndex: 'disbursedLocalmoney',
  105. width: 120, className: 'replacecolor',
  106. customRender: (text, record, index) => {
  107. if(text!==''&&text){
  108. return Number(text).toFixed(2)
  109. }
  110. },
  111. },
  112. {
  113. title: '人民币(税额)',
  114. dataIndex: 'shuiemoney',
  115. width: 120,
  116. className: 'replacecolor',
  117. customRender: (text, record, index) => {
  118. if(text!==''&&text){
  119. return Number(text).toFixed(2)
  120. }
  121. },
  122. },
  123. {
  124. title: '人民币(价税合计)',
  125. dataIndex: 'iNatMoney',
  126. width: 120,
  127. className: 'replacecolor',
  128. customRender: (text, record, index) => {
  129. if(text!==''&&text){
  130. return Number(text).toFixed(2)
  131. }
  132. }, },
  133. // {
  134. // title: '金额',
  135. // dataIndex: 'disbursedOriginalmoney',
  136. // width: 120,
  137. // className: 'replacecolor'
  138. // },
  139. {
  140. title: '供应商',
  141. dataIndex: 'processUnit',
  142. width: 120,
  143. className: 'replacecolor'
  144. }
  145. ],
  146. mainTableExpenseUSDData: [],
  147. fixedData:[],
  148. // 查询条件
  149. queryParam: {
  150. setNo: '', // 账套号
  151. supplier: '' // 供应商
  152. }
  153. }
  154. },
  155. // 接收父组件 方法
  156. props: {
  157. father: {
  158. type: Function,
  159. default: null
  160. }
  161. },
  162. created() {},
  163. methods: {
  164. // 返回
  165. backCostAllocationTable() {
  166. console.log('返回成本分配统计表')
  167. // this.$router.push('fabricLoss-table')
  168. // this.invoiceNumModVis = false
  169. this.close()
  170. },
  171. // 弹框查询按钮
  172. searchQuery() {
  173. var data = []
  174. this.fixedData.map(item =>{
  175. if(item.setNo.includes(this.queryParam.setNo) && item.processUnit.includes(this.queryParam.supplier)){
  176. data.push(item)
  177. }
  178. })
  179. this.mainTableExpenseUSDData = data
  180. },
  181. // 重置
  182. searchReset() {
  183. console.log('美元重置查询条件')
  184. // this.queryParam = {}
  185. this.queryParam.setNo = ''
  186. this.queryParam.supplier = ''
  187. this.mainTableExpenseUSDData = this.fixedData
  188. // this.getShipmentList()
  189. },
  190. close() {
  191. this.$emit('close')
  192. this.mainTableExpenseUSDModVis = false
  193. }
  194. }
  195. }
  196. </script>
  197. <style lang="less" scoped>
  198. @import '~@assets/less/common.less';
  199. @import '~@assets/less/overwriter.less';
  200. /deep/ .ant-table-thead > tr > th {
  201. text-align: center;
  202. // font-weight: 700;
  203. }
  204. /deep/ .ant-table-tbody {
  205. text-align: center;
  206. }
  207. // /deep/ th.replacecolor {
  208. // background-color: #ccc;
  209. // }
  210. </style>