detailsShipDetDrawer.vue 12 KB

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