interior-statistics.vue 7.1 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. <!-- :disabled-date="disabledDate" 不可选择的日期 -->
  11. <a-month-picker placeholder="请选择开始年月" style="width:100%;" v-model="queryParam.startYearMonth" />
  12. </a-form-item>
  13. </a-col>
  14. <a-col :md="6" :sm="8">
  15. <a-form-item label="结束年月">
  16. <a-month-picker placeholder="请选择结束年月" style="width:100%;" v-model="queryParam.endYearMonth" />
  17. </a-form-item>
  18. </a-col>
  19. <a-col :md="6" :sm="8">
  20. <a-form-item label="部门">
  21. <a-select placeholder="请选择部门" v-model="queryParam.department">
  22. <a-select-option :value="''">请选择</a-select-option>
  23. <a-select-option :value="0">业务一部</a-select-option>
  24. <a-select-option :value="1">业务二部</a-select-option>
  25. <a-select-option :value="2">业务三部</a-select-option>
  26. <a-select-option :value="2">业务四部</a-select-option>
  27. </a-select>
  28. </a-form-item>
  29. </a-col>
  30. <template v-if="toggleSearchStatus">
  31. <a-col :md="6" :sm="8">
  32. <a-form-item label="客户">
  33. <a-select placeholder="请选择客户" v-model="queryParam.customer">
  34. <a-select-option :value="''">请选择</a-select-option>
  35. <a-select-option :value="0">FD</a-select-option>
  36. <a-select-option :value="1">PMK</a-select-option>
  37. <a-select-option :value="2">AUCHAN</a-select-option>
  38. <a-select-option :value="2">BIOWORLD</a-select-option>
  39. </a-select>
  40. </a-form-item>
  41. </a-col>
  42. </template>
  43. <a-col :md="6" :sm="8">
  44. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  45. <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  46. <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  47. <a @click="handleToggleSearch" style="margin-left: 8px">
  48. {{ toggleSearchStatus ? '收起' : '展开' }}
  49. <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
  50. </a>
  51. </span>
  52. </a-col>
  53. </a-row>
  54. </a-form>
  55. </div>
  56. <!-- 操作按钮 -->
  57. <div class="table-operator">
  58. <a-button type="primary" @click="interiorChart" icon="area-chart">订单内部分析图</a-button>
  59. </div>
  60. <!-- table区域 rowKey="id" :scroll="{ x: 1500 }" -->
  61. <div>
  62. <a-table
  63. bordered
  64. :row-key="record => record.id"
  65. :columns="interiorStatisticsColumns"
  66. :data-source="interiorStatisticsData"
  67. :loading="loading"
  68. :pagination="ipagination"
  69. @change="handleTableChange"
  70. >
  71. </a-table>
  72. </div>
  73. <!-- 查看分析图 弹框 -->
  74. <interiorChart-modal ref="interiorChartModal" :father="aa"></interiorChart-modal>
  75. </a-card>
  76. </template>
  77. <script>
  78. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  79. import JEllipsis from '@/components/jeecg/JEllipsis'
  80. import moment from 'moment'
  81. import interiorChartModal from '@views/reportForms/order-statistics/chart/interiorChartModal.vue'
  82. export default {
  83. name: 'InteriorStatistics', // 订单内部统计表
  84. mixins: [JeecgListMixin],
  85. components: { JEllipsis, moment, interiorChartModal },
  86. data() {
  87. // let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} /> // 省略
  88. return {
  89. description: '订单内部统计表',
  90. // 订单内部统计表 表头
  91. interiorStatisticsColumns: [
  92. {
  93. title: '部门',
  94. width: 140,
  95. dataIndex: 'department',
  96. // fixed: 'left',
  97. className: 'replacecolor'
  98. },
  99. {
  100. title: '供应商分类',
  101. width: 120,
  102. dataIndex: 'supplierType',
  103. className: 'replacecolor'
  104. // customRender: function(text) {
  105. // if (text == '1') {
  106. // return '销售类型1'
  107. // }
  108. // if (text == '2') {
  109. // return '销售类型2'
  110. // }
  111. // if (text == '3') {
  112. // return '销售类型3'
  113. // }
  114. // if (text == '4') {
  115. // return '销售类型4'
  116. // }
  117. // }
  118. },
  119. {
  120. title: '供应商',
  121. width: 140,
  122. dataIndex: 'supplier',
  123. // fixed: 'left',
  124. className: 'replacecolor'
  125. },
  126. // {
  127. // title: '创建时间',
  128. // dataIndex: 'createTime',
  129. // align: 'center',
  130. // sorter: true,
  131. // customRender: text => {
  132. // return moment(text).format('YYYY-MM-DD')
  133. // }
  134. // },
  135. { title: '计划到货月份', width: 120, dataIndex: 'planDeliveryMonth', className: 'replacecolor' },
  136. { title: '含税单价', width: 120, dataIndex: 'priceInTax', className: 'replacecolor' },
  137. {
  138. title: '实际数量',
  139. width: 120,
  140. dataIndex: 'realQuantity',
  141. className: 'replacecolor'
  142. },
  143. { title: '本币金额', width: 150, dataIndex: 'LocalMoney', className: 'replacecolor' }
  144. ],
  145. interiorStatisticsData: [
  146. {
  147. department: '业务八部',
  148. supplierType: '成衣厂',
  149. supplier: '国云森',
  150. planDeliveryMonth: '2021-04',
  151. priceInTax: '87.89',
  152. realQuantity: '90,120,0000',
  153. LocalMoney: '301,929,04'
  154. }
  155. ],
  156. loading: false, // 表格加载
  157. // 查询条件
  158. queryParam: {
  159. startYearMonth: '',
  160. endYearMonth: '',
  161. department: '',
  162. customer: ''
  163. }
  164. }
  165. },
  166. created() {
  167. // 渲染订单销售列表
  168. },
  169. methods: {
  170. // 查询按钮
  171. searchQuery() {
  172. // 渲染订单销售列表
  173. },
  174. searchReset() {
  175. // console.log('>>>>重置')
  176. this.queryParam = {}
  177. // 重新渲染订单销售列表
  178. },
  179. // 内部分析图 弹框
  180. interiorChart() {
  181. this.$refs.interiorChartModal.interiorChartModVis = true
  182. },
  183. // father 抽屉方法
  184. aa() {}
  185. // 分页、排序、筛选变化时触发
  186. // handleTableChange(pagination, filters, sorter) {
  187. // // console.log('当前页信息>>>>',pagination)
  188. // this.queryParam.pageNo = pagination.current
  189. // // this.getOrderList()
  190. // }
  191. },
  192. computed: {},
  193. mounted() {}
  194. }
  195. </script>
  196. <style lang="less" scoped>
  197. @import '~@assets/less/common.less';
  198. @import '~@assets/less/overwriter.less';
  199. /deep/ .ant-table-thead > tr > th {
  200. text-align: center;
  201. // font-weight: 700;
  202. }
  203. /deep/ .ant-table-tbody {
  204. text-align: center;
  205. }
  206. // /deep/ th.replacecolor {
  207. // background-color: #ccc;
  208. // }
  209. </style>