orderDetailDrawer.vue 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  1. <template>
  2. <!-- 订单数据 详情 -->
  3. <a-drawer
  4. title="详情"
  5. width="89%"
  6. placement="right"
  7. :closable="true"
  8. :visible="visible"
  9. @close="onClose">
  10. <!--主表信息 -->
  11. <a-card :bordered="true">
  12. <div class="table-page-search-wrapper">
  13. <a-form-model layout="inline" ref="form">
  14. <a-row :gutter="24">
  15. <a-col :md="6" :sm="8">
  16. <a-form-model-item label="订单号" prop="orderNumber">
  17. {{ orderDetail.orderNumber }}
  18. </a-form-model-item>
  19. </a-col>
  20. <a-col :md="6" :sm="8">
  21. <a-form-model-item label="订单日期" prop="orderDate">
  22. {{ orderDetail.orderDate }}
  23. </a-form-model-item>
  24. </a-col>
  25. <a-col :md="6" :sm="8">
  26. <a-form-model-item label="业务类型" prop="businessTypeValue">
  27. {{ orderDetail.businessTypeValue }}
  28. </a-form-model-item>
  29. </a-col>
  30. <a-col :md="6" :sm="8">
  31. <a-form-model-item label="销售类型" prop="salesTypeValue">
  32. {{ orderDetail.salesTypeValue }}
  33. </a-form-model-item>
  34. </a-col>
  35. <a-col :md="6" :sm="8">
  36. <a-form-model-item label="客户简称" prop="customerAbbreviation">
  37. {{ orderDetail.customerAbbreviation }}
  38. </a-form-model-item>
  39. </a-col>
  40. <a-col :md="6" :sm="8">
  41. <a-form-model-item label="客户名称" prop="customerName">
  42. {{ orderDetail.customerName }}
  43. </a-form-model-item>
  44. </a-col>
  45. <a-col :md="6" :sm="8">
  46. <a-form-model-item label="汇率" prop="exchangeRate">
  47. {{ orderDetail.exchangeRate }}
  48. </a-form-model-item>
  49. </a-col>
  50. <a-col :md="6" :sm="8">
  51. <a-form-model-item label="销售部门" prop="salesDepartment">
  52. {{ orderDetail.salesDepartment }}
  53. </a-form-model-item>
  54. </a-col>
  55. <a-col :md="6" :sm="8">
  56. <a-form-model-item label="业务员" prop="salesman">
  57. {{ orderDetail.salesman }}
  58. </a-form-model-item>
  59. </a-col>
  60. <a-col :md="6" :sm="8">
  61. <a-form-model-item label="币种" prop="currencyValue">
  62. {{ orderDetail.currencyValue }}
  63. </a-form-model-item>
  64. </a-col>
  65. <a-col :md="6" :sm="8">
  66. <a-form-model-item label="品牌方" prop="brandSide">
  67. {{ orderDetail.brandSide }}
  68. </a-form-model-item>
  69. </a-col>
  70. <a-col :md="6" :sm="8">
  71. <a-form-model-item label="第三方" prop="thirdParty">
  72. {{ orderDetail.thirdParty }}
  73. </a-form-model-item>
  74. </a-col>
  75. <a-col :md="6" :sm="8">
  76. <a-form-model-item label="定金比例(%)" prop="depositRatio">
  77. {{ orderDetail.depositRatio }}
  78. </a-form-model-item>
  79. </a-col>
  80. <a-col :md="6" :sm="8">
  81. <a-form-model-item label="定金" prop="deposit">
  82. {{ orderDetail.deposit }}
  83. </a-form-model-item>
  84. </a-col>
  85. <a-col :md="6" :sm="8">
  86. <a-form-model-item label="协同路线" prop="collaborativeRoute">
  87. {{ orderDetail.collaborativeRoute }}
  88. </a-form-model-item>
  89. </a-col>
  90. <a-col :md="6" :sm="8">
  91. <a-form-model-item label="订单备注" prop="orderRemarks">
  92. {{ orderDetail.orderRemarks }}
  93. </a-form-model-item>
  94. </a-col>
  95. <a-col :md="6" :sm="8">
  96. <a-form-model-item label="价格备注" prop="priceRemarks">
  97. {{ orderDetail.priceRemarks }}
  98. </a-form-model-item>
  99. </a-col>
  100. <!-- TODO:缺少该字段 -->
  101. <a-col :md="6" :sm="8">
  102. <a-form-model-item label="客户订单号" prop="customerOrderNum">
  103. {{ orderDetail.customerOrderNumber }}
  104. </a-form-model-item>
  105. </a-col>
  106. <a-col :md="6" :sm="8">
  107. <a-form-model-item label="整单合计" prop="wholeOrderTotal">
  108. {{ orderDetail.wholeOrderTotal }}
  109. </a-form-model-item>
  110. </a-col>
  111. <a-col :md="6" :sm="8">
  112. <a-form-model-item label="最终客户" prop="endCustomer">
  113. {{ orderDetail.endCustomer }}
  114. </a-form-model-item>
  115. </a-col>
  116. <a-col :md="6" :sm="8">
  117. <a-form-model-item label="付款条件" prop="termOfPayment">
  118. {{ orderDetail.termOfPayment }}
  119. </a-form-model-item>
  120. </a-col>
  121. <a-col :md="18" :sm="12">
  122. <a-form-model-item label="订单变更说明" prop="orderChangeDescription">
  123. {{ orderDetail.orderChangeDescription }}
  124. </a-form-model-item>
  125. </a-col>
  126. </a-row>
  127. </a-form-model>
  128. </div>
  129. </a-card>
  130. <!-- 子表 -->
  131. <a-card :bordered="true" style="margin:10px 0">
  132. <a-table
  133. bordered
  134. :columns="childColumns"
  135. :data-source="childData"
  136. :pagination="ipagination"
  137. :loading="loading"
  138. :scroll="{ x: 1500 }"
  139. @change="handleTableChange"
  140. >
  141. </a-table>
  142. </a-card>
  143. </a-drawer>
  144. </template>
  145. <script>
  146. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  147. import JEllipsis from '@/components/jeecg/JEllipsis'
  148. import moment from 'moment'
  149. export default {
  150. name: 'OrderList',
  151. mixins: [JeecgListMixin],
  152. components: { JEllipsis, moment },
  153. data() {
  154. let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} /> // 省略
  155. return {
  156. description: '订单数据详情 抽屉',
  157. visible: false, // 抽屉
  158. // 表头
  159. childColumns: [
  160. { title: '款号', width: 120, dataIndex: 'itemNumber', fixed: 'left', className: 'replacecolor' },
  161. {
  162. title: '预发货日期',
  163. width: 120,
  164. dataIndex: 'preDeliveryDate',
  165. fixed: 'left',
  166. customRender: text => {
  167. return moment(text).format('YYYY-MM-DD')
  168. },
  169. className: 'replacecolor'
  170. },
  171. {
  172. title: '预完工日期',
  173. width: 120,
  174. dataIndex: 'preCompletionDate',
  175. customRender: text => {
  176. return moment(text).format('YYYY-MM-DD')
  177. },
  178. className: 'replacecolor'
  179. },
  180. { title: 'Pack Id', width: 100, dataIndex: 'packId', className: 'replacecolor' },
  181. { title: '小po', width: 100, dataIndex: 'smallPo', className: 'replacecolor' },
  182. { title: '分销点', width: 150, dataIndex: 'distributionPoint', className: 'replacecolor' },
  183. { title: '存货编码', width: 120, dataIndex: 'inventoryCode', className: 'replacecolor' },
  184. { title: '存货名称', width: 120, dataIndex: 'inventoryName', className: 'replacecolor' },
  185. { title: '规格型号', width: 100, dataIndex: 'specificationAndModel', className: 'replacecolor' },
  186. { title: '颜色', width: 100, dataIndex: 'colour', className: 'replacecolor' },
  187. { title: '尺码', width: 100, dataIndex: 'size', className: 'replacecolor' },
  188. { title: '配码规则', width: 100, dataIndex: 'codingRules', className: 'replacecolor' },
  189. { title: '光坯毛门幅CM', width: 140, dataIndex: 'guangpeiGateWidth', className: 'replacecolor' },
  190. { title: '箱数', width: 100, dataIndex: 'boxNumber', className: 'replacecolor' },
  191. { title: '数量', width: 100, dataIndex: 'quantity', className: 'replacecolor' },
  192. { title: '主计量', width: 100, dataIndex: 'masterMetering', className: 'replacecolor' },
  193. { title: '含税单价', width: 100, dataIndex: 'unitPriceIncludingTax', className: 'replacecolor' },
  194. { title: '价税合计', width: 100, dataIndex: 'totalPriceAndTax', className: 'replacecolor' },
  195. { title: '税率(%)', width: 100, dataIndex: 'taxRate', className: 'replacecolor' },
  196. {
  197. title: '备注',
  198. width: 150,
  199. dataIndex: 'remarks',
  200. customRender: t => ellipsis(t),
  201. className: 'replacecolor',
  202. scopedSlots: { customRender: 'remarks' }
  203. },
  204. { title: '行关闭人', width: 100, dataIndex: 'bankClosedBy', className: 'replacecolor' }
  205. ],
  206. orderDetail: [], // 主表信息
  207. childData: [], // 子表数据
  208. loading: false, // 表格加载
  209. dateFormat: 'YYYY-MM-DD'
  210. }
  211. },
  212. created() {},
  213. methods: {
  214. // 回显主表信息 正常应该通过id查询
  215. onClose() {
  216. // 关闭抽屉
  217. this.visible = false
  218. }
  219. },
  220. computed: {},
  221. mounted() {}
  222. }
  223. </script>
  224. <style lang="less" scoped>
  225. @import '~@assets/less/common.less';
  226. /deep/ .ant-table-thead > tr > th {
  227. text-align: center;
  228. // font-weight: 700;
  229. }
  230. /deep/ .ant-table-tbody {
  231. text-align: center;
  232. }
  233. // /deep/ th.replacecolor {
  234. // background-color: #ccc;
  235. // }
  236. // 抽屉里的card样式
  237. /deep/ .ant-drawer-content {
  238. background-color: #f0f2f5;
  239. }
  240. /deep/ .ant-drawer-body {
  241. padding: 10px;
  242. }
  243. </style>