da9d3dc82a1c5f36d20ce459e752e135d6616a32.svn-base 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. <template>
  2. <a-card :bordered="false">
  3. <!-- 查询区域 -->
  4. <div class="table-page-search-wrapper">
  5. <a-form layout="inline">
  6. <a-row :gutter="24">
  7. <a-col :md="6" :sm="24">
  8. <a-form-item label="订单号">
  9. <a-input placeholder="请输入订单号" v-model="queryParam.orderCode"></a-input>
  10. </a-form-item>
  11. </a-col>
  12. <a-col :md="6" :sm="24">
  13. <a-form-item label="订单类型">
  14. <a-select placeholder="请输入订单类型" v-model="queryParam.ctype">
  15. <a-select-option value="1">国内订单</a-select-option>
  16. <a-select-option value="2">国际订单</a-select-option>
  17. </a-select>
  18. </a-form-item>
  19. </a-col>
  20. <a-col :md="6" :sm="24">
  21. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  22. <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  23. <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  24. </span>
  25. </a-col>
  26. </a-row>
  27. </a-form>
  28. </div>
  29. <!-- 操作按钮区域 -->
  30. <div class="table-operator">
  31. <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
  32. <a-dropdown v-if="selectedRowKeys.length > 0">
  33. <a-menu slot="overlay">
  34. <a-menu-item key="1" @click="batchDel">
  35. <a-icon type="delete"/>
  36. 删除
  37. </a-menu-item>
  38. </a-menu>
  39. <a-button style="margin-left: 8px"> 批量操作
  40. <a-icon type="down"/>
  41. </a-button>
  42. </a-dropdown>
  43. </div>
  44. <!-- table区域-begin -->
  45. <div>
  46. <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  47. <i class="anticon anticon-info-circle ant-alert-icon"></i>
  48. <span>已选择</span>
  49. <a style="font-weight: 600">
  50. {{ selectedRowKeys.length }}
  51. </a>
  52. <span>项</span>
  53. <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  54. </div>
  55. <a-table
  56. ref="table"
  57. size="middle"
  58. bordered
  59. rowKey="id"
  60. :columns="columns"
  61. :dataSource="dataSource"
  62. :pagination="ipagination"
  63. :loading="loading"
  64. :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  65. @change="handleTableChange">
  66. <span slot="action" slot-scope="text, record">
  67. <a @click="handleEdit(record)">编辑</a>
  68. <a-divider type="vertical"/>
  69. <a-dropdown>
  70. <a class="ant-dropdown-link">更多 <a-icon type="down"/></a>
  71. <a-menu slot="overlay">
  72. <a-menu-item>
  73. <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
  74. <a>删除</a>
  75. </a-popconfirm>
  76. </a-menu-item>
  77. </a-menu>
  78. </a-dropdown>
  79. </span>
  80. </a-table>
  81. </div>
  82. <!-- table区域-end -->
  83. <!-- 表单区域 -->
  84. <jeecg-order-modal-for-j-editable-table ref="modalForm" @ok="modalFormOk"/>
  85. </a-card>
  86. </template>
  87. <script>
  88. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  89. import JeecgOrderModalForJEditableTable from './modules/JeecgOrderModalForJEditableTable'
  90. export default {
  91. name: 'JeecgOrderMainListForJEditableTable',
  92. mixins: [JeecgListMixin],
  93. components: {
  94. JeecgOrderModalForJEditableTable
  95. },
  96. data() {
  97. return {
  98. description: '订单管理页面',
  99. // 请求参数
  100. url: {
  101. list: '/test/jeecgOrderMain/list',
  102. delete: '/test/jeecgOrderMain/delete',
  103. deleteBatch: '/test/jeecgOrderMain/deleteBatch'
  104. },
  105. // 表头
  106. columns: [
  107. {
  108. title: '#',
  109. dataIndex: '',
  110. key: 'rowIndex',
  111. width: 60,
  112. align: 'center',
  113. customRender: function(t, r, index) {
  114. return parseInt(index) + 1
  115. }
  116. },
  117. {
  118. title: '订单号',
  119. align: 'center',
  120. dataIndex: 'orderCode'
  121. },
  122. {
  123. title: '订单类型',
  124. align: 'center',
  125. dataIndex: 'ctype',
  126. customRender: (text) => {
  127. let re = ''
  128. if (text === '1') {
  129. re = '国内订单'
  130. } else if (text === '2') {
  131. re = '国际订单'
  132. }
  133. return re
  134. }
  135. },
  136. {
  137. title: '订单日期',
  138. align: 'center',
  139. dataIndex: 'orderDate'
  140. },
  141. {
  142. title: '订单金额',
  143. align: 'center',
  144. dataIndex: 'orderMoney'
  145. },
  146. {
  147. title: '订单备注',
  148. align: 'center',
  149. dataIndex: 'content'
  150. },
  151. {
  152. title: '操作',
  153. dataIndex: 'action',
  154. align: 'center',
  155. scopedSlots: { customRender: 'action' }
  156. }
  157. ]
  158. }
  159. },
  160. methods: {
  161. initDictConfig() {
  162. }
  163. }
  164. }
  165. </script>
  166. <style scoped>
  167. .ant-card-body .table-operator {
  168. margin-bottom: 18px;
  169. }
  170. .ant-table-tbody .ant-table-row td {
  171. padding-top: 15px;
  172. padding-bottom: 15px;
  173. }
  174. .anty-row-operator button {
  175. margin: 0 5px
  176. }
  177. .ant-btn-danger {
  178. background-color: #ffffff
  179. }
  180. .ant-modal-cust-warp {
  181. height: 100%
  182. }
  183. .ant-modal-cust-warp .ant-modal-body {
  184. height: calc(100% - 110px) !important;
  185. overflow-y: auto
  186. }
  187. .ant-modal-cust-warp .ant-modal-content {
  188. height: 90% !important;
  189. overflow-y: hidden
  190. }
  191. </style>