detailsShipDetDrawer.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505
  1. <template>
  2. <!-- 详情 发运明细 -->
  3. <div id="detailsShipDetDrawer">
  4. <a-drawer title="详情" width="89%" placement="right" :closable="true" :visible="visible" @close="onClose">
  5. <!-- 主表信息 -->
  6. <a-card :bordered="true">
  7. <div class="table-page-search-wrapper">
  8. <a-form-model layout="inline" ref="form">
  9. <a-row :gutter="24">
  10. <a-col :md="6" :sm="8">
  11. <a-form-model-item label="单据号" prop="documentNo">
  12. {{ detailsShipDet.documentNo }}
  13. </a-form-model-item>
  14. </a-col>
  15. <a-col :md="6" :sm="8">
  16. <a-form-model-item label="单据日期" prop="documentDate">
  17. {{ detailsShipDet.documentDate }}
  18. </a-form-model-item>
  19. </a-col>
  20. <a-col :md="6" :sm="8">
  21. <a-form-model-item label="客户" prop="customer">
  22. {{ detailsShipDet.customer }}
  23. </a-form-model-item>
  24. </a-col>
  25. <a-col :md="6" :sm="8">
  26. <a-form-model-item label="订单类型" prop="orderType">
  27. {{ detailsShipDet.orderType }}
  28. </a-form-model-item>
  29. </a-col>
  30. <!-- U8系统适用 -->
  31. <a-col :md="12" :sm="12">
  32. <a-form-model-item label="备注" prop="memo">
  33. {{ detailsShipDet.memo }}
  34. </a-form-model-item>
  35. </a-col>
  36. </a-row>
  37. </a-form-model>
  38. </div>
  39. </a-card>
  40. <!-- 子表 :model="form" -->
  41. <a-card :bordered="true" style="margin:10px 0">
  42. <a-spin :spinning="confirmLoading">
  43. <a-form-model ref="formRef">
  44. <a-table
  45. bordered
  46. rowKey="id"
  47. size="middle"
  48. :columns="columns"
  49. :data-source="syShippingDetailsItemList"
  50. :loading="loading"
  51. :pagination="ipagination"
  52. :scroll="{ x: 2800,y:400 }"
  53. @change="handleTableChange"
  54. >
  55. </a-table>
  56. </a-form-model>
  57. </a-spin>
  58. </a-card>
  59. </a-drawer>
  60. </div>
  61. </template>
  62. <script>
  63. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  64. import JEllipsis from '@/components/jeecg/JEllipsis'
  65. import moment from 'moment'
  66. export default {
  67. name: 'DetailsShipDetDrawer', // 详情 发运明细 抽屉
  68. mixins: [JeecgListMixin],
  69. components: { JEllipsis, moment },
  70. data() {
  71. let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} />
  72. return {
  73. id: '',
  74. detailsShipDet: [], // 主表信息
  75. // 表头
  76. columns: [
  77. {
  78. title: '账套',
  79. dataIndex: 'account',
  80. width: 80,
  81. fixed: 'left',
  82. className: 'replacecolor'
  83. },
  84. {
  85. title: '订单号',
  86. dataIndex: 'orderNumber',
  87. width: 120,
  88. fixed: 'left',
  89. className: 'replacecolor'
  90. },
  91. {
  92. title: '款号',
  93. dataIndex: 'itemNumber',
  94. scopedSlots: { customRender: 'itemNumber' },
  95. fixed: 'left',
  96. width: 180,
  97. className: 'replacecolor'
  98. },
  99. {
  100. title: '小po',
  101. dataIndex: 'smallPo',
  102. width: 120,
  103. className: 'replacecolor'
  104. },
  105. {
  106. title: 'Pack Id',
  107. dataIndex: 'packId',
  108. width: 120,
  109. className: 'replacecolor'
  110. },
  111. {
  112. title: '分销点',
  113. dataIndex: 'distributionPoint',
  114. width: 120,
  115. className: 'replacecolor'
  116. },
  117. {
  118. title: '存货编码',
  119. dataIndex: 'inventoryCode',
  120. width: 120,
  121. className: 'replacecolor'
  122. },
  123. {
  124. title: '存货名称',
  125. dataIndex: 'inventoryName',
  126. width: 250,
  127. className: 'replacecolor'
  128. },
  129. {
  130. title: '颜色',
  131. dataIndex: 'colour',
  132. width: 160,
  133. customRender: t => ellipsis(t),
  134. className: 'replacecolor'
  135. },
  136. {
  137. title: '尺码',
  138. dataIndex: 'size',
  139. width: 100,
  140. className: 'replacecolor'
  141. },
  142. {
  143. title: '配码规格',
  144. dataIndex: 'codingRules',
  145. width: 180,
  146. className: 'replacecolor'
  147. },
  148. {
  149. title: '订单数量',
  150. dataIndex: 'orderQuantity',
  151. width: 120,
  152. className: 'replacecolor'
  153. },
  154. {
  155. title: '发货数量',
  156. dataIndex: 'shipmentQuantity',
  157. width: 120,
  158. className: 'replacecolor'
  159. },
  160. // {
  161. // title: '创建时间',
  162. // dataIndex: 'createTime',
  163. // align: 'center',
  164. // sorter: true,
  165. // customRender: text => {
  166. // return moment(text).format('YYYY-MM-DD')
  167. // }
  168. // },
  169. {
  170. title: '订单日期',
  171. dataIndex: 'orderDate',
  172. width: 120,
  173. className: 'replacecolor',
  174. customRender: text => {
  175. return moment(text).format('YYYY-MM-DD')
  176. }
  177. },
  178. {
  179. title: '预发货日期',
  180. dataIndex: 'preDeliveryDate',
  181. width: 100,
  182. className: 'replacecolor',
  183. },
  184. {
  185. title: '预完工日期',
  186. dataIndex: 'preCompletionDate',
  187. width: 100,
  188. className: 'replacecolor',
  189. },
  190. {
  191. title: '成衣工厂',
  192. dataIndex: 'garmentFactory',
  193. width: 100,
  194. className: 'replacecolor'
  195. },
  196. {
  197. title: '业务类型',
  198. dataIndex: 'businessTypeText',
  199. width: 120,
  200. className: 'replacecolor'
  201. },
  202. {
  203. title: '客户订单',
  204. dataIndex: 'customerOrder',
  205. width: 120,
  206. className: 'replacecolor'
  207. },
  208. {
  209. title: '采购/委外订单号',
  210. dataIndex: 'purOrSubOrder',
  211. scopedSlots: { customRender: 'purOrSubOrder' },
  212. // fixed: 'left',
  213. width: 180,
  214. className: 'replacecolor'
  215. },
  216. {
  217. title: ' 报关单价',
  218. dataIndex: 'customsDeclarationUnitPrice',
  219. scopedSlots: { customRender: 'customsDeclarationUnitPrice' },
  220. // fixed: 'left',
  221. width: 180,
  222. className: 'replacecolor'
  223. },
  224. {
  225. title: '订单数量',
  226. dataIndex: 'orderQuantity',
  227. width: 120,
  228. className: 'replacecolor'
  229. },
  230. {
  231. title: '订单剩余数量',
  232. dataIndex: 'orderRemainingQuantity',
  233. width: 120,
  234. className: 'replacecolor'
  235. },
  236. {
  237. title: '发货数量',
  238. dataIndex: 'shipmentQuantity',
  239. scopedSlots: { customRender: 'shipmentQuantity' },
  240. width: 120,
  241. className: 'replacecolor'
  242. },
  243. {
  244. title: '套装件数',
  245. dataIndex: 'numberOfSets',
  246. scopedSlots: { customRender: 'numberOfSets' },
  247. width: 120,
  248. className: 'replacecolor'
  249. },
  250. {
  251. title: '是否TC功能',
  252. dataIndex: 'isTc',
  253. width: 90,
  254. className: 'replacecolor',
  255. customRender:function(value){
  256. if (value == "1")
  257. return "是";
  258. else if (value == "0")
  259. return "否";
  260. return value;
  261. }
  262. },
  263. {
  264. title: '物料成分',
  265. dataIndex: 'materialComposition',
  266. scopedSlots: { customRender: 'materialComposition' },
  267. width: 140,
  268. className: 'replacecolor'
  269. },
  270. {
  271. title: '销售类型',
  272. dataIndex: 'salesTypeText',
  273. width: 120,
  274. className: 'replacecolor'
  275. },
  276. {
  277. title: '客户简称',
  278. dataIndex: 'customerAbbreviation',
  279. width: 220,
  280. className: 'replacecolor'
  281. },
  282. {
  283. title: '客户名称',
  284. dataIndex: 'customerName',
  285. width: 300,
  286. className: 'replacecolor',
  287. customRender: t => ellipsis(t),
  288. },
  289. {
  290. title: '汇率',
  291. dataIndex: 'exchangeRate',
  292. width: 120,
  293. className: 'replacecolor'
  294. },
  295. // {
  296. // title: '整单(合计)',
  297. // dataIndex: 'wholeOrderTotal',
  298. // width: 120,
  299. // className: 'replacecolor'
  300. // },
  301. {
  302. title: '销售部门',
  303. dataIndex: 'salesDepartment',
  304. width: 120,
  305. className: 'replacecolor'
  306. },
  307. {
  308. title: '业务员',
  309. dataIndex: 'salesman',
  310. width: 120,
  311. className: 'replacecolor'
  312. },
  313. {
  314. title: '币种',
  315. dataIndex: 'currencyText',
  316. width: 120,
  317. className: 'replacecolor'
  318. },
  319. {
  320. title: '品牌方',
  321. dataIndex: 'brandSide',
  322. width: 180,
  323. className: 'replacecolor'
  324. },
  325. {
  326. title: '第三方',
  327. dataIndex: 'thirdParty',
  328. width: 220,
  329. className: 'replacecolor'
  330. },
  331. {
  332. title: '定金比例(%)',
  333. dataIndex: 'depositRatio',
  334. width: 120,
  335. className: 'replacecolor'
  336. },
  337. {
  338. title: '定金',
  339. dataIndex: 'deposit',
  340. width: 120,
  341. className: 'replacecolor'
  342. },
  343. {
  344. title: '协同路线',
  345. dataIndex: 'collaborativeRoute',
  346. width: 120,
  347. className: 'replacecolor'
  348. },
  349. {
  350. title: '单价(销售)',
  351. dataIndex: 'salesUnitPrice',
  352. width: 120,
  353. className: 'replacecolor'
  354. },
  355. {
  356. title: '工厂单价',
  357. dataIndex: 'factoryUnitPrice',
  358. width: 120,
  359. scopedSlots: { customRender: 'factoryUnitPrice' },
  360. className: 'replacecolor'
  361. },
  362. {
  363. title: '付款条件',
  364. dataIndex: 'termOfPayment',
  365. width: 160,
  366. customRender: t => ellipsis(t),
  367. className: 'replacecolor'
  368. },
  369. {
  370. title: '最终客户',
  371. dataIndex: 'endCustomer',
  372. width: 120,
  373. className: 'replacecolor'
  374. },
  375. {
  376. title: '订单备注',
  377. dataIndex: 'orderRemarks',
  378. width: 200,
  379. customRender: t => ellipsis(t),
  380. className: 'replacecolor'
  381. },
  382. {
  383. title: '申报要素',
  384. dataIndex: 'declarationElements',
  385. width: 160,
  386. scopedSlots: { customRender: 'declarationElements' },
  387. className: 'replacecolor'
  388. },
  389. {
  390. title: '价格备注',
  391. dataIndex: 'priceRemarks',
  392. width: 160,
  393. customRender: t => ellipsis(t),
  394. className: 'replacecolor'
  395. },
  396. {
  397. title: '订单变更说明',
  398. dataIndex: 'orderChangeDescription',
  399. width: 160,
  400. customRender: t => ellipsis(t),
  401. className: 'replacecolor'
  402. },
  403. {
  404. title: '处理方式',
  405. dataIndex: 'treatmentMethod',
  406. width: 160,
  407. scopedSlots: { customRender: 'treatmentMethod' },
  408. className: 'replacecolor'
  409. },
  410. {
  411. title: '是否手册纱',
  412. dataIndex: 'manualYarnFlag',
  413. width: 100,
  414. customRender:function(value){
  415. if (value == "1")
  416. return "是";
  417. else if (value == "0")
  418. return "否";
  419. return value;
  420. },
  421. className: 'replacecolor'
  422. },
  423. {
  424. title: '手册纱单价',
  425. dataIndex: 'manualYarnUnitPrice',
  426. width: 160,
  427. scopedSlots: { customRender: 'manualYarnUnitPrice' },
  428. className: 'replacecolor'
  429. },
  430. {
  431. title: '手册纱占比',
  432. dataIndex: 'manualYarnProportion',
  433. width: 120,
  434. scopedSlots: { customRender: 'manualYarnProportion' },
  435. className: 'replacecolor'
  436. }
  437. ],
  438. syShippingDetailsItemList: [], // 子表信息
  439. visible: false,
  440. confirmLoading: false,
  441. dateFormat: 'YYYY-MM-DD'
  442. }
  443. },
  444. created() {},
  445. methods: {
  446. onClose() {
  447. this.$emit('close')
  448. this.visible = false
  449. }
  450. }
  451. }
  452. </script>
  453. <style lang="less" scoped>
  454. @import '~@assets/less/common.less';
  455. /deep/ .ant-table-thead > tr > th {
  456. text-align: center;
  457. // font-weight: 700;
  458. }
  459. /deep/ .ant-table-tbody {
  460. text-align: center;
  461. }
  462. // /deep/ th.replacecolor {
  463. // background-color: #ccc;
  464. // }
  465. // 抽屉里的card样式
  466. /deep/ .ant-drawer-content {
  467. background-color: #f0f2f5;
  468. }
  469. /deep/ .ant-drawer-body {
  470. padding: 10px;
  471. }
  472. // 回显label文字
  473. /deep/.ant-form-item-label > label {
  474. font-weight: 700;
  475. }
  476. </style>