detailsClothesDrawer.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618
  1. <template>
  2. <!-- 详情成衣 -->
  3. <div id="clothesAddDrawer">
  4. <a-drawer
  5. title="详情成衣"
  6. width="89%"
  7. placement="right"
  8. :closable="true"
  9. :visible="visible"
  10. @close="handleCancel">
  11. <!-- 主表信息 填写-->
  12. <a-card :bordered="true">
  13. <div class="table-page-search-wrapper">
  14. <a-form-model layout="inline" ref="formModel" :model="clothesAdd">
  15. <a-row :gutter="24">
  16. <a-col :md="6" :sm="8">
  17. <a-form-model-item label="订单号" prop="orderNum">
  18. {{clothesAdd.orderNum}}
  19. </a-form-model-item>
  20. </a-col>
  21. <a-col :md="6" :sm="8">
  22. <a-form-model-item label="款号" prop="styleNum">
  23. {{clothesAdd.styleNum}}
  24. </a-form-model-item>
  25. </a-col>
  26. <a-col :md="6" :sm="8">
  27. <a-form-model-item label="中文品名" prop="name">
  28. {{clothesAdd.name}}
  29. <!-- <a-input placeholder="请输入中文品名" v-model="clothesAdd.name"></a-input> -->
  30. </a-form-model-item>
  31. </a-col>
  32. <a-col :md="6" :sm="8">
  33. <a-form-model-item label="英文品名" prop="englishProductName">
  34. {{clothesAdd.englishProductName}}
  35. <!-- <a-input placeholder="请输入英文品名" v-model="clothesAdd.englishProductName"></a-input> -->
  36. </a-form-model-item>
  37. </a-col>
  38. <a-col :md="6" :sm="8">
  39. <a-form-model-item label="尺码范围" prop="sizeRange">
  40. {{clothesAdd.sizeRange}}
  41. </a-form-model-item>
  42. </a-col>
  43. <a-col :md="6" :sm="8">
  44. <a-form-model-item label="客户" prop="customer">
  45. {{clothesAdd.customer | ellipsis}}
  46. </a-form-model-item>
  47. </a-col>
  48. <a-col :md="6" :sm="8">
  49. <a-form-model-item label="集装箱代号" prop="containerCode">
  50. {{clothesAdd.containerCode}}
  51. </a-form-model-item>
  52. </a-col>
  53. <a-col :md="6" :sm="8">
  54. <a-form-model-item label="集装箱号" prop="containerNo">
  55. {{clothesAdd.containerNo}}
  56. </a-form-model-item>
  57. </a-col>
  58. <a-col :md="6" :sm="8">
  59. <a-form-model-item label="备注" prop="note">
  60. {{clothesAdd.note}}
  61. </a-form-model-item>
  62. </a-col>
  63. <!-- <a-col :md="6" :sm="8">
  64. <a-form-model-item label="成衣工厂" prop="clothesFactory">
  65. {{clothesAdd.clothesFactory}}
  66. </a-form-model-item>
  67. </a-col> -->
  68. <a-col :md="6" :sm="8">
  69. <a-form-model-item label="外销发票号" prop="exportInvoiceNo">
  70. {{clothesAdd.exportInvoiceNo}}
  71. </a-form-model-item>
  72. </a-col>
  73. <a-col :md="6" :sm="8">
  74. <a-form-model-item label="托书号" prop="bookNum">
  75. {{clothesAdd.bookNum}}
  76. </a-form-model-item>
  77. </a-col>
  78. <a-col :md="6" :sm="8">
  79. <a-form-model-item label="总箱数" prop="totalBoxes">
  80. {{clothesAdd.totalBoxes}}
  81. </a-form-model-item>
  82. </a-col>
  83. <a-col :md="6" :sm="8">
  84. <a-form-model-item label="总毛重" prop="totalGrossWeight">
  85. {{clothesAdd.totalGrossWeight}}
  86. </a-form-model-item>
  87. </a-col>
  88. <a-col :md="6" :sm="8">
  89. <a-form-model-item label="总净重" prop="totalNetWeight">
  90. {{clothesAdd.totalNetWeight}}
  91. </a-form-model-item>
  92. </a-col>
  93. <a-col :md="6" :sm="8">
  94. <a-form-model-item label="总体积" prop="totalVolume">
  95. {{clothesAdd.totalVolume}}
  96. </a-form-model-item>
  97. </a-col>
  98. <!-- <a-col :md="6" :sm="8">
  99. <a-form-model-item label="总价" prop="totalPrice">
  100. {{clothesAdd.totalPrice}}
  101. </a-form-model-item>
  102. </a-col> -->
  103. <a-col :md="6" :sm="8">
  104. <a-form-model-item label="总件数" prop="total">
  105. {{clothesAdd.total}}
  106. </a-form-model-item>
  107. </a-col>
  108. </a-row>
  109. </a-form-model>
  110. </div>
  111. </a-card>
  112. <a-card :bordered="true" style="margin:10px 0 60px 0;">
  113. <!-- 子表 :pagination="ipagination" -->
  114. <a-spin :spinning="confirmLoading">
  115. <a-form-model ref="formRef">
  116. <j-vxe-table
  117. ref="vTable"
  118. :height="300"
  119. :loading="loading"
  120. :dataSource="clothesAddData"
  121. :columns="clothesAddColumns"
  122. :bordered=true
  123. :scroll="{ x: 1500,y: 400 }"
  124. style="margin-top: 5px;"
  125. >
  126. </j-vxe-table>
  127. </a-form-model>
  128. </a-spin>
  129. </a-card>
  130. </a-drawer>
  131. </div>
  132. </template>
  133. <script>
  134. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  135. import { JVXETypes } from '@/components/jeecg/JVxeTable'
  136. import JEllipsis from '@/components/jeecg/JEllipsis'
  137. export default {
  138. name: 'detailsClothesDrawer', // 详情-装箱单 -成衣
  139. mixins: [JeecgListMixin],
  140. computed: {},
  141. components: { JEllipsis }, // 参照预装箱单 弹框
  142. data() {
  143. let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} />
  144. return {
  145. toolbarConfig: {
  146. // // add 新增按钮;remove 删除按钮;clearSelection 清空选择按钮
  147. // btn: []
  148. },
  149. // 表头
  150. clothesAddColumns: [
  151. {
  152. title: '账套',
  153. key: 'acSetNo',
  154. width: 160,
  155. // fixed: 'left',
  156. type: JVXETypes.normal,
  157. },
  158. {
  159. title: '成衣工厂',
  160. key: 'garmentFactory',
  161. width: 120,
  162. // fixed: 'left',
  163. type: JVXETypes.normal,
  164. },
  165. {
  166. title: 'HOD',
  167. key: 'hod',
  168. width: 120,
  169. type: JVXETypes.normal,
  170. },
  171. {
  172. title: 'STYLE NO.',
  173. key: 'styleNo',
  174. width: 120,
  175. type: JVXETypes.normal,
  176. },
  177. {
  178. title: 'PO NO.',
  179. key: 'poNo',
  180. width: 90,
  181. type: JVXETypes.normal,
  182. },
  183. {
  184. title: 'ITEM NO./SKU NO./UPC NO./PACKS CODE',
  185. key: 'itemCode',
  186. width: 340,
  187. type: JVXETypes.normal,
  188. },
  189. {
  190. title: 'PREPACK SKU',
  191. key: 'prepackSku',
  192. width: 200,
  193. type: JVXETypes.normal,
  194. },
  195. {
  196. title: '分销点/DC/LABEL',
  197. key: 'distributionPoint',
  198. width: 200,
  199. type: JVXETypes.normal,
  200. insertAfter:true,
  201. },
  202. {
  203. title: '启始箱号',
  204. key: 'startingBoxNumber',
  205. type: JVXETypes.normal ,
  206. width: 120,
  207. },
  208. {
  209. title: '结束箱号',
  210. key: 'endCaseNumber',
  211. width: 120,
  212. type: JVXETypes.normal
  213. },
  214. {
  215. title: '颜色(中英文)',
  216. key: 'colour',
  217. width: 140,
  218. type: JVXETypes.normal,
  219. },
  220. {
  221. title: '配码',
  222. key: 'withCode',
  223. width: 120,
  224. type: JVXETypes.normal,
  225. },
  226. {
  227. title: '件数/箱',
  228. key: 'piecesBox',
  229. width: 120,
  230. type: JVXETypes.normal
  231. },
  232. {
  233. title: '箱数',
  234. key: 'boxNumber',
  235. width: 120,
  236. type: JVXETypes.normal
  237. },
  238. {
  239. title: '计划尺码数量',
  240. key: 'planSize',
  241. width: 240,
  242. type: JVXETypes.normal ,
  243. },
  244. {
  245. title: '计划装箱数量',
  246. key: 'planQuantity',
  247. width: 240,
  248. type: JVXETypes.normal ,
  249. },
  250. {
  251. title: '总件数',
  252. key: 'total',
  253. width: 90,
  254. type: JVXETypes.normal,
  255. },
  256. {
  257. title: '净重/箱',
  258. key: 'netWeight',
  259. width: 120,
  260. type: JVXETypes.normal
  261. },
  262. {
  263. title: '总净重',
  264. key: 'totalNetWeight',
  265. width: 90,
  266. type: JVXETypes.normal,
  267. },
  268. {
  269. title: '毛重/箱',
  270. key: 'grossWeight',
  271. width: 120,
  272. type: JVXETypes.normal
  273. },
  274. {
  275. title: '总毛重',
  276. key: 'totalGrossWeight',
  277. width: 90,
  278. type: JVXETypes.normal,
  279. },
  280. {
  281. title: '外箱长度',
  282. key: 'outerBoxLength',
  283. width: 120,
  284. type: JVXETypes.normal
  285. },
  286. {
  287. title: '外箱宽度',
  288. key: 'outerBoxWidth',
  289. width: 120,
  290. type: JVXETypes.normal
  291. },
  292. {
  293. title: '外箱高度',
  294. key: 'outerBoxHeight',
  295. width: 120,
  296. type: JVXETypes.normal
  297. },
  298. {
  299. title: '总体积',
  300. key: 'totalVolume',
  301. width: 120,
  302. type: JVXETypes.normal,
  303. },
  304. {
  305. title: '净净重',
  306. key: 'netWeightToo',
  307. width: 120,
  308. type: JVXETypes.normal,
  309. },
  310. {
  311. title: '备注',
  312. key: 'remarks',
  313. width: 140,
  314. customRender: t => ellipsis(t),
  315. // fixed: 'right',
  316. type: JVXETypes.normal,
  317. },
  318. ],
  319. clothesAddData: [],
  320. loading: false, // 表格加载
  321. clothesAdd: {},
  322. pagination: {
  323. // total: '',
  324. // current: 0,
  325. // pageSize: 0
  326. },
  327. editDecide:'add',
  328. visible: false,
  329. sizeFields:[], // 尺码字段
  330. confirmLoading: false,
  331. // validatorRules: {
  332. // orderNum: [{ required: true, message: '订单号不能为空', trigger: 'blur' }],
  333. // styleNum: [{ required: true, message: '款号不能为空', trigger: 'blur' }],
  334. // name: [{ required: true, message: '品名不能为空', trigger: 'blur' }]
  335. // // 待确定还有哪些必填信息
  336. // }
  337. // dateFormat: 'YYYY-MM-DD'
  338. }
  339. },
  340. // 接收父组件查询方法
  341. props: {
  342. fatherList: {
  343. type: Function,
  344. default: null
  345. }
  346. },
  347. created() {},
  348. mounted() {},
  349. methods: {
  350. dynamicColumns(sizeTables){
  351. var newColumns = this.clothesAddColumns
  352. if (sizeTables != null){
  353. var i = 0
  354. for(;i < newColumns.length ; i++){
  355. if(newColumns[i].insertAfter){
  356. break;
  357. }
  358. }
  359. // 插入数据
  360. for (var j=0;j<sizeTables.length;j++){
  361. this.sizeFields.push('size-'+sizeTables[j].size);
  362. var field = {
  363. title: sizeTables[j].size,
  364. key: 'size-'+sizeTables[j].size,
  365. type: JVXETypes.normal ,
  366. width: 80,
  367. isSize:true,
  368. };
  369. newColumns.splice(i+1+j,0,field);
  370. }
  371. }
  372. this.clothesAddColumns = newColumns
  373. },
  374. // 抽屉 取消
  375. handleCancel() {
  376. console.log('点击抽屉取消')
  377. this.close()
  378. },
  379. // -------------------------------------
  380. close() {
  381. this.$emit('close')
  382. this.visible = false
  383. this.clothesAdd = {}
  384. this.clothesAddData = []
  385. this.sizeFields = []
  386. this.initializationColumns()
  387. // this.$refs.form.resetFields()
  388. },
  389. //初始化表头
  390. initializationColumns(){
  391. this.clothesAddColumns= [
  392. {
  393. title: '账套',
  394. key: 'acSetNo',
  395. width: 160,
  396. // fixed: 'left',
  397. type: JVXETypes.normal,
  398. },
  399. {
  400. title: '成衣工厂',
  401. key: 'garmentFactory',
  402. width: 120,
  403. // fixed: 'left',
  404. type: JVXETypes.normal,
  405. },
  406. {
  407. title: 'HOD',
  408. key: 'hod',
  409. width: 120,
  410. type: JVXETypes.normal,
  411. },
  412. {
  413. title: 'STYLE NO.',
  414. key: 'styleNo',
  415. width: 120,
  416. type: JVXETypes.normal,
  417. },
  418. {
  419. title: 'PO NO.',
  420. key: 'poNo',
  421. width: 90,
  422. type: JVXETypes.normal,
  423. },
  424. {
  425. title: 'ITEM NO./SKU NO./UPC NO./PACKS CODE',
  426. key: 'itemCode',
  427. width: 340,
  428. type: JVXETypes.normal,
  429. },
  430. {
  431. title: 'PREPACK SKU',
  432. key: 'prepackSku',
  433. width: 200,
  434. type: JVXETypes.input,
  435. },
  436. {
  437. title: '分销点/DC/LABEL',
  438. key: 'distributionPoint',
  439. width: 200,
  440. type: JVXETypes.normal,
  441. insertAfter:true,
  442. },
  443. {
  444. title: '启始箱号',
  445. key: 'startingBoxNumber',
  446. type: JVXETypes.normal ,
  447. width: 120,
  448. },
  449. {
  450. title: '结束箱号',
  451. key: 'endCaseNumber',
  452. width: 120,
  453. type: JVXETypes.normal
  454. },
  455. {
  456. title: '颜色(中英文)',
  457. key: 'colour',
  458. width: 140,
  459. type: JVXETypes.normal,
  460. },
  461. {
  462. title: '配码',
  463. key: 'withCode',
  464. width: 120,
  465. type: JVXETypes.normal,
  466. },
  467. {
  468. title: '件数/箱',
  469. key: 'piecesBox',
  470. width: 120,
  471. type: JVXETypes.normal
  472. },
  473. {
  474. title: '箱数',
  475. key: 'boxNumber',
  476. width: 120,
  477. type: JVXETypes.normal
  478. },
  479. {
  480. title: '计划尺码数量',
  481. key: 'planSize',
  482. width: 240,
  483. type: JVXETypes.normal ,
  484. },
  485. {
  486. title: '计划装箱数量',
  487. key: 'planQuantity',
  488. width: 240,
  489. type: JVXETypes.normal ,
  490. },
  491. {
  492. title: '总件数',
  493. key: 'total',
  494. width: 90,
  495. type: JVXETypes.normal,
  496. },
  497. {
  498. title: '净重/箱',
  499. key: 'netWeight',
  500. width: 120,
  501. type: JVXETypes.normal
  502. },
  503. {
  504. title: '总净重',
  505. key: 'totalNetWeight',
  506. width: 90,
  507. type: JVXETypes.normal,
  508. },
  509. {
  510. title: '毛重/箱',
  511. key: 'grossWeight',
  512. width: 120,
  513. type: JVXETypes.normal
  514. },
  515. {
  516. title: '总毛重',
  517. key: 'totalGrossWeight',
  518. width: 90,
  519. type: JVXETypes.normal,
  520. },
  521. {
  522. title: '外箱长度',
  523. key: 'outerBoxLength',
  524. width: 120,
  525. type: JVXETypes.normal
  526. },
  527. {
  528. title: '外箱宽度',
  529. key: 'outerBoxWidth',
  530. width: 120,
  531. type: JVXETypes.normal
  532. },
  533. {
  534. title: '外箱高度',
  535. key: 'outerBoxHeight',
  536. width: 120,
  537. type: JVXETypes.normal
  538. },
  539. {
  540. title: '总体积',
  541. key: 'totalVolume',
  542. width: 120,
  543. type: JVXETypes.normal,
  544. },
  545. {
  546. title: '净净重',
  547. key: 'netWeightToo',
  548. width: 120,
  549. type: JVXETypes.normal,
  550. },
  551. {
  552. title: '备注',
  553. key: 'remarks',
  554. width: 140,
  555. customRender: t => ellipsis(t),
  556. // fixed: 'right',
  557. type: JVXETypes.normal,
  558. },
  559. ]
  560. },
  561. // - father------------------------------------
  562. aa() {},
  563. modalFormOk() {},
  564. }
  565. }
  566. </script>
  567. <style lang="less" scoped>
  568. @import '~@assets/less/common.less';
  569. @import '~@assets/less/overwriter.less';
  570. /deep/ .ant-table-thead > tr > th {
  571. text-align: center;
  572. // font-weight: 700;
  573. }
  574. /deep/ .ant-table-tbody {
  575. text-align: center;
  576. }
  577. // /deep/ th.replacecolor {
  578. // background-color: #ccc;
  579. // }
  580. // 抽屉里的card样式
  581. /deep/ .ant-drawer-content {
  582. background-color: #f0f2f5;
  583. }
  584. /deep/ .ant-drawer-body {
  585. padding: 10px;
  586. }
  587. </style>