detailsShipDetDrawer.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433
  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: 1500 }"
  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: '创建时间',
  101. // dataIndex: 'createTime',
  102. // align: 'center',
  103. // sorter: true,
  104. // customRender: text => {
  105. // return moment(text).format('YYYY-MM-DD')
  106. // }
  107. // },
  108. {
  109. title: '订单日期',
  110. dataIndex: 'orderDate',
  111. width: 120,
  112. className: 'replacecolor'
  113. },
  114. {
  115. title: '业务类型',
  116. dataIndex: 'businessTypeText',
  117. width: 120,
  118. className: 'replacecolor'
  119. },
  120. {
  121. title: '客户订单',
  122. dataIndex: 'customerOrder',
  123. width: 120,
  124. className: 'replacecolor'
  125. },
  126. {
  127. title: '小po',
  128. dataIndex: 'smallPo',
  129. width: 120,
  130. className: 'replacecolor'
  131. },
  132. {
  133. title: 'Pack Id',
  134. dataIndex: 'packId',
  135. width: 120,
  136. className: 'replacecolor'
  137. },
  138. {
  139. title: '分销点',
  140. dataIndex: 'distributionPoint',
  141. width: 120,
  142. className: 'replacecolor'
  143. },
  144. {
  145. title: '采购/委外订单号',
  146. dataIndex: 'purOrSubOrder',
  147. scopedSlots: { customRender: 'purOrSubOrder' },
  148. // fixed: 'left',
  149. width: 180,
  150. className: 'replacecolor'
  151. },
  152. {
  153. title: ' 报关单价',
  154. dataIndex: 'customsDeclarationUnitPrice',
  155. scopedSlots: { customRender: 'customsDeclarationUnitPrice' },
  156. // fixed: 'left',
  157. width: 180,
  158. className: 'replacecolor'
  159. },
  160. {
  161. title: '订单数量',
  162. dataIndex: 'orderQuantity',
  163. width: 120,
  164. className: 'replacecolor'
  165. },
  166. {
  167. title: '订单剩余数量',
  168. dataIndex: 'orderRemainingQuantity',
  169. width: 120,
  170. className: 'replacecolor'
  171. },
  172. {
  173. title: '发货数量',
  174. dataIndex: 'shipmentQuantity',
  175. scopedSlots: { customRender: 'shipmentQuantity' },
  176. width: 120,
  177. className: 'replacecolor'
  178. },
  179. {
  180. title: '套装件数',
  181. dataIndex: 'numberOfSets',
  182. scopedSlots: { customRender: 'numberOfSets' },
  183. width: 120,
  184. className: 'replacecolor'
  185. },
  186. {
  187. title: '是否TC功能',
  188. dataIndex: 'isTc',
  189. width: 90,
  190. className: 'replacecolor',
  191. customRender:function(value){
  192. if (value == "1")
  193. return "是";
  194. else if (value == "0")
  195. return "否";
  196. return value;
  197. }
  198. },
  199. {
  200. title: '物料成分',
  201. dataIndex: 'materialComposition',
  202. scopedSlots: { customRender: 'materialComposition' },
  203. width: 140,
  204. className: 'replacecolor'
  205. },
  206. {
  207. title: '销售类型',
  208. dataIndex: 'salesTypeText',
  209. width: 120,
  210. className: 'replacecolor'
  211. },
  212. {
  213. title: '客户简称',
  214. dataIndex: 'customerAbbreviation',
  215. width: 120,
  216. className: 'replacecolor'
  217. },
  218. {
  219. title: '客户名称',
  220. dataIndex: 'customerName',
  221. width: 120,
  222. className: 'replacecolor'
  223. },
  224. {
  225. title: '汇率',
  226. dataIndex: 'exchangeRate',
  227. width: 120,
  228. className: 'replacecolor'
  229. },
  230. // {
  231. // title: '整单(合计)',
  232. // dataIndex: 'wholeOrderTotal',
  233. // width: 120,
  234. // className: 'replacecolor'
  235. // },
  236. {
  237. title: '销售部门',
  238. dataIndex: 'salesDepartment',
  239. width: 120,
  240. className: 'replacecolor'
  241. },
  242. {
  243. title: '业务员',
  244. dataIndex: 'salesman',
  245. width: 120,
  246. className: 'replacecolor'
  247. },
  248. {
  249. title: '币种',
  250. dataIndex: 'currencyText',
  251. width: 120,
  252. className: 'replacecolor'
  253. },
  254. {
  255. title: '品牌方',
  256. dataIndex: 'brandSide',
  257. width: 120,
  258. className: 'replacecolor'
  259. },
  260. {
  261. title: '第三方',
  262. dataIndex: 'thirdParty',
  263. width: 120,
  264. className: 'replacecolor'
  265. },
  266. {
  267. title: '定金比例(%)',
  268. dataIndex: 'depositRatio',
  269. width: 120,
  270. className: 'replacecolor'
  271. },
  272. {
  273. title: '定金',
  274. dataIndex: 'deposit',
  275. width: 120,
  276. className: 'replacecolor'
  277. },
  278. {
  279. title: '协同路线',
  280. dataIndex: 'collaborativeRoute',
  281. width: 120,
  282. className: 'replacecolor'
  283. },
  284. {
  285. title: '单价(销售)',
  286. dataIndex: 'salesUnitPrice',
  287. width: 120,
  288. className: 'replacecolor'
  289. },
  290. {
  291. title: '工厂单价',
  292. dataIndex: 'factoryUnitPrice',
  293. width: 120,
  294. scopedSlots: { customRender: 'factoryUnitPrice' },
  295. className: 'replacecolor'
  296. },
  297. {
  298. title: '付款条件',
  299. dataIndex: 'termOfPayment',
  300. width: 160,
  301. customRender: t => ellipsis(t),
  302. className: 'replacecolor'
  303. },
  304. {
  305. title: '最终客户',
  306. dataIndex: 'endCustomer',
  307. width: 120,
  308. className: 'replacecolor'
  309. },
  310. {
  311. title: '订单备注',
  312. dataIndex: 'orderRemarks',
  313. width: 160,
  314. customRender: t => ellipsis(t),
  315. className: 'replacecolor'
  316. },
  317. {
  318. title: '申报要素',
  319. dataIndex: 'declarationElements',
  320. width: 160,
  321. scopedSlots: { customRender: 'declarationElements' },
  322. className: 'replacecolor'
  323. },
  324. {
  325. title: '价格备注',
  326. dataIndex: 'priceRemarks',
  327. width: 160,
  328. customRender: t => ellipsis(t),
  329. className: 'replacecolor'
  330. },
  331. {
  332. title: '订单变更说明',
  333. dataIndex: 'orderChangeDescription',
  334. width: 160,
  335. customRender: t => ellipsis(t),
  336. className: 'replacecolor'
  337. },
  338. {
  339. title: '处理方式',
  340. dataIndex: 'treatmentMethod',
  341. width: 160,
  342. scopedSlots: { customRender: 'treatmentMethod' },
  343. className: 'replacecolor'
  344. },
  345. {
  346. title: '是否手册纱',
  347. dataIndex: 'manualYarnFlag',
  348. width: 100,
  349. customRender:function(value){
  350. if (value == "1")
  351. return "是";
  352. else if (value == "0")
  353. return "否";
  354. return value;
  355. },
  356. className: 'replacecolor'
  357. },
  358. {
  359. title: '手册纱单价',
  360. dataIndex: 'manualYarnUnitPrice',
  361. width: 160,
  362. scopedSlots: { customRender: 'manualYarnUnitPrice' },
  363. className: 'replacecolor'
  364. },
  365. {
  366. title: '手册纱占比',
  367. dataIndex: 'manualYarnProportion',
  368. width: 120,
  369. scopedSlots: { customRender: 'manualYarnProportion' },
  370. className: 'replacecolor'
  371. }
  372. ],
  373. syShippingDetailsItemList: [], // 子表信息
  374. visible: false,
  375. confirmLoading: false,
  376. dateFormat: 'YYYY-MM-DD'
  377. }
  378. },
  379. created() {},
  380. methods: {
  381. onClose() {
  382. this.$emit('close')
  383. this.visible = false
  384. }
  385. }
  386. }
  387. </script>
  388. <style lang="less" scoped>
  389. @import '~@assets/less/common.less';
  390. /deep/ .ant-table-thead > tr > th {
  391. text-align: center;
  392. // font-weight: 700;
  393. }
  394. /deep/ .ant-table-tbody {
  395. text-align: center;
  396. }
  397. // /deep/ th.replacecolor {
  398. // background-color: #ccc;
  399. // }
  400. // 抽屉里的card样式
  401. /deep/ .ant-drawer-content {
  402. background-color: #f0f2f5;
  403. }
  404. /deep/ .ant-drawer-body {
  405. padding: 10px;
  406. }
  407. // 回显label文字
  408. /deep/.ant-form-item-label > label {
  409. font-weight: 700;
  410. }
  411. </style>