detailsPreBookDrawer.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457
  1. <template>
  2. <!-- 详情预托书 回显所有信息-->
  3. <div id="editPreBookDrawer">
  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="form" :model="preBook">
  15. <a-row :gutter="24">
  16. <a-col :md="6" :sm="8">
  17. <a-form-model-item label="托书日期" prop="bookDate">
  18. 2022-03-15
  19. <!-- <a-date-picker
  20. placeholder="请选择托书日期"
  21. style="width:100%;"
  22. :format="dateFormat"
  23. v-model="preBook.bookDate"
  24. /> -->
  25. </a-form-model-item>
  26. </a-col>
  27. <a-col :md="6" :sm="8">
  28. <a-form-model-item label="托书号" prop="bookNum">
  29. <!-- <a-input placeholder="请输入托书号" v-model="preBook.bookNum"></a-input> -->
  30. </a-form-model-item>
  31. </a-col>
  32. <a-col :md="12" :sm="12">
  33. <a-form-model-item label="外销发票号码" prop="exportInvoiceNo">
  34. <!-- <a-input placeholder="请输入外销发票号码" v-model="preBook.exportInvoiceNo"></a-input> -->
  35. </a-form-model-item>
  36. </a-col>
  37. <a-col :md="6" :sm="8">
  38. <a-form-model-item label="经营单位" prop="businessUnit">
  39. <!-- <a-input placeholder="请输入经营单位" v-model="preBook.businessUnit"></a-input> -->
  40. </a-form-model-item>
  41. </a-col>
  42. <a-col :md="6" :sm="8">
  43. <a-form-model-item label="经营单位地址" prop="businessUnitAdd">
  44. <!-- <a-select placeholder="请选择经营单位地址" v-model="preBook.businessUnitAdd">
  45. <a-select-option value="">请选择</a-select-option>
  46. <a-select-option :value="0">客户1</a-select-option>
  47. <a-select-option :value="1">客户2</a-select-option>
  48. <a-select-option :value="2">客户3</a-select-option>
  49. </a-select> -->
  50. </a-form-model-item>
  51. </a-col>
  52. <a-col :md="6" :sm="8">
  53. <a-form-model-item label="进仓/装柜日期" prop="inLoadDate">
  54. <!-- <a-date-picker
  55. placeholder="请选择进仓/装柜日期"
  56. style="width:100%;"
  57. :format="dateFormat"
  58. v-model="preBook.inLoadDate"
  59. /> -->
  60. </a-form-model-item>
  61. </a-col>
  62. <a-col :md="6" :sm="8">
  63. <a-form-model-item label="最终船期" prop="finalShipDate">
  64. <!-- <a-input placeholder="请输入最终船期" v-model="preBook.finalShipDate"></a-input> -->
  65. </a-form-model-item>
  66. </a-col>
  67. <a-col :md="6" :sm="8">
  68. <a-form-model-item label="收货人" prop="consignee">
  69. <!-- <a-input placeholder="请输入收货人" v-model="preBook.consignee"></a-input> -->
  70. </a-form-model-item>
  71. </a-col>
  72. <a-col :md="6" :sm="8">
  73. <a-form-model-item label="收货人地址" prop="consigneeAdd">
  74. <!-- <a-select placeholder="请选择收货人地址" v-model="preBook.consigneeAdd">
  75. <a-select-option value="">请选择</a-select-option>
  76. <a-select-option value="0">收货人1</a-select-option>
  77. <a-select-option value="1">收货人2</a-select-option>
  78. <a-select-option value="2">收货人3</a-select-option>
  79. </a-select> -->
  80. </a-form-model-item>
  81. </a-col>
  82. <a-col :md="6" :sm="8">
  83. <a-form-model-item label="通知方" prop="notifying">
  84. <!-- <a-input placeholder="请输入通知方" v-model="preBook.notifying"></a-input> -->
  85. </a-form-model-item>
  86. </a-col>
  87. <a-col :md="6" :sm="8">
  88. <a-form-model-item label="通知方地址" prop="notifyingAdd">
  89. <!-- <a-input placeholder="请输入通知方地址" v-model="preBook.notifyingAdd"></a-input> -->
  90. </a-form-model-item>
  91. </a-col>
  92. <a-col :md="6" :sm="8">
  93. <a-form-model-item label="贸易国别" prop="tradeCountry">
  94. <!-- <a-input placeholder="请输入贸易国别" v-model="preBook.tradeCountry"></a-input> -->
  95. </a-form-model-item>
  96. </a-col>
  97. <a-col :md="6" :sm="8">
  98. <a-form-model-item label="运抵国别" prop="arriveCountry">
  99. <!-- <a-input placeholder="请输入运抵国别" v-model="preBook.arriveCountry"></a-input> -->
  100. </a-form-model-item>
  101. </a-col>
  102. <a-col :md="6" :sm="8">
  103. <a-form-model-item label="出口口岸" prop="exportPort">
  104. <!-- <a-input placeholder="请输入出口口岸" v-model="preBook.exportPort"></a-input> -->
  105. </a-form-model-item>
  106. </a-col>
  107. <a-col :md="6" :sm="8">
  108. <a-form-model-item label="目的港" prop="destinationport">
  109. <!-- <a-input placeholder="请输入目的港" v-model="preBook.destinationport"></a-input> -->
  110. </a-form-model-item>
  111. </a-col>
  112. <a-col :md="6" :sm="8">
  113. <a-form-model-item label="收汇方式" prop="collectionMethod">
  114. <!-- <a-input placeholder="请输入收汇方式" v-model="preBook.collectionMethod"></a-input> -->
  115. </a-form-model-item>
  116. </a-col>
  117. <a-col :md="6" :sm="8">
  118. <a-form-model-item label="成交方式" prop="soldType">
  119. <!-- <a-input placeholder="请输入成交方式" v-model="preBook.soldType"></a-input> -->
  120. </a-form-model-item>
  121. </a-col>
  122. <a-col :md="6" :sm="8">
  123. <a-form-model-item label="金额" prop="money">
  124. <!-- <a-input placeholder="请输入金额" v-model="preBook.money"></a-input> -->
  125. </a-form-model-item>
  126. </a-col>
  127. <a-col :md="6" :sm="8">
  128. <a-form-model-item label="人民币" prop="RMB">
  129. <!-- <a-input placeholder="请输入人民币" v-model="preBook.RMB"></a-input> -->
  130. </a-form-model-item>
  131. </a-col>
  132. <a-col :md="6" :sm="8">
  133. <a-form-model-item label="美元" prop="dollar">
  134. <!-- <a-input placeholder="请输入美元" v-model="preBook.dollar"></a-input> -->
  135. </a-form-model-item>
  136. </a-col>
  137. </a-row>
  138. </a-form-model>
  139. </div>
  140. </a-card>
  141. <!--子表 -->
  142. <a-card :bordered="true" style="marginTop:10px;">
  143. <a-spin :spinning="confirmLoading">
  144. <a-form-model ref="formRef">
  145. <a-table
  146. bordered
  147. rowKey="id"
  148. :columns="columns"
  149. :data-source="data"
  150. :loading="loading"
  151. :pagination="ipagination"
  152. :scroll="{ x: 1500 }"
  153. @change="handleTableChange"
  154. >
  155. </a-table>
  156. </a-form-model>
  157. </a-spin>
  158. <!-- 人民币、美金 -->
  159. <a-row style="marginTop:10px;marginBottom:50px;padding:10px;">
  160. <div class="purchase-order-table" style="width:48%;marginRight:4%;float:left;">
  161. <h6 class="table-title">人民币</h6>
  162. <a-table
  163. :row-key="record => record.id"
  164. :loading="loading"
  165. :columns="CNYColumns"
  166. :data-source="CNYData"
  167. bordered
  168. :pagination="false"
  169. >
  170. </a-table>
  171. </div>
  172. <div class="purchase-order-table" style="width:48%;float:right;">
  173. <h6 class="table-title">美金</h6>
  174. <a-table
  175. :row-key="record => record.id"
  176. :loading="loading"
  177. :columns="USDColumns"
  178. :data-source="USDData"
  179. bordered
  180. :pagination="false"
  181. >
  182. </a-table>
  183. </div>
  184. </a-row>
  185. </a-card>
  186. </a-drawer>
  187. </div>
  188. </template>
  189. <script>
  190. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  191. import JEllipsis from '@/components/jeecg/JEllipsis'
  192. import moment from 'moment'
  193. export default {
  194. name: 'DetailsPreBookDrawer', // 详情 预托书
  195. computed: {},
  196. mixins: [JeecgListMixin],
  197. components: { JEllipsis, moment },
  198. data() {
  199. return {
  200. // 表头
  201. columns: [
  202. {
  203. title: '英文名称',
  204. dataIndex: 'englishName',
  205. width: 120,
  206. fixed: 'left',
  207. className: 'replacecolor'
  208. },
  209. {
  210. title: '款号',
  211. dataIndex: 'styleNum',
  212. width: 120,
  213. fixed: 'left',
  214. className: 'replacecolor'
  215. },
  216. {
  217. title: '小po号',
  218. dataIndex: 'smallPoNum',
  219. width: 120,
  220. className: 'replacecolor'
  221. },
  222. {
  223. title: '数量',
  224. dataIndex: 'quantity',
  225. width: 120,
  226. className: 'replacecolor'
  227. },
  228. {
  229. title: '箱数',
  230. dataIndex: 'boxedNum',
  231. width: 90,
  232. className: 'replacecolor'
  233. },
  234. {
  235. title: '毛重',
  236. dataIndex: 'roughWeigh',
  237. width: 120,
  238. className: 'replacecolor'
  239. },
  240. {
  241. title: '净重',
  242. dataIndex: 'suttle',
  243. width: 120,
  244. className: 'replacecolor'
  245. },
  246. {
  247. title: '体积',
  248. dataIndex: 'volume',
  249. width: 160,
  250. className: 'replacecolor'
  251. },
  252. {
  253. title: '分销点',
  254. dataIndex: 'distributionPoint',
  255. width: 120,
  256. className: 'replacecolor'
  257. },
  258. {
  259. title: '集装箱代号',
  260. dataIndex: 'containerCode',
  261. width: 120,
  262. scopedSlots: { customRender: 'containerCode' },
  263. className: 'replacecolor'
  264. },
  265. {
  266. title: '集装箱号',
  267. dataIndex: 'containerNo',
  268. width: 120,
  269. scopedSlots: { customRender: 'containerNo' },
  270. className: 'replacecolor'
  271. },
  272. {
  273. title: '单价',
  274. dataIndex: 'price',
  275. width: 120,
  276. className: 'replacecolor'
  277. },
  278. // {
  279. // title: '创建时间',
  280. // dataIndex: 'createTime',
  281. // align: 'center',
  282. // sorter: true,
  283. // customRender: text => {
  284. // return moment(text).format('YYYY-MM-DD')
  285. // }
  286. // },
  287. {
  288. title: '预发货日期',
  289. dataIndex: 'scheduledShipDate',
  290. width: 120,
  291. className: 'replacecolor'
  292. },
  293. {
  294. title: '业务员',
  295. dataIndex: 'salesman',
  296. width: 120,
  297. className: 'replacecolor'
  298. },
  299. {
  300. title: '业务部门',
  301. dataIndex: 'operatingDepartment',
  302. width: 120,
  303. className: 'replacecolor'
  304. },
  305. {
  306. title: '采购/委外订单号',
  307. dataIndex: 'purchaseAboardOrderNum',
  308. width: 160,
  309. className: 'replacecolor'
  310. },
  311. {
  312. title: '采购/委外工厂',
  313. dataIndex: 'purchaseAboardFactory',
  314. width: 160,
  315. className: 'replacecolor'
  316. }
  317. ],
  318. data: [{}, {}],
  319. CNYColumns: [
  320. {
  321. title: '货代',
  322. dataIndex: 'CNYfreighForward',
  323. width: 20,
  324. className: 'replacecolor'
  325. },
  326. {
  327. title: '金额',
  328. dataIndex: 'CNYmoney',
  329. width: 20,
  330. className: 'replacecolor'
  331. },
  332. {
  333. title: '项目列',
  334. dataIndex: 'CNYProjectList',
  335. width: 90,
  336. scopedSlots: { customRender: 'CNYProjectList' },
  337. className: 'replacecolor'
  338. }
  339. ],
  340. CNYData: [{ CNYmoney: '487576,87', CNYProjectList: '项目列test1' }],
  341. USDColumns: [
  342. {
  343. title: '货代',
  344. dataIndex: 'USDfreighForward',
  345. width: 20,
  346. className: 'replacecolor'
  347. },
  348. {
  349. title: '金额',
  350. dataIndex: 'USDmoney',
  351. width: 20,
  352. className: 'replacecolor'
  353. },
  354. {
  355. title: '项目列',
  356. dataIndex: 'USDProjectList',
  357. width: 90,
  358. scopedSlots: { customRender: 'USDProjectList' },
  359. className: 'replacecolor'
  360. }
  361. ],
  362. USDData: [{ USDmoney: '7576,17', CNYProjectList: '项目列test2' }],
  363. loading: false, // 表格加载
  364. preBook: {},
  365. confirmLoading: false,
  366. visible: false,
  367. dateFormat: 'YYYY-MM-DD'
  368. }
  369. },
  370. created() {},
  371. methods: {
  372. // 抽屉 取消
  373. handleCancel() {
  374. console.log('点击抽屉取消')
  375. this.close()
  376. },
  377. close() {
  378. this.$emit('close')
  379. this.visible = false
  380. this.$refs.form.resetFields()
  381. },
  382. // ------------------------------------------
  383. modalFormOk() {},
  384. aa() {}
  385. },
  386. mounted() {}
  387. }
  388. </script>
  389. <style lang="less" scoped>
  390. @import '~@assets/less/common.less';
  391. @import '~@assets/less/overwriter.less';
  392. /deep/ .ant-table-thead > tr > th {
  393. text-align: center;
  394. // font-weight: 700;
  395. }
  396. /deep/ .ant-table-tbody {
  397. text-align: center;
  398. }
  399. // /deep/ th.replacecolor {
  400. // background-color: #ccc;
  401. // }
  402. // 抽屉里的card样式
  403. /deep/ .ant-drawer-content {
  404. background-color: #f0f2f5;
  405. }
  406. /deep/ .ant-drawer-body {
  407. padding: 10px;
  408. }
  409. </style>