cost-allocation-table.vue 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. <template>
  2. <!--成本分配汇总 -->
  3. <a-card :bordered="false">
  4. <!-- 查询区域 -->
  5. <div class="table-page-search-wrapper">
  6. <a-form layout="inline" @keyup.enter.native="searchQuery">
  7. <a-row :gutter="24">
  8. <a-col :md="6" :sm="8">
  9. <a-form-item label="序号">
  10. <a-input placeholder="请输入序号" v-model="queryParam.index"></a-input>
  11. </a-form-item>
  12. </a-col>
  13. <a-col :md="6" :sm="8">
  14. <a-form-item label="计划单号" has-feedback>
  15. <a-input placeholder="请输入计划单号" v-model="queryParam.planNum"></a-input>
  16. </a-form-item>
  17. </a-col>
  18. <a-col :md="6" :sm="8">
  19. <a-form-item label="客户简称">
  20. <a-input placeholder="请输入客户简称" v-model="queryParam.customerShortName"></a-input>
  21. </a-form-item>
  22. </a-col>
  23. <a-col :md="6" :sm="8">
  24. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  25. <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  26. <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  27. <a @click="handleToggleSearch" style="margin-left: 8px">
  28. {{ toggleSearchStatus ? '收起' : '展开' }}
  29. <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
  30. </a>
  31. </span>
  32. </a-col>
  33. </a-row>
  34. </a-form>
  35. </div>
  36. <!-- table区域 -->
  37. <div>
  38. <a-table
  39. bordered
  40. rowKey="id"
  41. :columns="costAllocationColumns"
  42. :data-source="costAllocationData"
  43. :loading="loading"
  44. :pagination="ipagination"
  45. :scroll="{ x: 1500 }"
  46. @change="handleTableChange"
  47. >
  48. <!-- 状态 -->
  49. <!-- slot-scope="text, record" -->
  50. <span slot="state">
  51. <!-- v-if="record.isRelease == '0'" -->
  52. <a-tag color="#f50">审核通过</a-tag>
  53. <!-- <a-tag color="#87d068" v-else>已发布</a-tag> -->
  54. </span>
  55. <!-- 操作 -->
  56. <span slot="operationSlot" slot-scope="text, record">
  57. <a href="javascript:void(0);" @click="detail(record)">详情</a>
  58. <a-divider type="vertical" />
  59. <a href="javascript:void(0);" @click="check(record)" style="color:green">审核</a>
  60. </span>
  61. </a-table>
  62. </div>
  63. <!-- 详情 大抽屉 -->
  64. <costAllocation-drawer ref="costAllocationDrawer" :father="aa" @ok="modalFormOk"></costAllocation-drawer>
  65. </a-card>
  66. </template>
  67. <script>
  68. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  69. import JEllipsis from '@/components/jeecg/JEllipsis'
  70. import moment from 'moment'
  71. import costAllocationDrawer from '@views/reportForms/cost-allocation-table/costAllocationDrawer.vue'
  72. export default {
  73. name: 'CostAllocationTable', // 成本分配汇总
  74. mixins: [JeecgListMixin],
  75. components: { JEllipsis, moment, costAllocationDrawer },
  76. data() {
  77. let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} /> // 省略
  78. return {
  79. description: '成本分配汇总页面',
  80. // 查询条件
  81. queryParam: {
  82. index: '',
  83. planNum: '',
  84. customerShortName: ''
  85. },
  86. // 成本分配汇总 表头
  87. costAllocationColumns: [
  88. {
  89. title: '序号',
  90. width: 90,
  91. dataIndex: 'index',
  92. customRender: (text, record, index) => `${index + 1}`,
  93. fixed: 'left',
  94. className: 'replacecolor'
  95. },
  96. { title: '计划单号', width: 120, dataIndex: 'planNum', fixed: 'left', className: 'replacecolor' },
  97. { title: '款号', width: 120, dataIndex: 'styleNum', className: 'replacecolor' },
  98. { title: '业务员', width: 120, dataIndex: 'salesman', className: 'replacecolor' },
  99. {
  100. title: '部门',
  101. width: 120,
  102. dataIndex: 'department',
  103. className: 'replacecolor'
  104. },
  105. { title: '客户简称', width: 150, dataIndex: 'customerShortName', className: 'replacecolor' },
  106. { title: '加工单位', width: 120, dataIndex: 'processUnit', className: 'replacecolor' },
  107. // {
  108. // title: '创建时间',
  109. // dataIndex: 'createTime',
  110. // align: 'center',
  111. // sorter: true,
  112. // customRender: text => {
  113. // return moment(text).format('YYYY-MM-DD')
  114. // }
  115. // },
  116. { title: '出运日期', width: 120, dataIndex: 'outData', className: 'replacecolor' },
  117. { title: '成衣件数', width: 90, dataIndex: 'clothesQuantity', className: 'replacecolor' },
  118. { title: '销售美元', width: 120, dataIndex: 'SalesUSD', className: 'replacecolor' },
  119. { title: '销售人民币', width: 120, dataIndex: 'SalesCNY', className: 'replacecolor' },
  120. { title: '面料(不含税)', width: 120, dataIndex: 'FabricExcludedTax', className: 'replacecolor' },
  121. { title: '辅料(不含税)', width: 120, dataIndex: 'ingredientsExcludedTax', className: 'replacecolor' },
  122. { title: '加工费(CNY)', width: 120, dataIndex: 'processCostCNY', className: 'replacecolor' },
  123. { title: '加工费(USD)', width: 120, dataIndex: 'processCostUSD', className: 'replacecolor' },
  124. { title: '费用支出(汇总CNY)', width: 160, dataIndex: 'costPayTotalCNY', className: 'replacecolor' },
  125. { title: '费用支出(汇总USD)', width: 160, dataIndex: 'costPayTotalUSD', className: 'replacecolor' },
  126. { title: '事故单人民币金额', width: 160, dataIndex: 'accidentCNYAmount', className: 'replacecolor' },
  127. {
  128. title: '备注',
  129. width: 180,
  130. dataIndex: 'note',
  131. customRender: t => ellipsis(t),
  132. className: 'replacecolor',
  133. scopedSlots: { customRender: 'note' }
  134. },
  135. {
  136. title: '状态',
  137. width: 120,
  138. dataIndex: 'state',
  139. className: 'replacecolor',
  140. scopedSlots: { customRender: 'state' }
  141. },
  142. {
  143. title: '操作',
  144. dataIndex: 'operation',
  145. scopedSlots: { customRender: 'operationSlot' },
  146. fixed: 'right',
  147. width: 160,
  148. className: 'replacecolor'
  149. }
  150. ],
  151. costAllocationData: [
  152. {
  153. orderNum: 'AA002200001',
  154. note: '跟Jeecg-Boot官网统一,单元格内容较多时,多出内容以“……”替代,鼠标移入显示全部内容(此处原型图上是弹框,)'
  155. }
  156. ],
  157. loading: false // 表格加载
  158. }
  159. },
  160. created() {
  161. // 渲染订单销售列表
  162. },
  163. methods: {
  164. // 同步 synchronization() {},
  165. // 查询按钮
  166. searchQuery() {
  167. // 渲染成本分配统计表
  168. },
  169. searchReset() {
  170. // console.log('>>>>重置')
  171. this.queryParam = {}
  172. // 重新成本分配统计表
  173. },
  174. // 操作 详情
  175. detail(record) {
  176. // 点击了详情
  177. this.$refs.costAllocationDrawer.visible = true
  178. },
  179. // 操作 审核
  180. check() {},
  181. // father 抽屉方法
  182. aa() {}
  183. // 分页、排序、筛选变化时触发
  184. // handleTableChange(pagination, filters, sorter) {
  185. // // console.log('当前页信息>>>>',pagination)
  186. // this.queryParam.pageNo = pagination.current
  187. // // this.getOrderList()
  188. // }
  189. },
  190. computed: {},
  191. mounted() {}
  192. }
  193. </script>
  194. <style lang="less" scoped>
  195. @import '~@assets/less/common.less';
  196. @import '~@assets/less/overwriter.less';
  197. /deep/ .ant-table-thead > tr > th {
  198. text-align: center;
  199. // font-weight: 700;
  200. }
  201. /deep/ .ant-table-tbody {
  202. text-align: center;
  203. }
  204. // /deep/ th.replacecolor {
  205. // background-color: #ccc;
  206. // }
  207. </style>