detailsAdpackingDrawer.vue 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384
  1. <template>
  2. <!-- 详情 预装箱单-成衣 单证-->
  3. <a-drawer title="详情" width="89%" placement="right" :closable="true" :visible="visible" @close="onClose">
  4. <!-- 主表信息 展示 -->
  5. <a-card :bordered="true">
  6. <div class="table-page-search-wrapper">
  7. <a-form-model layout="inline" ref="form">
  8. <a-row :gutter="24">
  9. <a-col :md="6" :sm="8">
  10. <a-form-model-item label="订单号" prop="orderNumber">
  11. {{ detailsAdpacking.orderNumber }}
  12. </a-form-model-item>
  13. </a-col>
  14. <a-col :md="6" :sm="8">
  15. <a-form-model-item label="款号" prop="styleNum">
  16. {{ detailsAdpacking.itemNumber }}
  17. </a-form-model-item>
  18. </a-col>
  19. <a-col :md="6" :sm="8">
  20. <a-form-model-item label="品名" prop="productName">
  21. {{ detailsAdpacking.productName }}
  22. </a-form-model-item>
  23. </a-col>
  24. <a-col :md="6" :sm="8">
  25. <a-form-model-item label="尺码范围" prop="sizeRange">
  26. {{ detailsAdpacking.sizeRange }}
  27. </a-form-model-item>
  28. </a-col>
  29. <a-col :md="6" :sm="8">
  30. <a-form-model-item label="客户" prop="customer">
  31. {{ detailsAdpacking.customer }}
  32. </a-form-model-item>
  33. </a-col>
  34. <a-col :md="6" :sm="8">
  35. <a-form-model-item label="集装箱代号" prop="containerCode">
  36. {{ detailsAdpacking.containerCode }}
  37. </a-form-model-item>
  38. </a-col>
  39. <a-col :md="6" :sm="8">
  40. <a-form-model-item label="集装箱号" prop="containerNumber">
  41. {{ detailsAdpacking.containerNumber }}
  42. </a-form-model-item>
  43. </a-col>
  44. <a-col :md="6" :sm="8">
  45. <a-form-model-item label="备注" prop="memo">
  46. {{ detailsAdpacking.memo }}
  47. </a-form-model-item>
  48. </a-col>
  49. <a-col :md="6" :sm="8">
  50. <a-form-model-item label="成衣工厂" prop="garmentFactory">
  51. {{ detailsAdpacking.garmentFactory }}
  52. </a-form-model-item>
  53. </a-col>
  54. </a-row>
  55. </a-form-model>
  56. </div>
  57. </a-card>
  58. <!-- 子表 ipagination-->
  59. <a-card :bordered="true" style="margin:10px 0">
  60. <a-table
  61. bordered
  62. rowKey="id"
  63. :columns="columns"
  64. :data-source="data"
  65. :loading="loading"
  66. :pagination="false"
  67. :scroll="{ x: 1500 }"
  68. @change="handleTableChange"
  69. >
  70. </a-table>
  71. </a-card>
  72. </a-drawer>
  73. </template>
  74. <script>
  75. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  76. import JEllipsis from '@/components/jeecg/JEllipsis'
  77. import moment from 'moment'
  78. import { itemByMainId } from '@api/document/advance-packingList.js'
  79. export default {
  80. name: 'DetailsAdpackingDrawer', // 详情
  81. mixins: [JeecgListMixin],
  82. components: { JEllipsis, moment },
  83. data() {
  84. let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} />
  85. return {
  86. detailsAdpacking: {}, //主表信息
  87. // 表头
  88. columns: [
  89. {
  90. title: '账套',
  91. dataIndex: 'acSetNo',
  92. width: 120,
  93. fixed: 'left',
  94. className: 'replacecolor'
  95. },
  96. {
  97. title: '成衣工厂',
  98. dataIndex: 'garmentFactory',
  99. width: 120,
  100. fixed: 'left',
  101. className: 'replacecolor'
  102. },
  103. {
  104. title: 'HOD',
  105. dataIndex: 'hod',
  106. width: 120,
  107. fixed: 'left',
  108. className: 'replacecolor'
  109. },
  110. {
  111. title: 'STYLE NO.',
  112. dataIndex: 'styleNo',
  113. width: 120,
  114. className: 'replacecolor'
  115. },
  116. {
  117. title: 'PO NO.',
  118. dataIndex: 'poNo',
  119. width: 120,
  120. className: 'replacecolor'
  121. },
  122. {
  123. title: 'ITEM NO./SKU NO./UPC NO./PACKS CODE',
  124. dataIndex: 'itemCode',
  125. width: 340,
  126. className: 'replacecolor'
  127. },
  128. {
  129. title: '分销点/DC/LABEL',
  130. dataIndex: 'distributionPoint',
  131. width: 180,
  132. className: 'replacecolor'
  133. },
  134. {
  135. title: 'PREPACK SKU',
  136. dataIndex: 'prepackSku',
  137. width: 140,
  138. className: 'replacecolor'
  139. },
  140. {
  141. title: 'S',
  142. dataIndex: 's',
  143. width: 120,
  144. className: 'replacecolor'
  145. },
  146. {
  147. title: 'M',
  148. dataIndex: 'm',
  149. width: 120,
  150. className: 'replacecolor'
  151. },
  152. {
  153. title: 'L',
  154. dataIndex: 'l',
  155. width: 120,
  156. className: 'replacecolor'
  157. },
  158. {
  159. title: 'XL',
  160. dataIndex: 'xl',
  161. width: 120,
  162. className: 'replacecolor'
  163. },
  164. {
  165. title: 'XXL',
  166. dataIndex: 'xxl',
  167. width: 120,
  168. className: 'replacecolor'
  169. },
  170. {
  171. title: '3XL',
  172. dataIndex: 'xxxl',
  173. width: 120,
  174. className: 'replacecolor'
  175. },
  176. {
  177. title: '起始箱号',
  178. dataIndex: ' startingBoxNumber.',
  179. width: 120,
  180. className: 'replacecolor'
  181. },
  182. {
  183. title: '结束箱号',
  184. dataIndex: 'endCaseNumber.',
  185. width: 140,
  186. className: 'replacecolor'
  187. },
  188. {
  189. title: '颜色(中英文)',
  190. dataIndex: 'colour',
  191. width: 140,
  192. customRender: t => ellipsis(t),
  193. className: 'replacecolor'
  194. },
  195. {
  196. title: '配码--根据U8订单来显示',
  197. dataIndex: 'withCode',
  198. width: 140,
  199. className: 'replacecolor'
  200. },
  201. {
  202. title: '件数/箱',
  203. dataIndex: 'piecesBox',
  204. width: 90,
  205. className: 'replacecolor'
  206. },
  207. {
  208. title: '箱数',
  209. dataIndex: 'boxNumber',
  210. width: 140,
  211. className: 'replacecolor'
  212. },
  213. {
  214. title: '总件数',
  215. dataIndex: 'total',
  216. width: 140,
  217. className: 'replacecolor'
  218. },
  219. {
  220. title: '净重/箱',
  221. dataIndex: 'netWeight',
  222. width: 90,
  223. className: 'replacecolor'
  224. },
  225. {
  226. title: '总净重',
  227. dataIndex: 'totalNetWeight',
  228. width: 140,
  229. className: 'replacecolor'
  230. },
  231. {
  232. title: '毛重/箱',
  233. dataIndex: 'grossWeight',
  234. width: 120,
  235. className: 'replacecolor'
  236. },
  237. {
  238. title: '总毛重',
  239. dataIndex: 'totalGrossWeight',
  240. width: 140,
  241. className: 'replacecolor'
  242. },
  243. {
  244. title: '外箱长度',
  245. dataIndex: 'outerBoxLength',
  246. width: 120,
  247. className: 'replacecolor'
  248. },
  249. {
  250. title: '外箱宽度',
  251. dataIndex: 'outerBoxWidth',
  252. width: 140,
  253. className: 'replacecolor'
  254. },
  255. {
  256. title: '外箱高度',
  257. dataIndex: 'outerBoxHeight',
  258. width: 140,
  259. className: 'replacecolor'
  260. },
  261. {
  262. title: '总体积',
  263. dataIndex: 'totalVolume',
  264. width: 140,
  265. className: 'replacecolor'
  266. },
  267. {
  268. title: '净净重',
  269. dataIndex: 'netWeightToo',
  270. width: 120,
  271. className: 'replacecolor'
  272. },
  273. {
  274. title: '单价',
  275. dataIndex: 'unitPrice',
  276. width: 120,
  277. className: 'replacecolor'
  278. },
  279. {
  280. title: '总价',
  281. dataIndex: 'totalPrice',
  282. width: 120,
  283. className: 'replacecolor'
  284. },
  285. {
  286. title: '备注(U8)',
  287. dataIndex: 'u8Remarks',
  288. width: 140,
  289. fixed: 'right',
  290. customRender: t => ellipsis(t),
  291. className: 'replacecolor'
  292. }
  293. ],
  294. data: [], //子表信息
  295. loading: false, // 表格加载
  296. pagination: {
  297. pageNo: ''
  298. // total: '',
  299. // current: '',
  300. // pageSize: ''
  301. },
  302. visible: false,
  303. dateFormat: 'YYYY-MM-DD',
  304. record: {} //点击的对象
  305. }
  306. },
  307. created() {
  308. this.getDetailsById()
  309. },
  310. methods: {
  311. // 回显数据
  312. getDetailsById() {
  313. this.$nextTick(() => {
  314. itemByMainId({ id: this.record.id }).then(res => {
  315. if (res.success) {
  316. console.log('点击的对象', res.result)
  317. this.detailsAdpacking = res.result; //主表信息
  318. this.data = [];
  319. if (res.result.syPreAssembledPackingListItemList != null){
  320. this.data = res.result.syPreAssembledPackingListItemList; //子表信息
  321. }
  322. }
  323. })
  324. })
  325. },
  326. handleTableChange(pagination, filters, sorter) {
  327. this.pagination.pageNo = pagination.current
  328. this.getDetailsById()
  329. },
  330. onClose() {
  331. this.visible = false
  332. }
  333. },
  334. modalFormOk() {}
  335. }
  336. </script>
  337. <style lang="less" scoped>
  338. @import '~@assets/less/common.less';
  339. /deep/ .ant-table-thead > tr > th {
  340. text-align: center;
  341. // font-weight: 700;
  342. }
  343. /deep/ .ant-table-tbody {
  344. text-align: center;
  345. }
  346. // /deep/ th.replacecolor {
  347. // background-color: #ccc;
  348. // }
  349. // 抽屉里的card样式
  350. /deep/ .ant-drawer-content {
  351. background-color: #f0f2f5;
  352. }
  353. /deep/ .ant-drawer-body {
  354. padding: 10px;
  355. }
  356. // 回显label文字
  357. /deep/.ant-form-item-label > label {
  358. font-weight: 700;
  359. }
  360. </style>