404 Commits 8d46d68e6e ... 0ce02b41d6

Author SHA1 Message Date
  zx 0ce02b41d6 修改 2 years ago
  zx e13ea40d72 add 2 years ago
  luobang c754330a61 tijiaoi 2 years ago
  luobang 4095cfef52 Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 2 years ago
  luobang a0f9c38489 tijiaoi 2 years ago
  liyg 7c5321eb25 Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 2 years ago
  liyg 788401a884 修改 2 years ago
  luobang a2deb904b3 修改内转钢材到异地库 2 years ago
  luobang 596387639a 修改内转钢材到异地库以及销售汽运结算 2 years ago
  liyg 905862758a 修改 2 years ago
  liyg 154b8ec0bf Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 2 years ago
  liyg 7a7a56cb2c 修改 2 years ago
  luobang 18d3d9bf28 Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 2 years ago
  luobang 1b678c002f tijia 2 years ago
  luobang dee885602d tijia 2 years ago
  luobang bb9325cd97 Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 2 years ago
  luobang 1be5d70e8c asda 2 years ago
  liyg 31739ddc65 修改内转钢材到异地库 2 years ago
  liyg f0597921ff 修改 2 years ago
  zx 4014afccc4 Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 2 years ago
  zx 88adc2f432 修改 2 years ago
  liyg b51730801c 修改 2 years ago
  liyg 5a4fd1acbb xlxs冲突 2 years ago
  liyg b6676ff829 Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 2 years ago
  liyg c8a13ecfa3 修改导入查询 2 years ago
  luobang eb4609dec9 asda 2 years ago
  zx fb9ac88854 Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 2 years ago
  zx 4002ccee4d 修改内转钢材到异地库 2 years ago
  liyg f33c0e84ba 修改 2 years ago
  liyg 32396bfe86 三程船水运和水运单价 2 years ago
  liyg a8303a261f 修改 2 years ago
  zx fe2a291c2d 修改 2 years ago
  liyg 868d94c5cb 修改 2 years ago
  liyg c56e94642c 修改样式 2 years ago
  liyg ddbf7dbc23 修改 2 years ago
  liyg 8ee0005557 Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 2 years ago
  liyg 5d1265a6d3 修改bug 2 years ago
  zx 93c1aff196 修改发货通知 2 years ago
  zx f6f149dd14 修改 2 years ago
  liyg f647940935 新增货权转移下载 2 years ago
  zx cf8520c865 Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 2 years ago
  zx d26c139dd1 修改 2 years ago
  liyg 94413ee41e Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 2 years ago
  liyg 3a03345c93 修改 2 years ago
  zx 955f2c2929 add 2 years ago
  luobang 067a716750 ada 2 years ago
  luobang d7a433e564 修改销售订单bug 2 years ago
  luobang e3cdda3dd0 adagjdha 2 years ago
  luobang 490dccf8a1 Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 2 years ago
  luobang d5413d966a tijiao 2 years ago
  liyg 70a25da853 修改 2 years ago
  liyg 2374786e9e 计量作业导出EXCEL 2 years ago
  zx 11a3050872 修改 2 years ago
  liyg f3b6158629 计量界面 2 years ago
  liyg b0ca7bd154 Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 2 years ago
  liyg b72af1d2ed 暂存 2 years ago
  luobang bcf9ff99b4 Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 2 years ago
  luobang e360218ba3 销售 2 years ago
  liyg 9e8df269a5 Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 2 years ago
  liyg 497b352b83 采购结算 2 years ago
  luobang 4944e1ce23 tijiao 2 years ago
  luobang 4b456a202a asdasdd 2 years ago
  luobang ca7a8db8b7 Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 2 years ago
  luobang ad1e9991c0 tijiao 2 years ago
  liyg 5407f5cc53 Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 2 years ago
  liyg 7a143704db 出库和卸船新增loading 2 years ago
  luobang db92c392c5 Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 2 years ago
  luobang e97a03bf75 dev 2 years ago
  liyg fa41b7fb0a 修改实时库存样式 2 years ago
  liyg 460ea7efcf 实时库存样式 2 years ago
  luobang d7da2ba35f Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 2 years ago
  luobang d16e39836e sdfs 2 years ago
  liyg 4e9b8d8e66 -- 2 years ago
  liyg 527abe46c4 合并冲突 2 years ago
  liyg b98f7f50d9 实时库存和时间筛选 2 years ago
  zx 409ec711cc 修改 2 years ago
  zx c82d2d57c4 修改 2 years ago
  zx 9e05c97f52 修改 2 years ago
  zx 12e6d9c166 修改i 2 years ago
  luobang d4deefbe61 Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 2 years ago
  luobang 8b828b6f7c tijiaoi 2 years ago
  zx 3370897eb4 修改 2 years ago
  liyg 3470ec3381 港口出库新增和修改增加拼装 2 years ago
  liyg 27efbbe8da 修改新增 2 years ago
  liyg a37c5f1b06 港口出库 2 years ago
  luobang 66b6ee32a3 修改销售钢材 2 years ago
  luobang dba9ffde6b sdad 2 years ago
  zx 121d24f96d 修改位置作业查询 2 years ago
  zx 262865131f 修改 2 years ago
  zx 62170f2f44 修改 2 years ago
  liyg 983a39765c 火运 2 years ago
  liyg 27a86e287c 修改火运导入样式;新增计量委托总吨位 2 years ago
  zx 2c08f0c87f 修改 2 years ago
  luobang 033dc5a3f5 sdad 2 years ago
  luobang b65d439dc1 dasd 2 years ago
  zx 8bcc07c4e8 修改提货委托哦 2 years ago
  zx c314d1e135 修改 2 years ago
  luobang 6d3c158504 修改进口矿、国产矿、钢材 2 years ago
  luobang f205270fca fdsfksa 2 years ago
  zx 06383ac636 修改 2 years ago
  luobang 4cd9a957c1 fdsfksa 2 years ago
  luobang 40c1868733 Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 2 years ago
  luobang 9251d71c14 ajdkjad 2 years ago
  liyg 25bf01c66f Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 2 years ago
  liyg 0fa5a091c6 修改 2 years ago
  liyg e7a38ccd9e Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 2 years ago
  liyg 1203f8aa16 火运 2 years ago
  luobang 4bfb6c8710 adadssa 2 years ago
  luobang d6d71a694f adadas 2 years ago
  luobang 4e005bd433 Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 2 years ago
  luobang f86a7c5319 adasda 2 years ago
  liyg 4f0ba9ac63 合并 2 years ago
  liyg 735fee4a53 修改刷新 2 years ago
  zx 42cfb65f30 Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 2 years ago
  zx e66fa8ad48 修改计量委托导出 2 years ago
  liyg 8ef057d6e7 Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 2 years ago
  liyg 3e7ef39e63 取消下载按钮 2 years ago
  luobang 6b6dbfce48 daD 2 years ago
  luobang dc2f2e71ad Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 2 years ago
  luobang c088c48ac4 dads 2 years ago
  zx 070b0dd60b Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 2 years ago
  zx 959f59c893 修改 2 years ago
  liyg fb3071cd6a 销售钢材派车确认按钮 2 years ago
  liyg afc5b0cb1c Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 2 years ago
  liyg 0a12183f5b 修改火运和钢材确认 2 years ago
  zx 1f91ae418c aa 2 years ago
  zx bb54d3b821 xiugai1 2 years ago
  liyg e1f4ea4440 Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 2 years ago
  liyg 9e69d3ff2d 火运 2 years ago
  luobang bb4c72d4a7 ytajsd 2 years ago
  zx 9e301b2d6f 修改 2 years ago
  luobang f209abd860 tijiao 2 years ago
  zx 0530b65f47 add 2 years ago
  luobang 11ef0cc5f7 tijiao 2 years ago
  liyg b485cd1dfc Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 2 years ago
  liyg 025136d350 进口矿国产矿 2 years ago
  luobang 227568f9ce tijiao 2 years ago
  luobang c839155cd2 修改销售订单 2 years ago
  liyg 5d7c97ca00 修改 2 years ago
  liyg cf82daa019 修改 2 years ago
  luobang 74ed49ad1c tijai 2 years ago
  luobang bf86cc03b3 yuadj 2 years ago
  liyg a578045eb2 Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 2 years ago
  liyg 1977d51233 修改 2 years ago
  zx a841914a46 修改 2 years ago
  zx edb17837b2 修改 2 years ago
  zx 92d0510a1f Merge branches 'master' and 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 2 years ago
  zx 05c1cc5864 修改 2 years ago
  liyg 63bbd32608 修改 2 years ago
  liyg b3ca945fff 修改 2 years ago
  zx d083cfdb4c 修改委托 2 years ago
  liyg b3f0abbce4 修改 2 years ago
  luobang 1b9628330a tijiao 2 years ago
  luobang d236c25c61 aa 2 years ago
  luobang b03c5fc330 aa 2 years ago
  liyg 3edb9cb67b Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 2 years ago
  liyg f70b8d4a1b 修改实时路径 2 years ago
  zx e208188f3f 修改进口矿 2 years ago
  zx bc77fac27f Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 2 years ago
  zx e068adb464 修改厂外物流展示bug 2 years ago
  liyg d548371570 Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 2 years ago
  liyg c4f1704da7 修改 2 years ago
  zx 2915e0fd2f 修改pdf格式 2 years ago
  zx 5b629d0722 Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 2 years ago
  zx 047cbd4a8d 修改查询 2 years ago
  liyg 1141f0c738 修改 2 years ago
  zx ac84b6c998 修改 2 years ago
  zx 527eb154e4 修改进口矿 2 years ago
  zx ceb7382726 修改 2 years ago
  liyg a68a7ba909 修改装车作业 2 years ago
  luobang 13084b678a sfdsdfsf 2 years ago
  liyg bbc38dfd1c 修改 2 years ago
  zx 8cac8f03ea 修改 2 years ago
  liyg 989f344251 修改 2 years ago
  liyg bea14de6a1 修改进口矿 3 years ago
  liyg 7874b2d96d 修改进口矿 3 years ago
  luobang 6e0589f543 tijiaoi 3 years ago
  luobang ed377e26f6 tijiao 3 years ago
  luobang 7eaf3b1e48 sdalsda 3 years ago
  luobang 6453cc7202 adahsdj 3 years ago
  liyg a39ae96aa0 国产矿 3 years ago
  liyg fcda93b934 修改 3 years ago
  liyg 3f59a75129 修改进口矿界面 3 years ago
  luobang f8b32895dc adasdad 3 years ago
  luobang 7d842c834f Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 3 years ago
  luobang dcda3562a6 shdh 3 years ago
  zx 40ed4f6169 修改国产矿 3 years ago
  liyg 519c73eef3 修改 3 years ago
  luobang 5041d5b7fb fdsa 3 years ago
  luobang 96efd0fd5b adadsa 3 years ago
  liyg 0a9007981b 修改进口矿和厂厂外 3 years ago
  liyg 4525c5d9bd 进口矿和厂外 3 years ago
  zx 4d6e53bcb1 Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 3 years ago
  zx 2071968fa8 修改运输预约以及采购厂内执行查询 3 years ago
  luobang 568035cd5b Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 3 years ago
  luobang 2621578119 dev 3 years ago
  zx fcda86c78b 新增关于 3 years ago
  luobang ec057c769e 内转物流添加时间筛选 3 years ago
  liyg e2845dd685 解决冲突 3 years ago
  luobang 8ee35dbf68 tijiao 3 years ago
  liyg 5983f8f8f8 厂外 3 years ago
  luobang 9363355125 dada 3 years ago
  luobang fd84c01e45 asda 3 years ago
  luobang 91ec00084e tdhas 3 years ago
  luobang 8f3947a879 修改采购辅料 3 years ago
  liyg 6b3fecb70a 修改 3 years ago
  zx d0eb9eb625 修改船舶动态 3 years ago
  luobang 3cb8bb7fb9 fds 3 years ago
  zx 96f15b7d95 修改 3 years ago
  zx 07e2380588 修改 3 years ago
  zx 99ad4cb6c3 修改进口矿 3 years ago
  luobang b15d4a3358 tijiao 3 years ago
  luobang d49aba95d3 dsfaf 3 years ago
  luobang c83db9c0a5 tyiiaj 3 years ago
  luobang 1f4f6b6217 tijiao 3 years ago
  zx 44ac10ef4e 修改采购进口矿以及采购燃料 3 years ago
  zx f73d8ecdaf 修改 3 years ago
  luobang d59bf3ff1d asfds 3 years ago
  luobang 66d344911d Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 3 years ago
  luobang 240c4dc67a asfds 3 years ago
  wing 382acc40e0 进口矿江港—万州港位置作业表头位置调整 3 years ago
  luobang 58e2e118c5 fdsfa 3 years ago
  luobang d9c4b065a3 fsa 3 years ago
  luobang d656f535ce tiaj 3 years ago
  zx 81c2ff74b6 Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 3 years ago
  zx 2691fce25f 修改传值 3 years ago
  luobang f52be38a18 sdfh 3 years ago
  luobang c61143d2f7 asd 3 years ago
  zx 12f657996f 修改运力备注 3 years ago
  zx d95d2574da Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 3 years ago
  zx d6448088d4 修改采购 3 years ago
  Tiroble 2fe28f6f0a 修改 3 years ago
  Tiroble 2bc09f1ce9 修改 3 years ago
  luobang e7eee39916 affd 3 years ago
  zx 40654435f7 修改采购燃料 3 years ago
  zx 9af5f54fc3 修改 3 years ago
  zx 02f998ffa2 运力新增修改备注功能 3 years ago
  zx 76f2f38307 运力新增修改备注功能 3 years ago
  luobang 70e15f42ab sfdaf 3 years ago
  zx 23085a11ed 修改销售 3 years ago
  zx 455ce3811e 修改 3 years ago
  Tiroble 7eeeda4611 修改 3 years ago
  Tiroble 4ca728cabb 修改 3 years ago
  Tiroble 981be05f64 修改 3 years ago
  Tiroble 5ebab2e0dd 修改 3 years ago
  zx d7e0ada1d8 修改 3 years ago
  luobang 83821a8842 tijiao 3 years ago
  luobang 7e5b0524d0 tijiao 3 years ago
  zx e245333dad 修改表单 3 years ago
  zx c43fe59c01 修改表单 3 years ago
  zx 25ed881e6c 修改拼装统计报表 3 years ago
  zx 303cb202b2 Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 3 years ago
  zx 939a78181e 修改拼装车统计报表 3 years ago
  liyg f7d33fc588 修改图片显示 3 years ago
  Tiroble 379835c077 修改 3 years ago
  liyg 67807b4e4e 修改多张图片 3 years ago
  zx 65efd94a0c 修改汽车抽查行合并 3 years ago
  zx ca0a464f95 修改 3 years ago
  liyg 5837475f9f 修改 3 years ago
  liyg 58acc598c0 Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 3 years ago
  liyg 84dabe7ccb 修改 3 years ago
  luobang 87d8dfa49f DSK 3 years ago
  luobang 175d341ddd safdjhfs\ 3 years ago
  liyg 08029d4a44 修改 3 years ago
  wing f2150ab317 Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 3 years ago
  wing 19137cea74 新增excel导出功能 3 years ago
  wing 3cc2130341 新增excel导出功能 3 years ago
  liyg a360c22efb 新增位置查询 3 years ago
  Tiroble 2ccac8fba2 Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 3 years ago
  Tiroble 2fe44ae97d 修改 3 years ago
  luobang ebda914ef4 tijiao 3 years ago
  luobang 6961634d4f tijiao 3 years ago
  zx 0ad5617c61 修改 3 years ago
  luobang 17dc4eeaa3 sdfhjfa 3 years ago
  zx ee4dc3033b Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 3 years ago
  zx e7547a301c 修改 3 years ago
  luobang 44a7090fad ahdj 3 years ago
  luobang 55953576df tijiao 3 years ago
  Tiroble 653c0d7cb5 修改 3 years ago
  Tiroble 30d392b77d 修改 3 years ago
  zx 0052d124e1 修改采购订单查询 3 years ago
  zx 6947dcccb0 修改采购订单查询 3 years ago
  luobang 2dc4a2ac22 tijiao 3 years ago
  zx 1d08620779 修改采购进口矿 3 years ago
  zx 1ae3f04464 Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 3 years ago
  zx dcae8a53a9 修改进口矿样式 3 years ago
  Tiroble 122397fbf1 修改 3 years ago
  Tiroble 3bfb856bca 修改 3 years ago
  Tiroble d4d31abe9b 修改 3 years ago
  luobang 6b2d26bb6c tijiao 3 years ago
  luobang cfaa3ab27e tuijhja 3 years ago
  zx 63b6456d61 修改 3 years ago
  zx 0d585d2055 Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 3 years ago
  zx df81445610 修改汽运抽查 3 years ago
  Tiroble 1e18295866 修改 3 years ago
  luobang 153a4ee313 fsaf 3 years ago
  luobang 46ed0930f4 Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 3 years ago
  luobang 65d48c9d2a tijiaoi 3 years ago
  Tiroble e2a938d625 修改 3 years ago
  luobang 5fa904a685 Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 3 years ago
  luobang 08805c77a1 fsalf 3 years ago
  Tiroble 9b9f486534 Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 3 years ago
  Tiroble 5fd9d24b56 修改 3 years ago
  luobang 37c8c4728a saf 3 years ago
  luobang 49bf8b520f fdsh 3 years ago
  Tiroble 3182498bab 修改 3 years ago
  Tiroble 160e9102a1 修改 3 years ago
  Tiroble 25f298b509 修厂外 3 years ago
  luobang 438cbbf48b Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 3 years ago
  luobang e997dced9a djkdfs 3 years ago
  Tiroble 11dcbcd61f 修改 3 years ago
  Tiroble 606ef54249 修改 3 years ago
  zouzhd 5a7c3cc8bf 销售订单修改方法调整 3 years ago
  luobang f785722ef0 yiajs 3 years ago
  zouzhd d71a7d8457 合并 3 years ago
  zouzhd b37ec29af2 销售钢材页面修改 3 years ago
  Tiroble 932417af56 修改 3 years ago
  Tiroble cf9e2bc3ae 修改 3 years ago
  luobang 29e240094e tijiao 3 years ago
  luobang a8a3a4cca8 tijiao 3 years ago
  luobang 8787190560 tijiao 3 years ago
  luobang c6c092e378 tijiao 3 years ago
  Tiroble 9f8f3f40e0 修改 3 years ago
  Tiroble c5914b797f 修改 3 years ago
  luobang c261d2a61a Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 3 years ago
  luobang 965e5de1eb tijiao 3 years ago
  Tiroble a19a6dbbd3 修改 3 years ago
  Tiroble 8964d1dc7c 修改 3 years ago
  luobang 4a33f7ed88 tijiaoi 3 years ago
  zx bd003e264e 修改 3 years ago
  zx 9b83533d2d 修改 3 years ago
  luobang dc436e8b28 dev 3 years ago
  zx d6b6b11d83 修改采购进口矿国产矿 3 years ago
  zx 7d0f88ec25 修改装机备注 3 years ago
  Tiroble b101169f4c 修改 3 years ago
  Tiroble 0bf6eb9306 修改外网 3 years ago
  Tiroble 6eb323605c 修改 3 years ago
  Tiroble 5204798f03 修改图片上传 3 years ago
  Tiroble 8302e1b512 修改 3 years ago
  胡半仙 dc82c01a1f 提交 3 years ago
  luobang c12d856efa tia 3 years ago
  luobang 75eb771f92 tijiao 3 years ago
  zouzhd 20aae14c46 修改冲突 3 years ago
  zouzhd bb0ca212c9 提交 3 years ago
  zhouzh 782132caf1 4.1 3 years ago
  zhouzh 498af42316 4.1 3 years ago
  胡半仙 60d0e9d70e 提交计时 3 years ago
  胡半仙 bcff2f3f0d 提交总工程 3 years ago
  luobang 3887e76448 conni 3 years ago
  txf c4bac5c502 Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 3 years ago
  txf 347f6206c2 火运调试 3 years ago
  zouzhd c24f55db22 修改承运商钢材派单 3 years ago
  zouzhd a7280456ee 上传 3 years ago
  zouzhd fb94503290 合并 3 years ago
  zouzhd b01fa7f249 修改bug 3 years ago
  zhouzh 9f7fe1da91 3.30 3 years ago
  zhouzh bf5e560873 Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 3 years ago
  zhouzh ea9a02fb65 changwai 3 years ago
  Tiroble 594cf8702f 修改厂外 3 years ago
  Tiroble 6b470a3913 厂外修改 3 years ago
  Tiroble 417ce6e0ac 厂外修改 3 years ago
  zhouzh ad8ea86263 Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 3 years ago
  zhouzh 68802fe38d 3.30 3 years ago
  zouzhd fd055ba982 Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 3 years ago
  zouzhd e65daba45a 修改销售授权承运商 3 years ago
  zhouzh e2f5eeb82f Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 3 years ago
  zhouzh d0b7caca50 3.29 3 years ago
  txf 7abf797cae Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 3 years ago
  zouzhd 8c1bb085fe 销售bug修改 3 years ago
  zouzhd 6c43a568b1 解决冲突 3 years ago
  zouzhd db49778633 Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 3 years ago
  luobang 8300cf523d tajd 3 years ago
  luobang ca3663297e tijiao 3 years ago
  zouzhd f3e7fa2c52 销售钢材整合其他 3 years ago
  zouzhd 6420c06b33 销售钢材订单流程 3 years ago
  zhouzh 0c391a0c72 3.29 3 years ago
  zhouzh 1f9c5e7a94 3.29 3 years ago
  Tiroble 09a29bb471 修改 3 years ago
  Tiroble ea18be9b46 修改完成 3 years ago
  luobang 2681c4fe62 Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 3 years ago
  luobang a2f29c9496 ajdf 3 years ago
  Tiroble 3eee99c0db 修改完成 3 years ago
  luobang 83cfebdb10 adhkj 3 years ago
  Tiroble 9b552f0767 Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass 3 years ago
  Tiroble beb75d2045 修改框架 3 years ago
  txf 1bd9332136 as 3 years ago
  luobang 1512a8aa16 dh 3 years ago
  luobang 9d8bfd309b tyiaj 3 years ago
  luobang 7599819efe 结算 3 years ago
  luobang 39431f3ce7 tijiao 3 years ago
  Tiroble af9d71c12a 图片上传 3 years ago
  Tiroble 1ea0727b77 修改图片上传 3 years ago
  胡杰焕 0faeaa77c0 更新 'src/views/inward/components/truckAppoint/requirementOther.vue' 3 years ago
  luobang 9ff2709bd3 结算 3 years ago
  luobang 8a6ad8b741 前端 3 years ago
  luobang a6d33ff1cd tijai 3 years ago
  luobang 7815086d92 tijiao 3 years ago
  luobang 5b0474e283 tau 3 years ago
  胡半仙 30b278baa8 修改需求下发 3 years ago
  胡半仙 74a3286d7b 提交 3 years ago
  luobang bea0eb26f4 tajk 3 years ago
  luobang df950a6c55 结算修改 3 years ago
  luobang b9c5293983 前端tijiao 3 years ago
  Tiroble 694d2eaa41 修改运力 3 years ago
100 changed files with 10944 additions and 6555 deletions
  1. 1 1
      .eslintrc.js
  2. 92 98
      build/utils.js
  3. 65 61
      build/webpack.base.conf.js
  4. 65 55
      config/index.js
  5. BIN
      icore-pass.zip
  6. 0 1
      nginx.conf
  7. 16 4
      package.json
  8. 19 0
      src/assets/excel/Export2Excel.js
  9. BIN
      src/assets/homepageimg/微信图片_20211128192004.jpg
  10. BIN
      src/assets/img/TEST01.png
  11. BIN
      src/assets/img/leave.png
  12. BIN
      src/assets/img/map_site.png
  13. BIN
      src/assets/img/park.png
  14. BIN
      src/assets/img/smallcar.png
  15. BIN
      src/assets/img/test.png
  16. BIN
      src/assets/img/traffic_texture_darkred-pass.png
  17. BIN
      src/assets/loading_images/loading.gif
  18. 2 1
      src/components/DilCommonUI/index.js
  19. 7 0
      src/components/DilCommonUI/packages/mergeRowTable/index.js
  20. 383 0
      src/components/DilCommonUI/packages/mergeRowTable/src/mergeRowTable.js
  21. 291 0
      src/components/DilCommonUI/packages/mergeRowTable/src/mergeRowTable.vue
  22. 0 1
      src/components/DilCommonUI/packages/table/demo/06_FilterTable.vue
  23. 33 60
      src/components/DilCommonUI/packages/table/src/table.js
  24. 68 58
      src/components/DilCommonUI/packages/table/src/table.vue
  25. 20 0
      src/components/OffFactoryMapShow/index.js
  26. 360 0
      src/components/OffFactoryMapShow/packages/src/GAODEMap.js
  27. 144 0
      src/components/OffFactoryMapShow/packages/src/GAODEMap.vue
  28. 214 0
      src/components/OffFactoryMapShow/packages/src/README.md
  29. 8 10
      src/components/Page/Title/index.vue
  30. 39 0
      src/components/exportAllExcel/exportAllExcel.js
  31. 6 3
      src/components/exportExcel/exportExcel.js
  32. 51 32
      src/components/exportPdf/exportPdf.js
  33. 63 0
      src/components/exportPdfs/exportPdfs.js
  34. 0 2
      src/config/include.js
  35. 0 8
      src/lib/el-table/index.js
  36. 0 28
      src/lib/el-table/src/dropdown.js
  37. 0 259
      src/lib/el-table/src/filter-panel.vue
  38. 0 68
      src/lib/el-table/src/layout-observer.js
  39. 0 478
      src/lib/el-table/src/table-body.js
  40. 0 438
      src/lib/el-table/src/table-column.js
  41. 0 147
      src/lib/el-table/src/table-footer.js
  42. 0 656
      src/lib/el-table/src/table-header.js
  43. 0 231
      src/lib/el-table/src/table-layout.js
  44. 0 650
      src/lib/el-table/src/table-store.js
  45. 0 666
      src/lib/el-table/src/table.vue
  46. 0 110
      src/lib/el-table/src/util.js
  47. 8 8
      src/utils/QueueStartList.js
  48. 24 0
      src/utils/exportExcelAdvanced.JS
  49. 62 31
      src/utils/sharedJsFile.js
  50. 28 13
      src/views/ADMINISTRATORS/app.js
  51. 556 380
      src/views/ADMINISTRATORS/components/ADMINISTRATORS1.vue
  52. 18 12
      src/views/ADMINISTRATORS/router/index.js
  53. 113 25
      src/views/RMS/components/addCapacity.vue
  54. 91 0
      src/views/RMS/components/addCargoDep.vue
  55. 11 6
      src/views/RMS/components/addCarrier.vue
  56. 166 0
      src/views/RMS/components/addContractPrice.vue
  57. 75 0
      src/views/RMS/components/addInwardContractMaterial.vue
  58. 101 94
      src/views/RMS/components/addMaterial.vue
  59. 18 18
      src/views/RMS/components/addOtherCapacity.vue
  60. 7 6
      src/views/RMS/components/addPersonnel.vue
  61. 33 44
      src/views/RMS/components/addPort.vue
  62. 44 47
      src/views/RMS/components/addRawWarehouse.vue
  63. 180 101
      src/views/RMS/components/capacity.vue
  64. 107 0
      src/views/RMS/components/cargoDep.vue
  65. 121 0
      src/views/RMS/components/contractPrice.vue
  66. 165 178
      src/views/RMS/components/editCapacity.vue
  67. 172 0
      src/views/RMS/components/editContractPrice.vue
  68. 0 0
      src/views/RMS/components/editInwardMaterial.vue
  69. 96 55
      src/views/RMS/components/editMaterial.vue
  70. 2 4
      src/views/RMS/components/editRmsShipper.vue
  71. 43 0
      src/views/RMS/components/inwardContractMaterial.vue
  72. 31 43
      src/views/RMS/components/rawWarehouse.vue
  73. 252 0
      src/views/RMS/components/showCapacity.vue
  74. 10 7
      src/views/RMS/components/showCarrier.vue
  75. 105 0
      src/views/RMS/components/updateCargoDep.vue
  76. 26 5
      src/views/RMS/router/index.js
  77. 538 508
      src/views/SporadicManage/components/oldAreaSporadic/transportAppoint/addSporadicTransportAppoint.vue
  78. 343 226
      src/views/SporadicManage/components/oldAreaSporadic/transportAppoint/transportAppoint.vue
  79. 159 128
      src/views/SporadicManage/components/oldAreaSporadic/transportOrder/addTransportOrder.vue
  80. 603 277
      src/views/SporadicManage/components/oldAreaSporadic/transportOrder/transportOrder.vue
  81. 435 136
      src/views/SporadicManage/router/index.js
  82. 12 0
      src/views/TMS/app.js
  83. 26 9
      src/views/TMS/components/bmsport/addHandlingFee.vue
  84. 5 5
      src/views/TMS/components/bmsport/handlingFee.vue
  85. 14 8
      src/views/TMS/components/bmsport/updateHandlingFee.vue
  86. 333 0
      src/views/TMS/components/bmsship/addMoistureDetection.vue
  87. 510 0
      src/views/TMS/components/bmsship/addThreeSectionFee.vue
  88. 328 0
      src/views/TMS/components/bmsship/addThreeSectionHandleFee.vue
  89. 328 0
      src/views/TMS/components/bmsship/addTwoSectionFee.vue
  90. 328 0
      src/views/TMS/components/bmsship/addTwoSectionHandleFee.vue
  91. 3 0
      src/views/TMS/components/bmsship/detailsOrder.vue
  92. 448 45
      src/views/TMS/components/bmsship/detailsStatement.vue
  93. 459 0
      src/views/TMS/components/bmsship/editThreeSectionFee.vue
  94. 350 0
      src/views/TMS/components/bmsship/editThreeSectionHandleFee.vue
  95. 350 0
      src/views/TMS/components/bmsship/editTwoSectionFee.vue
  96. 350 0
      src/views/TMS/components/bmsship/editTwoSectionHandleFee.vue
  97. 0 10
      src/views/TMS/components/bmsship/lossDetailsStatement.vue
  98. 130 0
      src/views/TMS/components/bmsship/moistureDetection.vue
  99. 148 0
      src/views/TMS/components/bmsship/threeSectionFee.vue
  100. 132 0
      src/views/TMS/components/bmsship/threeSectionFeeDetails.vue

+ 1 - 1
.eslintrc.js

@@ -57,6 +57,6 @@ module.exports = {
     'no-dupe-args': 2,
     // 不能有声明后未被使用的变量或参数
     'no-unused-vars': 0,
-    'space-before-function-paren': 0
+    'space-before-function-paren': 0,
   }
 };

+ 92 - 98
build/utils.js

@@ -1,13 +1,13 @@
-'use strict'
-const path = require('path')
-const config = require('../config')
-const ExtractTextPlugin = require('extract-text-webpack-plugin')
-const packageConfig = require('../package.json')
-const HtmlWebpackPlugin = require('html-webpack-plugin');
-const merge = require('webpack-merge');
-const glob = require('glob');
-const pathSrc = path.resolve(__dirname, '../src'); // F:\webui\multiple-pages\demo\src
-const devPathSrc = path.resolve(__dirname, '../../../src'); // node_modules应用下
+"use strict";
+const path = require("path");
+const config = require("../config");
+const ExtractTextPlugin = require("extract-text-webpack-plugin");
+const packageConfig = require("../package.json");
+const HtmlWebpackPlugin = require("html-webpack-plugin");
+const merge = require("webpack-merge");
+const glob = require("glob");
+const pathSrc = path.resolve(__dirname, "../src"); // F:\webui\multiple-pages\demo\src
+const devPathSrc = path.resolve(__dirname, "../../../src"); // node_modules应用下
 
 // 指定开发模式下需要加载的模块(可以做到只加载当前模块,提高开发效率)
 // index模块(登录)为必须,all 为所有
@@ -15,146 +15,140 @@ const devPathSrc = path.resolve(__dirname, '../../../src'); // node_modules应
 // ['index','appoint','configManager','homepage',''inward,'queue','RMS','sale','serviceManager','SporadicManage'
 //       统计报表       组织机构/系统管理 采购  仓储
 //  'statisticalReport','systemConfig','TMS','WMS','workFlow']
+// let devModules = ["index", "appoint", "statisticalReport", "WMS","TMS"];
+let devModules = ["index", "TMS", "appoint", "WMS", "inward", "statisticalReport"];
+// let devModules = ["all"];
 
-
- let devModules = ['all']
-// let devModules = ['index','inward']
-
-// let devModules = ['index','SporadicManage','RMS','statisticalReport']
-// let devModules = ['index','inward','statisticalReport','TMS']
-//  let devModules = ['index','WMS','sale','TMS','inward','SporadicManage']
-// let devModules = ['index','SporadicManage','TMS','statisticalReport','RMS'];
-// let devModules = ['index','RMS'];
-
-
-if (pathSrc.indexOf('node_modules') > -1) {
-    devModules = require('../../../cors.js').devModules;
+if (pathSrc.indexOf("node_modules") > -1) {
+  devModules = require("../../../cors.js").devModules;
 }
 // 获取入口集合
-const getEntries = function (suffix, polyfill) {
+const getEntries = function(suffix, polyfill) {
   // 自动获取
-  const entryHtml = glob.sync(pathSrc + '/views/**/app.html'); // 根据html来
-  const devEntryHtml = glob.sync(devPathSrc + '/views/**/app.html'); // 根据html来
+  const entryHtml = glob.sync(pathSrc + "/views/**/app.html"); // 根据html来
+  const devEntryHtml = glob.sync(devPathSrc + "/views/**/app.html"); // 根据html来
   const entries = {};
-  let setEntries = function (filePath, _chunk) {
-    _chunk = _chunk.substring(0, _chunk.lastIndexOf('/'));
+  let setEntries = function(filePath, _chunk) {
+    _chunk = _chunk.substring(0, _chunk.lastIndexOf("/"));
     let flag = true;
-
     flag = false;
     for (let item of devModules) {
-      if (item && (_chunk.indexOf('views/' + item) >= 0 || item === 'all')) {
+      if (item && (_chunk.indexOf("views/" + item) >= 0 || item === "all")) {
         flag = true;
         break;
       }
     }
     if (flag) {
-      let arr = _chunk.split('/'),
+      let arr = _chunk.split("/"),
         larr = [],
         rarr = [];
-      console.log('arr: ', arr);
+      console.log("arr: ", arr);
       larr = arr.slice(0, 2);
-      _chunk = larr.join('/');
+      _chunk = larr.join("/");
       if (arr.length > 2) {
         rarr = arr.slice(2, arr.length);
-        _chunk = _chunk + '/' + rarr.join('-');
+        _chunk = _chunk + "/" + rarr.join("-");
       }
       if (suffix) {
-        filePath = filePath.replace('.html', suffix);
+        filePath = filePath.replace(".html", suffix);
       }
       if (polyfill) {
-        entries[_chunk] = ['babel-polyfill', filePath];
+        entries[_chunk] = ["babel-polyfill", filePath];
       } else {
         entries[_chunk] = filePath;
       }
     }
-  }
-  entryHtml.forEach((filePath) => {
+  };
+  entryHtml.forEach(filePath => {
     // views/index/app.html --> views/index   chunk有'/'则js/css会有相应的目录
-    let _chunk = filePath.split(pathSrc.replace(/\\/g, '/') + '/')[1]; // views/index/app.html
+    let _chunk = filePath.split(pathSrc.replace(/\\/g, "/") + "/")[1]; // views/index/app.html
     setEntries(filePath, _chunk);
   });
-  devEntryHtml.forEach((filePath) => {
+  devEntryHtml.forEach(filePath => {
     // views/index/app.html --> views/index   chunk有'/'则js/css会有相应的目录
-    let _chunk = filePath.split(devPathSrc.replace(/\\/g, '/') + '/')[1]; // views/index/app.html
+    let _chunk = filePath.split(devPathSrc.replace(/\\/g, "/") + "/")[1]; // views/index/app.html
     setEntries(filePath, _chunk);
   });
   return entries;
 };
 // 多入口配置(入口JS固定为main.js)
-exports.entries = function () {
+exports.entries = function() {
   // ['babel-polyfill', './src/main.js']
-  let _entries = getEntries('.js', true);
+  let _entries = getEntries(".js", true);
   return _entries;
 };
 //多页面输出配置
-exports.htmlPlugins = function () {
-  let entryHtmls = getEntries('.html');
+exports.htmlPlugins = function() {
+  let entryHtmls = getEntries(".html");
   let arr = [];
   for (let _chunk in entryHtmls) {
-    console.log('loading chunk:', _chunk);
+    console.log("loading chunk:", _chunk);
     // _chunk :views/index/index
     let conf = {
-      favicon: pathSrc + '/assets/img/favicon.ico', //favicon路径,通过webpack引入同时可以生成hash值
+      favicon: pathSrc + "/assets/img/favicon.ico", //favicon路径,通过webpack引入同时可以生成hash值
       template: entryHtmls[_chunk], // html模板路径
       // filename: 'views/' + fileName, // 生成的html存放路径,相对于path
-      filename: _chunk + '.html',
+      filename: _chunk + ".html",
       chunks: [_chunk],
       inject: true // js插入的位置,true/'head'/'body'/false
     };
-    if (process.env.NODE_ENV === 'production') {
-      console.log('package content: ', _chunk)
+    if (process.env.NODE_ENV === "production") {
+      console.log("package content: ", _chunk);
       conf = merge(conf, {
-        chunks: ['manifest', 'vendor', _chunk],
+        chunks: ["manifest", "vendor", _chunk],
         minify: {
           // removeAttributeQuotes: true, // 删除可删除的引号
           removeComments: true, // 移除HTML中的注释
           collapseWhitespace: true // 删除空白符与换行符
         },
-        chunksSortMode: 'dependency'
-      })
+        chunksSortMode: "dependency"
+      });
     }
     arr.push(new HtmlWebpackPlugin(conf));
   }
- console.log('arr:', arr);
+  console.log("arr:", arr);
   return arr;
 };
 
-exports.assetsPath = function (_path) {
-  const assetsSubDirectory = process.env.NODE_ENV === 'production' ?
-    config.build.assetsSubDirectory :
-    config.dev.assetsSubDirectory
+exports.assetsPath = function(_path) {
+  const assetsSubDirectory =
+    process.env.NODE_ENV === "production"
+      ? config.build.assetsSubDirectory
+      : config.dev.assetsSubDirectory;
 
-  return path.posix.join(assetsSubDirectory, _path)
-}
+  return path.posix.join(assetsSubDirectory, _path);
+};
 
-exports.cssLoaders = function (options) {
-  options = options || {}
+exports.cssLoaders = function(options) {
+  options = options || {};
 
   const cssLoader = {
-    loader: 'css-loader',
+    loader: "css-loader",
     options: {
       sourceMap: options.sourceMap
     }
-  }
+  };
 
   const postcssLoader = {
-    loader: 'postcss-loader',
+    loader: "postcss-loader",
     options: {
       sourceMap: options.sourceMap
     }
-  }
+  };
 
   // generate loader string to be used with extract text plugin
   function generateLoaders(loader, loaderOptions) {
-    const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader]
+    const loaders = options.usePostCSS
+      ? [cssLoader, postcssLoader]
+      : [cssLoader];
 
     if (loader) {
       loaders.push({
-        loader: loader + '-loader',
+        loader: loader + "-loader",
         options: Object.assign({}, loaderOptions, {
           sourceMap: options.sourceMap
         })
-      })
+      });
     }
 
     // Extract CSS when that option is specified
@@ -165,11 +159,11 @@ exports.cssLoaders = function (options) {
         // 解决打包后背景图片路径不对的问题
         // static/css/views/index/index.css
         // ../../../../static/img/xx.jpg
-        publicPath: '../../../', // 注意: 此处根据路径, 自动更改
-        fallback: 'vue-style-loader'
-      })
+        publicPath: "../../../", // 注意: 此处根据路径, 自动更改
+        fallback: "vue-style-loader"
+      });
     } else {
-      return ['vue-style-loader'].concat(loaders)
+      return ["vue-style-loader"].concat(loaders);
     }
   }
 
@@ -177,46 +171,46 @@ exports.cssLoaders = function (options) {
   return {
     css: generateLoaders(),
     postcss: generateLoaders(),
-    less: generateLoaders('less'),
-    sass: generateLoaders('sass', {
+    less: generateLoaders("less"),
+    sass: generateLoaders("sass", {
       indentedSyntax: true
     }),
-    scss: generateLoaders('sass'),
-    stylus: generateLoaders('stylus'),
-    styl: generateLoaders('stylus')
-  }
-}
+    scss: generateLoaders("sass"),
+    stylus: generateLoaders("stylus"),
+    styl: generateLoaders("stylus")
+  };
+};
 
 // Generate loaders for standalone style files (outside of .vue)
-exports.styleLoaders = function (options) {
-  const output = []
-  const loaders = exports.cssLoaders(options)
+exports.styleLoaders = function(options) {
+  const output = [];
+  const loaders = exports.cssLoaders(options);
 
   for (const extension in loaders) {
-    const loader = loaders[extension]
+    const loader = loaders[extension];
     output.push({
-      test: new RegExp('\\.' + extension + '$'),
+      test: new RegExp("\\." + extension + "$"),
       use: loader
-    })
+    });
   }
 
-  return output
-}
+  return output;
+};
 
 exports.createNotifierCallback = () => {
-  const notifier = require('node-notifier')
+  const notifier = require("node-notifier");
 
   return (severity, errors) => {
-    if (severity !== 'error') return
+    if (severity !== "error") return;
 
-    const error = errors[0]
-    const filename = error.file && error.file.split('!').pop()
+    const error = errors[0];
+    const filename = error.file && error.file.split("!").pop();
 
     notifier.notify({
       title: packageConfig.name,
-      message: severity + ': ' + error.name,
-      subtitle: filename || '',
-      icon: path.join(__dirname, 'logo.png')
-    })
-  }
-}
+      message: severity + ": " + error.name,
+      subtitle: filename || "",
+      icon: path.join(__dirname, "logo.png")
+    });
+  };
+};

+ 65 - 61
build/webpack.base.conf.js

@@ -1,74 +1,78 @@
-'use strict'
-const path = require('path')
-const utils = require('./utils')
-const config = require('../config')
-const vueLoaderConfig = require('./vue-loader.conf')
-const pathSrc = path.resolve(__dirname, '../src');
+"use strict";
+const path = require("path");
+const utils = require("./utils");
+const config = require("../config");
+const vueLoaderConfig = require("./vue-loader.conf");
+const pathSrc = path.resolve(__dirname, "../src");
 function resolve(dir) {
-  return path.join(__dirname, '..', dir)
+  return path.join(__dirname, "..", dir);
 }
 
 const createLintingRule = () => ({
   test: /\.(js|vue)$/,
-  loader: 'eslint-loader',
-  enforce: 'pre',
-  include: [resolve('src'), resolve('test')],
+  loader: "eslint-loader",
+  enforce: "pre",
+  include: [resolve("src"), resolve("test")],
   options: {
-    formatter: require('eslint-friendly-formatter'),
+    formatter: require("eslint-friendly-formatter"),
     emitWarning: !config.dev.showEslintErrorsInOverlay
   }
-})
+});
 
 let babelLoader = {
+  include: [
+    resolve("src"),
+    resolve("test"),
+    resolve("node_modules/webpack-dev-server/client"),
+    resolve("node_modules/vue-element-bigdata-table"),
+    resolve("node_modules/element-ui/src"),
+    resolve("node_modules/icore-sdk")
+  ],
+  exclude: [
+    resolve("node_modules/element-ui/src/utils/date.js"),
+    resolve("node_modules/element-ui/src/utils/popper.js")
+  ] // sb element-ui竟然在源码里面单独把这两个js转译成了es5 气死哥了!!
+};
+
+if (pathSrc.indexOf("node_modules") > -1) {
+  babelLoader = {
     include: [
-                resolve('src'), resolve('test'), 
-                resolve('node_modules/webpack-dev-server/client'),
-                resolve('node_modules/vue-element-bigdata-table'),
-                resolve('node_modules/element-ui/src'),
-                resolve('node_modules/icore-sdk')
-            ],
+      resolve("src"),
+      resolve("test"),
+      resolve("../../src"),
+      resolve("../../test"),
+      resolve("../webpack-dev-server/client"),
+      resolve("../vue-element-bigdata-table"),
+      resolve("../element-ui/src"),
+      resolve("../icore-sdk")
+    ],
     exclude: [
-                resolve('node_modules/element-ui/src/utils/date.js'), 
-                resolve('node_modules/element-ui/src/utils/popper.js')
-            ]// sb element-ui竟然在源码里面单独把这两个js转译成了es5 气死哥了!!
-}
-
-if (pathSrc.indexOf('node_modules') > -1) {
-    babelLoader = {
-        include: [
-                    resolve('src'), resolve('test'),
-                    resolve('../../src'), resolve('../../test'), 
-                    resolve('../webpack-dev-server/client'),
-                    resolve('../vue-element-bigdata-table'),
-                    resolve('../element-ui/src'),
-                    resolve('../icore-sdk')
-                ],
-        exclude: [
-                    resolve('../element-ui/src/utils/date.js'), 
-                    resolve('../element-ui/src/utils/popper.js')
-                ]// sb element-ui竟然在源码里面单独把这两个js转译成了es5 气死哥了!!
-    }
+      resolve("../element-ui/src/utils/date.js"),
+      resolve("../element-ui/src/utils/popper.js")
+    ] // sb element-ui竟然在源码里面单独把这两个js转译成了es5 气死哥了!!
+  };
 }
 
 module.exports = {
-  context: path.resolve(__dirname, '../'),
+  context: path.resolve(__dirname, "../"),
   // entry: {
   //   app: './src/main.js'
   // },
   entry: utils.entries(),
   output: {
     path: config.build.assetsRoot,
-    filename: '[name].js',
-    publicPath: process.env.NODE_ENV === 'production' ?
-      config.build.assetsPublicPath :
-      config.dev.assetsPublicPath
+    filename: "[name].js",
+    publicPath:
+      process.env.NODE_ENV === "production"
+        ? config.build.assetsPublicPath
+        : config.dev.assetsPublicPath
   },
   resolve: {
-    extensions: ['.js', '.vue', '.json'],
+    extensions: [".js", ".vue", ".json"],
     alias: {
-      'vue$': 'vue/dist/vue.esm.js',
-      '@': resolve('src'),
-      '~': resolve('../../src'),
+      vue$: "vue/dist/vue.esm.js",
+      "@": resolve("src"),
+      "~": resolve("../../src")
     }
   },
   module: {
@@ -76,37 +80,37 @@ module.exports = {
       ...(config.dev.useEslint ? [createLintingRule()] : []),
       {
         test: /\.vue$/,
-        loader: 'vue-loader',
+        loader: "vue-loader",
         options: vueLoaderConfig
       },
       {
         test: /\.js$/,
-        loader: 'babel-loader',
+        loader: "babel-loader",
         exclude: babelLoader.exclude,
         include: babelLoader.include
       },
       {
         test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
-        loader: 'url-loader',
+        loader: "url-loader",
         options: {
           limit: 10000,
-          name: utils.assetsPath('img/[name].[hash].[ext]')
+          name: utils.assetsPath("img/[name].[hash].[ext]")
         }
       },
       {
         test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
-        loader: 'url-loader',
+        loader: "url-loader",
         options: {
           limit: 10000,
-          name: utils.assetsPath('media/[name].[hash].[ext]')
+          name: utils.assetsPath("media/[name].[hash].[ext]")
         }
       },
       {
         test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
-        loader: 'url-loader',
+        loader: "url-loader",
         options: {
           limit: 10000,
-          name: utils.assetsPath('fonts/[name].[hash].[ext]')
+          name: utils.assetsPath("fonts/[name].[hash].[ext]")
         }
       }
     ]
@@ -117,10 +121,10 @@ module.exports = {
     setImmediate: false,
     // prevent webpack from injecting mocks to Node native modules
     // that does not make sense for the client
-    dgram: 'empty',
-    fs: 'empty',
-    net: 'empty',
-    tls: 'empty',
-    child_process: 'empty'
+    dgram: "empty",
+    fs: "empty",
+    net: "empty",
+    tls: "empty",
+    child_process: "empty"
   }
-}
+};

+ 65 - 55
config/index.js

@@ -1,54 +1,64 @@
-'use strict'
+"use strict";
 // Template version: 1.3.1
 // see http://vuejs-templates.github.io/webpack for documentation.
 
-const path = require('path')
+const path = require("path");
 
-const pathSrc = path.resolve(__dirname, '../src');
+const pathSrc = path.resolve(__dirname, "../src");
 
 let proxyTable = {
-  '/icore.icp.web/pass/v1/sysusers/user/token': {  //https://portal.steerinfo.com/icore.icp.web/pass/sso/v1/sysusers/user/token
+  "/icore.icp.web/pass/v1/sysusers/user/token": {
+    //https://portal.steerinfo.com/icore.icp.web/pass/sso/v1/sysusers/user/token
     //target: 'https://portal-dev.steerinfo.com/icore.icp.web/pass/sso/v1/sysusers/user/token',
-    target:'http://172.16.33.166:9001/v1/sysusers/user/token',
+    target: "http://172.16.33.166:9001/v1/sysusers/user/token",
     changeOrigin: true,
     pathRewrite: {
-      '^/icore.icp.web/pass/v1/sysusers/user/token': '/'
+      "^/icore.icp.web/pass/v1/sysusers/user/token": "/"
     }
   },
-  '/icore.icp.web/pass/v1': {
+  "/icore.icp.web/pass/v1": {
     //target: 'http://172.16.33.161:80/v1', //加http
-    target: 'http://172.16.33.166:9001/v1',
+    target: "http://172.16.33.166:9001/v1",
     changeOrigin: true,
     pathRewrite: {
-      '^/icore.icp.web/pass/v1': '/' //这里理解成用‘/api’代替target里面的地址,组件中我们调接口时直接用/api代替
+      "^/icore.icp.web/pass/v1": "/" //这里理解成用‘/api’代替target里面的地址,组件中我们调接口时直接用/api代替
       // 比如我要调用'http://0.0:300/user/add',直接写‘/api/user/add’即可 代理后地址栏显示/
     }
   },
-   '/icore.icp.web/pass/auth/login': {
-     //target: 'http://sso-dev.steerinfo.com/icore.icp.web/pass/auth/login',
-     target: 'http://172.16.33.166:9001/auth/login',
-     changeOrigin: true,
-     pathRewrite: {
-       '^/icore.icp.web/pass/auth/login': ''
-     }
-   },
-   '/icore-api': {
-    target: 'http://172.16.33.166:9001',
+  "/icore.icp.web/pass/auth/login": {
+    //target: 'http://sso-dev.steerinfo.com/icore.icp.web/pass/auth/login',
+    target: "http://172.16.33.166:9001/auth/login",
     changeOrigin: true,
     pathRewrite: {
-      '^/icore-api': '/'
+      "^/icore.icp.web/pass/auth/login": ""
     }
   },
-  '/icore.icp.web/pass/act': {
-    target: 'http://172.16.33.166:8095',
+  "/icore-api/v1": {
+    target: "http://172.16.33.161:8088/api/v1/truckTms",
+    // target: "http://localhost:8080",
+    // target: "http://192.168.1.109:8080",
+    ws: true,
+    pathRewrite: {
+      "^/icore-api/v1": ""
+    }
+  },
+  "/icore-api": {
+    target: "http://172.16.33.166:9001",
+    changeOrigin: true,
+    pathRewrite: {
+      "^/icore-api": "/"
+    }
+  },
+  "/icore.icp.web/pass/act": {
+    target: "http://172.16.33.166:8095",
     changeOrigin: true,
     pathRewrite: {
-      '^/icore.icp.web/pass/act': '/'
+      "^/icore.icp.web/pass/act": "/"
     }
   },
   // 表格表单请求的域名地址
   "/api/v1/cd": {
-    target: "http://172.16.33.166:8083",
+    target: "http://172.16.33.161:8083",
     ws: true,
     pathRewrite: {
       "^/api/v1/cd": "/api/v1/cd"
@@ -63,52 +73,52 @@ let proxyTable = {
     }
   },
   // 所有数据的请求域名地址
+  // http://localhost:8802/api/v1/tms/getAllEnFactoryResult?apiId=143&orderType=5&pageNum=1&pageSize=10
+  // http://172.16.33.161:8088/api/v1/truckTms/sysusertablecfgs/?userId=admin&userCode=admin&companyId=713710108567277568&uiId=metaData_appManagement_appSysTable&icore_t=1658973823958
+  // http://localhost:8802/icore-api/v1/sysusertablecfgs/?userId=923674253012897792&userCode=admin06&companyId=713710108567277568&uiId=systemConfig_userManage_table&icore_t=1659347371501
   "/api/v1": {
-    target: "http://172.16.33.166:8080",
-    // target: "http://172.16.33.162:8019", 
-    // target: "http://192.168.1.100:8019",
+    target: "http://172.16.33.166:80",
     // target: "http://localhost:8080",
-    // target: "http://localhost:8019",
+    // target: "http://192.168.1.109:8080",
     ws: true,
     pathRewrite: {
       "^/api/v1": "/api/v1"
     }
   },
   "/views/api/v1": {
+    target: "http://172.16.33.166:80",
     // target: "http://localhost:8080",
-     target: "http://172.16.33.166:8080",
-    // target: "http://192.168.1.115:8080",
+    // target: "http://192.168.1.109:8080",
     ws: true,
     pathRewrite: {
       "^/views/api/v1": "/api/v1"
     }
   },
-  '/icore.icp.web/pass/logout': {
-    target: 'http://172.16.33.166:9001/logout',
+  "/icore.icp.web/pass/logout": {
+    target: "http://172.16.33.166:9001/logout",
     changeOrigin: true,
     pathRewrite: {
-      '^/icore.icp.web/pass/logout': '/'
-    }
-  },
-}
-let dist = '../dist';
-if (pathSrc.indexOf('node_modules') > -1) {
-    dist = '../../../dist';
-    let proxyTableGet = require('../../../cors.js').proxyTable;
-    for (let i in proxyTableGet) {
-        proxyTable[i] = proxyTableGet[i]
+      "^/icore.icp.web/pass/logout": "/"
     }
+  }
+};
+let dist = "../dist";
+if (pathSrc.indexOf("node_modules") > -1) {
+  dist = "../../../dist";
+  let proxyTableGet = require("../../../cors.js").proxyTable;
+  for (let i in proxyTableGet) {
+    proxyTable[i] = proxyTableGet[i];
+  }
 }
 
 module.exports = {
-    dev: {
-      // Paths
-      assetsSubDirectory: 'static',
-      assetsPublicPath: '/',
-      proxyTable: proxyTable,
-
+  dev: {
+    // Paths
+    assetsSubDirectory: "static",
+    assetsPublicPath: "/",
+    proxyTable: proxyTable,
     // Various Dev Server settings
-    host: 'localhost', // can be overwritten by process.env.HOST
+    host: "localhost", // can be overwritten by process.env.HOST
     port: 8802, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
     autoOpenBrowser: false,
     errorOverlay: true,
@@ -147,12 +157,12 @@ module.exports = {
 
   build: {
     // Template for index.html
-    index: path.resolve(__dirname, dist + '/index.html'),
+    index: path.resolve(__dirname, dist + "/index.html"),
 
     // Paths
     assetsRoot: path.resolve(__dirname, dist),
-    assetsSubDirectory: 'static', // 打包后 static放的位置
-    assetsPublicPath: '../', // html中webpack打包的JS -> ../static/xxx.js
+    assetsSubDirectory: "static", // 打包后 static放的位置
+    assetsPublicPath: "../", // html中webpack打包的JS -> ../static/xxx.js
 
     /**
      * Source Maps
@@ -160,14 +170,14 @@ module.exports = {
 
     productionSourceMap: false,
     // https:       //webpack.js.org/configuration/devtool/#production
-    devtool: '#source-map',
+    devtool: "#source-map",
 
     // Gzip off by default as many popular static hosts such as
     // Surge or Netlify already gzip all static assets for you.
     // Before setting to `true`, make sure to:
     // npm install --save-dev compression-webpack-plugin
     productionGzip: false,
-    productionGzipExtensions: ['js', 'css'],
+    productionGzipExtensions: ["js", "css"],
 
     // Run the build command with an extra argument to
     // View the bundle analyzer report after build finishes:
@@ -175,4 +185,4 @@ module.exports = {
     // Set to `true` or `false` to always turn it on or off
     bundleAnalyzerReport: process.env.npm_config_report
   }
-}
+};

BIN
icore-pass.zip


+ 0 - 1
nginx.conf

@@ -16,7 +16,6 @@ events {
 http {
     include       mime.types;
     default_type  application/octet-stream;
-
     #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
     #                  '$status $body_bytes_sent "$http_referer" '
     #                  '"$http_user_agent" "$http_x_forwarded_for"';

+ 16 - 4
package.json

@@ -15,7 +15,10 @@
     "testc": "cross-env NODE_ENV=test nyc mocha-webpack --webpack-config build/webpack.test.conf.js --require test/setup.js test/**/*.spec.js"
   },
   "dependencies": {
+    "@amap/amap-jsapi-loader": "^1.0.1",
     "@antv/g6": "1.2.8",
+    "@vue/reactivity": "^3.2.31",
+    "amap-js": "^2.4.0",
     "apollo-cache-inmemory": "^1.5.1",
     "apollo-client": "^2.5.1",
     "apollo-link": "^1.2.11",
@@ -23,43 +26,52 @@
     "apollo-link-http": "^1.5.14",
     "axios": "^0.26.1",
     "babel-polyfill": "^6.26.0",
+    "bignumber.js": "^9.0.2",
     "crypto": "^1.0.1",
     "echarts": "^4.1.0",
     "el-cascader-multi": "^1.1.8",
-    "element-ui": "2.15.7",
+    "element-ui": "2.4.2",
     "file-saver": "^1.3.8",
     "graphql": "^14.1.1",
     "graphql-tag": "^2.10.1",
     "icore-sdk": "1.0.1-alpha.65",
     "json-schema-editor-vue": "1.2.5",
     "json2xml": "^0.1.3",
+    "jspdf": "^2.5.1",
     "jssha": "^3.2.0",
+    "lay-excel": "^1.7.6",
+    "mathjs": "^10.6.4",
     "object-assign": "^4.1.1",
     "qs": "^6.9.3",
     "sass-loader": "^6.0.7",
     "sass-node": "^4.11.2",
     "sass-resources-loader": "^2.2.4",
+    "screenfull": "^5.1.0",
     "script-loader": "^0.7.2",
     "socket.io": "^2.2.0",
     "socket.io-stream": "^0.9.1",
     "sockjs-client": "^1.3.0",
     "uuid": "^3.3.2",
+    "view-design": "^4.7.0",
     "vue": "^2.5.2",
+    "vue-amap": "^0.5.10",
     "vue-apollo": "^3.0.0-beta.28",
     "vue-baidu-map": "^0.21.19",
     "vue-clipboard2": "^0.2.1",
-    "vue-element-bigdata-table": "^1.3.1",
+    "vue-print-nb": "^1.7.5",
     "vue-property-decorator": "^8.2.1",
     "vue-quill-editor": "^3.0.5",
     "vue-router": "^3.0.1",
+    "vue-social-share": "0.0.3",
     "vue-splitpane": "^1.0.2",
     "vuescroll": "^4.17.3",
     "vuex": "^3.0.1",
-    "vxe-table": "^3.4.12",
+    "vxe-table": "^3.5.2",
     "x2js": "^3.3.0",
     "xe-utils": "^3.5.4",
     "xlsx": "^0.18.4",
-    "xterm": "3.12.0"
+    "xterm": "3.12.0",
+    "codemirror": "5.65.5"
   },
   "devDependencies": {
     "@vue/test-utils": "^1.0.0-beta.24",

+ 19 - 0
src/assets/excel/Export2Excel.js

@@ -132,6 +132,25 @@ export function export_json_to_excel(th, jsonData, defaultTitle) {
     var wb = new Workbook(), ws = sheet_from_array_of_arrays(data);
  
  
+    /* add worksheet to workbook */
+    wb.SheetNames.push(ws_name);
+    wb.Sheets[ws_name] = ws;
+ 
+    var wbout = XLSX.write(wb, {bookType: 'xlsx', bookSST: false, type: 'binary'});
+    var title = defaultTitle || '列表'
+    saveAs(new Blob([s2ab(wbout)], {type: "application/octet-stream"}), title + ".xlsx")
+}
+export function exportJsonToExcel(th, jsonData, defaultTitle) {
+ 
+    /* original data */
+ 
+    var data = jsonData;
+    data.unshift(th);
+    var ws_name = "SheetJS";
+ 
+    var wb = new Workbook(), ws = sheet_from_array_of_arrays(data);
+ 
+ 
     /* add worksheet to workbook */
     wb.SheetNames.push(ws_name);
     wb.Sheets[ws_name] = ws;

BIN
src/assets/homepageimg/微信图片_20211128192004.jpg


BIN
src/assets/img/TEST01.png


BIN
src/assets/img/leave.png


BIN
src/assets/img/map_site.png


BIN
src/assets/img/park.png


BIN
src/assets/img/smallcar.png


BIN
src/assets/img/test.png


BIN
src/assets/img/traffic_texture_darkred-pass.png


BIN
src/assets/loading_images/loading.gif


+ 2 - 1
src/components/DilCommonUI/index.js

@@ -1,7 +1,8 @@
 import Table from "./packages/table/index.js";
 import Form from "./packages/form/index.js";
+import MergeRowTable from "./packages/mergeRowTable/index.js";
 
-const components = [Table, Form];
+const components = [Table, Form, MergeRowTable];
 
 const install = function(Vue) {
   components.forEach(component => {

+ 7 - 0
src/components/DilCommonUI/packages/mergeRowTable/index.js

@@ -0,0 +1,7 @@
+import MergeRowTable from "./src/mergeRowTable.vue";
+
+MergeRowTable.install = function(Vue) {
+  Vue.component(MergeRowTable.name, MergeRowTable);
+};
+
+export default MergeRowTable;

+ 383 - 0
src/components/DilCommonUI/packages/mergeRowTable/src/mergeRowTable.js

@@ -0,0 +1,383 @@
+/**
+ * 组件编写人--杨海明
+ */
+import Sortablejs from "sortablejs";
+export default {
+  data() {
+    return {
+      // 等数据渲染完了再显示
+      isShow: false,
+      // 自己 请求体 参数
+      dataRequestQuery: {},
+      // 自己的表数据
+      dataTabel: [],
+      // 自己的表头数据
+      dataColumnData: [],
+      // 拖拽的表头数据
+      dataDropColumn: [],
+      // 自己的数据总条数
+      dataTotal: 0,
+      // 自己的当前页面数
+      dataCurrentPage: 1,
+      // 自己的每页显示条目个数
+      dataPageSize: 10,
+      // 保存表格所有页面所选中的数据
+      dataRadioId: [],
+      // 保存表格单选的数据 保存数据的id
+      dataRadioId: "",
+      // 合并数组
+      spanArr: []
+    };
+  },
+  created() {
+    if (this.isHeigth) {
+      window.addEventListener("resize", this.getHeight);
+      this.getHeight();
+    }
+    this.dataCurrentPage = this.currentPage;
+    this.dataPageSize = this.pageSize;
+    this.requestData();
+  },
+  mounted() {
+    //行拖拽
+    // this.rowDrop();
+    //列拖拽
+    // this.columnDrop();
+  },
+  methods: {
+    //记录每一行的合并数
+    getSpanArr(data) {
+      //每次调用方法初始化
+      this.spanArr = [];
+      for (var i = 0; i < data.length; i++) {
+        if (i === 0) {
+          this.spanArr.push(1);
+          data[i].group = i;
+          this.pos = 0;
+        } else {
+          // 判断当前元素与上一个元素是否相同
+          if (data[i][this.comparison] === data[i - 1][this.comparison]) {
+            this.spanArr[this.pos] += 1;
+            this.spanArr.push(0);
+            data[i].group = data[i - 1].group;
+          } else {
+            this.spanArr.push(1);
+            this.pos = i;
+            data[i].group = data[i - 1].group + 1;
+          }
+        }
+      }
+      this.$emit("funs", data);
+    },
+    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+      if (this.columnIndexs.indexOf(columnIndex) != -1) {
+        const _row = this.spanArr[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
+      }
+    },
+    getHeight() {
+      this.height = window.innerHeight - this.shiyHeigth;
+    },
+    // 通过请求获取数据
+    requestData(options) {
+      console.log(options);
+      let pageNum = undefined;
+      let pageSize = undefined;
+
+      if (options) {
+        pageNum = options.pageNum;
+        pageSize = options.pageSize;
+      }
+
+      if (this.requestUrl) {
+        // 处理请求地址逻辑
+        let url;
+        if (this.requestUrl.indexOf("//") > -1) {
+          url = this.requestUrl;
+        } else {
+          url = this.requestUrl;
+        }
+        // 判断是否需要在请求体中放入参数
+        if (this.requestQuery) {
+          this.dataRequestQuery = this.requestQuery;
+          // console.log(this.dataRequestQuery.resultBreakId)
+        }
+        let data = undefined;
+        for (const key in this.dataRequestQuery) {
+          const val = this.dataRequestQuery[key];
+          if (val || val == 0) {
+            if (!data) data = {};
+            data[key] = val;
+          }
+        }
+        //判断是否是带分页查询
+        if (this.isKuang) {
+          // 发送请求
+          this.axios
+            .post(url, data, {
+              // 请求地址 中
+              params: {
+                pageNum: 1,
+                pageSize: pageSize || this.dataPageSize
+              }
+            })
+            .then(response => {
+              let d = response.data.data;
+              this.dataTabel = d.list;
+              this.getSpanArr(this.dataTabel);
+              console.log(this.dataTabel);
+              this.dataTotal = d.total;
+              //执行成功的回调
+              this.$emit("func", response.data.data);
+              this.refreshColumnData(d.columnData);
+              this.isShow = true;
+            })
+            .catch(() => {});
+        } else {
+          // 发送请求
+          this.axios
+            .post(url, data, {
+              // 请求地址 中
+              params: {
+                pageNum: pageNum || this.dataCurrentPage,
+                pageSize: pageSize || this.dataPageSize
+              }
+            })
+            .then(response => {
+              let d = response.data.data;
+              this.dataTabel = d.list;
+              this.dataTotal = d.total;
+              this.getSpanArr(this.dataTabel);
+              console.log(this.dataTabel);
+              //执行成功的回调
+              this.$emit("func", response.data.data);
+              this.refreshColumnData(d.columnData);
+              this.isShow = true;
+            });
+        }
+      } else {
+        console.warn("requestUrl 参数不能为 null");
+      }
+    },
+    // 刷新表头显示数据
+    refreshColumnData(columnData) {
+      // 表头只赋值一次(在查出全部数据的情况下才只赋值一次)
+
+      // if (this.dataColumnData.length > 0) {
+      //   return;
+      // }
+      // 如果前端有写表头,则加在后端表头前面
+
+      const d = this.columnData.concat(columnData);
+      // 把操作列拼接到最后一列
+      this.dataColumnData = d;
+      this.dataDropColumn = [].concat(this.dataColumnData);
+    },
+    // 排序回调
+    sortChange({ column, prop, order }) {
+      // column : 列的数据
+      // prop : 排序字段参数名
+      // order : 排序方式 (ascending:升序;descending:降序;null:无)
+
+      // 前端排序
+      // const sort = {
+      //   ascending: (a, b) => {
+      //     a[prop] = this.getString(a[prop]);
+      //     b[prop] = this.getString(b[prop]);
+      //     return a[prop].localeCompare(b[prop] || "", 'zh-CN');
+      //   },
+      //   descending: (a, b) => {
+      //     a[prop] = this.getString(a[prop]);
+      //     b[prop] = this.getString(b[prop]);
+      //     return b[prop].localeCompare(a[prop] || "", 'zh-CN')
+      //   },
+      // };
+      // this.dataTabel.sort(sort[order]);
+      // 前端排序
+
+      // 后端排序
+      let s = {
+        ascending: "asc",
+        descending: "desc"
+      };
+
+      let value = {
+        orderType: s[order] || undefined,
+        orderField: order ? prop : undefined
+      };
+
+      this.setDataRequestQuery(value);
+    },
+    // 更新请求参数
+    setDataRequestQuery(value) {
+      let q = this.dataRequestQuery;
+      for (const key in value) {
+        q[key] = value[key];
+      }
+      this.requestData(q);
+      this.$emit("update:requestQuery", q);
+      this.dataRequestQuery = q;
+    },
+    // 格式化字符串
+    getString(str) {
+      if (str != null && str != undefined && str.toString) {
+        return str.toString();
+      } else {
+        return str || "";
+      }
+    },
+    // 当某一行被点击时会触发该事件
+    rowClick(row, column, event) {
+      if (this.selectionType == "radio") {
+        if (this.dataRadioId == row.ROW_ID) {
+          this.dataRadioId = "";
+          row = {};
+        } else {
+          this.dataRadioId = row.ROW_ID;
+        }
+        this.$emit("radio-change", row);
+      }
+    },
+    // 多选的选中行改变回调
+    selectionChange(selection) {
+      // this.dataSelection = selection;
+      // 将多选中的数据抛出
+      this.$emit("selection-change", selection);
+    },
+    // 当表格的筛选条件发生变化的时候会触发该事件,
+    // 参数的值是一个对象,对象的 key 是 column 的 columnKey,对应的 value 为用户选择的筛选条件的数组。
+    filterChange(filters) {
+      let value = {};
+      for (const key in filters) {
+        value[key] = filters[key].length > 0 ? filters[key] : undefined;
+      }
+      // 每次筛选时,都默认将页面改为第一页,避免数据过少时,显示没有数据
+      this.currentChange(1, false);
+      this.setDataRequestQuery(value);
+    },
+    // 行拖拽
+    rowDrop() {
+      const tbody = document.querySelector(".el-table__body-wrapper tbody");
+      const _this = this;
+      Sortablejs.create(tbody, {
+        onEnd({ newIndex, oldIndex }) {
+          const currRow = _this.dataTabel.splice(oldIndex, 1)[0];
+          _this.dataTabel.splice(newIndex, 0, currRow);
+        }
+      });
+    },
+    // 列拖拽
+    columnDrop() {
+      const wrapperTr = document.querySelector(".el-table__header-wrapper tr");
+      this.sortablejs = Sortablejs.create(wrapperTr, {
+        animation: 180,
+        delay: 0,
+        handle: ".allowDrag",
+        onEnd: evt => {
+          // 因为序号列和单多选列不在数组中,所以需要进行偏移计算
+          const offset = this.dragColumnOffset;
+          evt.oldIndex -= offset;
+          evt.newIndex -= offset;
+          // 换列
+          const oldItem = this.dataDropColumn[evt.oldIndex];
+          this.dataDropColumn.splice(evt.oldIndex, 1);
+          this.dataDropColumn.splice(evt.newIndex, 0, oldItem);
+        }
+      });
+    },
+    // current-page 改变时会触发
+    currentChange(val, isRequest = true) {
+      if (isRequest) {
+        this.requestData({ pageNum: val });
+      }
+      // 最后通知父节点页面改变
+      this.dataCurrentPage = val;
+      this.$emit("update:current-page", val);
+    },
+    // pageSize 改变时会触发
+    sizeChange(val) {
+      this.dataPageSize = val;
+      this.requestData({});
+      this.$emit("update:size-change", val);
+    }
+  },
+  computed: {
+    // 计算是否使用排序功能
+    dataSortable() {
+      return function(item) {
+        if (item.template) {
+          return false;
+        } else if (item.sortable) {
+          return item.sortable;
+        } else {
+          return this.sortable;
+        }
+      };
+    },
+    // 计算每列的最小宽度
+    dataColumnMinWidth() {
+      return function(item) {
+        let mw = 0;
+        if (this.dataSortable(item)) {
+          // 如果使用排序功能
+          mw += 30;
+        }
+
+        if (item.filters && item.filters.length > 0) {
+          mw += 20;
+        }
+        if (item.label) {
+          mw += item.label.toString().length * 30;
+        }
+        return mw;
+      };
+    },
+    // 计算拖拽列的偏移差
+    dragColumnOffset() {
+      let o = 0;
+      if (this.showIndex) {
+        o++;
+      }
+      if (this.selectionType != "") {
+        o++;
+      }
+      return o;
+    }
+  },
+  watch: {
+    requestQuery: {
+      deep: true,
+      handler(val, oldVal) {
+        let q = this.dataRequestQuery;
+        for (const key in val) {
+          q[key] = val[key] ? val[key] : undefined;
+        }
+        this.setDataRequestQuery(q);
+      }
+    }
+  },
+  // 注册组件
+  components: {
+    // 代理组件
+    componentProxy: {
+      props: {
+        html: {
+          default: ""
+        },
+        scope: {
+          default() {
+            return {};
+          }
+        }
+      },
+      template: ``,
+      created() {
+        this.$options.template = this.html;
+      }
+    }
+  }
+};

+ 291 - 0
src/components/DilCommonUI/packages/mergeRowTable/src/mergeRowTable.vue

@@ -0,0 +1,291 @@
+<template>
+  <div class="st-base-table" v-show="isShow">
+    <!-- 表格主体 -->
+    <el-table
+      ref="mainTable"
+      :data="dataTabel"
+      row-key="ROW_ID"
+      :stripe="stripe"
+      :border="border"
+      :cell-class-name="cellClassName"
+      :height="height"
+      :highlight-current-row="highlightCurrentRow"
+      style="width:100%"
+      :span-method="objectSpanMethod"
+      @sort-change="sortChange"
+      @selection-change="selectionChange"
+      @filter-change="filterChange"
+      @row-click="rowClick"
+      @row-dblclick="rowDbClick"
+      v-loading="loading"
+      element-loading-text="玩命加载中"
+      element-loading-spinner="el-icon-loading"
+      :isHeigth="isHeigth"
+      :shiyHeigth="shiyHeigth"
+    >
+      <!-- 多选列 -->
+      <el-table-column
+        v-if="selectionType == 'select'"
+        type="selection"
+        width="50"
+        align="center"
+        fixed="left"
+        :reserve-selection="reserveSelection"
+        :resizable="false"
+      >
+      </el-table-column>
+
+      <!-- 单选 -->
+      <el-table-column
+        v-if="selectionType == 'radio'"
+        width="50"
+        align="center"
+        label="单选"
+        fixed="left"
+        :resizable="false"
+      >
+        <template slot-scope="scope">
+          <el-radio
+            :value="dataRadioId"
+            :label="scope.row.ROW_ID"
+            @click.native.prevent.stop="rowClick(scope.row)"
+          >
+            {{ "" }}
+          </el-radio>
+        </template>
+      </el-table-column>
+
+      <!-- 序号 -->
+      <el-table-column
+        width="50"
+        label="序号"
+        align="center"
+        fixed="left"
+        :resizable="false"
+      >
+        <template slot-scope="scope">{{ scope.row.group + 1 }}</template>
+      </el-table-column>
+
+      <!-- 表格列 -->
+      <el-table-column
+        v-for="(item, index) in dataColumnData"
+        :key="item.data_id || 'auto_' + index"
+        v-bind="item"
+        :column-key="dataDropColumn[index].prop"
+        :align="item.align || align"
+        :sortable="dataSortable(item)"
+        :show-overflow-tooltip="item.showOverflowTooltip || showOverflowTooltip"
+        :min-width="item['min-width'] || dataColumnMinWidth(item)"
+        :class-name="item['class-name'] || 'allowDrag'"
+      >
+        <!-- 表格每行的内容 -->
+        <div slot-scope="scope">
+          <!-- 功能位置 -->
+          <component-proxy
+            v-if="item.template"
+            :html="item.template"
+            :scope="scope"
+            v-on="$listeners"
+          >
+          </component-proxy>
+
+          <!-- 文本位置 -->
+          <template v-else>
+            {{ dataTabel[scope.$index][dataDropColumn[index].prop] }}
+          </template>
+        </div>
+      </el-table-column>
+
+      <!-- 默认插槽 -->
+      <slot></slot>
+    </el-table>
+
+    <!-- 分页器 -->
+    <el-pagination
+      v-if="isPagination"
+      :layout="layout"
+      :current-page="dataCurrentPage"
+      :page-sizes="pageSizes"
+      :page-size="dataPageSize"
+      :total="dataTotal"
+      @current-change="currentChange"
+      @size-change="sizeChange"
+    >
+    </el-pagination>
+  </div>
+</template>
+
+<script>
+import table from "./mergeRowTable.js";
+export default {
+  name: "MergeRowTable",
+  extends: table,
+  props: {
+    // 合并行下标
+    columnIndexs: {
+      default: []
+    },
+    //比对字段
+    comparison: {
+      default: ""
+    },
+    shiyHeigth: {
+      default: null
+    },
+    isHeigth: {
+      default: false
+    },
+    drawer: {
+      default: false
+    },
+    //判断是否带分页查询
+    isKuang: {
+      default: false
+    },
+    // 请求地址
+    requestUrl: {
+      default: ""
+    },
+    // 请求参数 请求体中的参数
+    requestQuery: {
+      default() {
+        return {};
+      }
+    },
+    // 表头数据
+    columnData: {
+      default() {
+        return [];
+      }
+    },
+    // 是否显示序号
+    showIndex: {
+      default: true
+    },
+    // 是否显示选择框
+    // radio : 显示单选框
+    // select : 显示多选框
+    selectionType: {
+      default: ""
+    },
+    // 是否在数据翻页后保留之前选中的数据(需指定 row-key)
+    reserveSelection: {
+      default: true
+    },
+    // 是否为斑马纹 table
+    stripe: {
+      default: true
+    },
+    // Table 的高度,默认为自动高度。
+    // 如果 height 为 number 类型,单位 px;
+    // 如果 height 为 string 类型,则这个高度会设置为 Table 的 style.height 的值,Table 的高度会受控于外部样式。
+    height: {
+      default: null
+    },
+    // Table 的最大高度。合法的值为数字或者单位为 px 的高度。
+    //sdada
+    maxHeight: {
+      default: null
+    },
+    // 是否启用排序
+    sortable: {
+      default: "custom"
+    },
+    // 对齐方式 left/center/right
+    align: {
+      default: "center"
+    },
+    // 是否带有纵向边框
+    border: {
+      default: true
+    },
+    // 是否要高亮当前行
+    highlightCurrentRow: {
+      default: false
+    },
+    // 当内容过长被隐藏时显示 tooltip
+    showOverflowTooltip: {
+      default: true
+    },
+    // 行的 className 的回调方法,也可以使用字符串为所有行设置一个固定的 className。
+    rowClassName: {
+      default() {
+        return ({ row, rowIndex }) => "";
+      }
+    },
+    // 单元格的 className 的回调方法,也可以使用字符串为所有单元格设置一个固定的 className。
+    cellClassName: {
+      default() {
+        return ({ row, rowIndex }) => "";
+      }
+    },
+    loading: {
+      default: false
+    },
+    // 是否启用分页器
+    isPagination: {
+      default: true
+    },
+    // 当前页数,支持 .sync 修饰符
+    currentPage: {
+      default: 1
+    },
+    // 每页显示个数选择器的选项设置
+    pageSizes: {
+      default() {
+        return [10, 20, 50, 100, 200, 1000, 50000];
+      }
+    },
+    // 每页显示条目个数,支持 .sync 修饰符
+    pageSize: {
+      default: 10
+    },
+    //组件布局,子组件名用逗号分隔
+    layout: {
+      default: "total, prev, pager, next, sizes, jumper"
+    }
+  },
+  watch: {
+    requestUrl() {
+      this.refreshData();
+    },
+    drawer(val) {
+      if (val) {
+        this.dataRadioId = null;
+      }
+    }
+  },
+  methods: {
+    // 刷新表格数据
+    refreshData() {
+      this.requestData();
+      // 多选表格清空用户的选择
+      this.$refs.mainTable.clearSelection();
+    },
+    rowDbClick(row) {
+      console.log(row);
+      console.log("我被双击了");
+      this.$emit("rowDbClick", row);
+    },
+    toggleRowExpansion(row, expanded) {
+      this.$refs.mainTable.toggleRowExpansion(row, expanded);
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+@media print {
+  .el-pagination {
+    display: none;
+  }
+}
+/deep/.el-table .success-row {
+  background: #fff !important;
+  color: #f56c6c;
+  height: 44px;
+  line-height: 46px;
+  font-size: 22px;
+  font-weight: 700;
+}
+</style>

+ 0 - 1
src/components/DilCommonUI/packages/table/demo/06_FilterTable.vue

@@ -5,7 +5,6 @@
       <el-input v-model="inputValue" placeholder="请输入内容">车牌号</el-input>
       <el-button @click="onClick">筛选</el-button>
     </div>
-
     <dilTable
       requestUrl="/api/v1/td/truck/type/status2?apiId=13"
       :requestQuery="requestQuery"

+ 33 - 60
src/components/DilCommonUI/packages/table/src/table.js

@@ -25,11 +25,10 @@ export default {
     };
   },
   created() {
-    if(this.isHeigth){
-      window.addEventListener('resize',this.getHeight)
+    if (this.isHeigth) {
+      window.addEventListener("resize", this.getHeight);
       this.getHeight();
     }
-    
     this.dataCurrentPage = this.currentPage;
     this.dataPageSize = this.pageSize;
     this.requestData();
@@ -41,41 +40,19 @@ export default {
     // this.columnDrop();
   },
   methods: {
-    getHeight(){
+    getHeight() {
       this.height = window.innerHeight - this.shiyHeigth;
-      console.log(this.height);
     },
-    //计算合计列
-    getSummaries(columns,data) {
-      const sums = [];
-      columns.forEach((column, index) => {
-       const values = data.map(item => Number(item[column.property]));
-           if (column.property =='resultNetWeight' ) {
-            sums[index] = values.reduce((prev, curr) => {
-             const value = Number(curr);
-             if (!isNaN(value)) {
-               return prev + curr;
-             } else {
-               return prev;
-             }
-            }, 0);
-            console.log(sums )
-            sums[index];
-           }
-      });
-      // console.log("净重:" + sums)
-      return sums
-      },
     // 通过请求获取数据
     requestData(options) {
       let pageNum = undefined;
       let pageSize = undefined;
-      
+
       if (options) {
         pageNum = options.pageNum;
         pageSize = options.pageSize;
       }
-      
+
       if (this.requestUrl) {
         // 处理请求地址逻辑
         let url;
@@ -85,40 +62,40 @@ export default {
           url = this.requestUrl;
         }
         // 判断是否需要在请求体中放入参数
-        if(this.requestQuery){
-          this.dataRequestQuery=this.requestQuery;
-          // console.log(this.dataRequestQuery.resultBreakId)
+        if (this.requestQuery) {
+          this.dataRequestQuery = this.requestQuery;
         }
         let data = undefined;
         for (const key in this.dataRequestQuery) {
           const val = this.dataRequestQuery[key];
-          console.log(val)
-          if (val||val==0) {
+
+          if (val || val == 0) {
             if (!data) data = {};
             data[key] = val;
           }
         }
         //判断是否是带分页查询
-        if(this.isKuang){
+        if (this.isKuang) {
           // 发送请求
           this.axios
-          .post(url, data, {
-            // 请求地址 中
-            params: {
-              pageNum: 1,
-              pageSize: pageSize || this.dataPageSize
-            }
-          })
-          .then(response => {
-            let d = response.data.data;
-            this.dataTabel = d.list;
-            this.dataTotal = d.total;
-            //执行成功的回调
-            this.$emit('func',response.data.data);
-            this.refreshColumnData(d.columnData);
-            this.isShow = true;
-          });
-        }else{
+            .post(url, data, {
+              // 请求地址 中
+              params: {
+                pageNum: 1,
+                pageSize: pageSize || this.dataPageSize
+              }
+            })
+            .then(response => {
+              let d = response.data.data;
+              this.dataTabel = d.list;
+              this.dataTotal = d.total;
+              //执行成功的回调
+              this.$emit("func", response.data.data);
+              this.refreshColumnData(d.columnData);
+              //this.$refs.mainTable.getTableConfig();
+              this.isShow = true;
+            });
+        } else {
           // 发送请求
           this.axios
             .post(url, data, {
@@ -133,8 +110,9 @@ export default {
               this.dataTabel = d.list;
               this.dataTotal = d.total;
               //执行成功的回调
-              this.$emit('func',response.data.data);
+              this.$emit("func", response.data.data);
               this.refreshColumnData(d.columnData);
+              //this.$refs.mainTable.getTableConfig();
               this.isShow = true;
             });
         }
@@ -144,10 +122,7 @@ export default {
     },
     // 刷新表头显示数据
     refreshColumnData(columnData) {
-      // 表头只赋值一次(在查出全部数据的情况下才只赋值一次)
-      // if (this.dataColumnData.length > 0) return;
       // 如果前端有写表头,则加在后端表头前面
-      
       const d = this.columnData.concat(columnData);
       // 把操作列拼接到最后一列
       this.dataColumnData = d;
@@ -158,7 +133,6 @@ export default {
       // column : 列的数据
       // prop : 排序字段参数名
       // order : 排序方式 (ascending:升序;descending:降序;null:无)
-
       // 前端排序
       // const sort = {
       //   ascending: (a, b) => {
@@ -190,7 +164,6 @@ export default {
     },
     // 更新请求参数
     setDataRequestQuery(value) {
-      console.log(value);
       let q = this.dataRequestQuery;
       for (const key in value) {
         q[key] = value[key];
@@ -285,7 +258,7 @@ export default {
   computed: {
     // 计算是否使用排序功能
     dataSortable() {
-      return function (item) {
+      return function(item) {
         if (item.template) {
           return false;
         } else if (item.sortable) {
@@ -297,7 +270,7 @@ export default {
     },
     // 计算每列的最小宽度
     dataColumnMinWidth() {
-      return function (item) {
+      return function(item) {
         let mw = 0;
         if (this.dataSortable(item)) {
           // 如果使用排序功能
@@ -335,7 +308,7 @@ export default {
         }
         this.setDataRequestQuery(q);
       }
-    },
+    }
   },
   // 注册组件
   components: {

+ 68 - 58
src/components/DilCommonUI/packages/table/src/table.vue

@@ -7,7 +7,6 @@
       row-key="ROW_ID"
       :stripe="stripe"
       :border="border"
-      :row-class-name="rowClassName"
       :cell-class-name="cellClassName"
       :height="height"
       :highlight-current-row="highlightCurrentRow"
@@ -16,11 +15,14 @@
       @selection-change="selectionChange"
       @filter-change="filterChange"
       @row-click="rowClick"
+      @row-dblclick="rowDbClick"
       v-loading="loading"
       element-loading-text="玩命加载中"
       element-loading-spinner="el-icon-loading"
       :isHeigth="isHeigth"
       :shiyHeigth="shiyHeigth"
+      :id="id"
+      :individual-panel="individualPanel"
     >
       <!-- 多选列 -->
       <el-table-column
@@ -121,149 +123,158 @@ export default {
   name: "DilTable",
   extends: table,
   props: {
-    shiyHeigth:{
-      default:null,
+    shiyHeigth: {
+      default: null
     },
-    isHeigth:{
-      default:false,
+    isHeigth: {
+      default: false
     },
-    drawer:{
-      default:false,
+    drawer: {
+      default: false
     },
     //判断是否带分页查询
-    isKuang:{
-      default:false,
+    isKuang: {
+      default: false
     },
     // 请求地址
     requestUrl: {
-      default: "",
+      default: ""
     },
     // 请求参数 请求体中的参数
     requestQuery: {
       default() {
         return {};
-      },
+      }
     },
     // 表头数据
     columnData: {
       default() {
         return [];
-      },
+      }
     },
     // 是否显示序号
     showIndex: {
-      default: true,
+      default: true
+    },
+    isClear: {
+      default: null
     },
     // 是否显示选择框
     // radio : 显示单选框
     // select : 显示多选框
     selectionType: {
-      default: "",
+      default: ""
     },
     // 是否在数据翻页后保留之前选中的数据(需指定 row-key)
     reserveSelection: {
-      default: true,
+      default: true
     },
     // 是否为斑马纹 table
     stripe: {
-      default: true,
+      default: true
     },
     // Table 的高度,默认为自动高度。
     // 如果 height 为 number 类型,单位 px;
     // 如果 height 为 string 类型,则这个高度会设置为 Table 的 style.height 的值,Table 的高度会受控于外部样式。
-    height: {
-      default: null,
-    },
     // Table 的最大高度。合法的值为数字或者单位为 px 的高度。
     //sdada
     maxHeight: {
-      default: null,
+      default: null
     },
     // 是否启用排序
     sortable: {
-      default: "custom",
+      default: "custom"
     },
     // 对齐方式 left/center/right
     align: {
-      default: "center",
+      default: "center"
     },
     // 是否带有纵向边框
     border: {
-      default: true,
+      default: true
     },
     // 是否要高亮当前行
     highlightCurrentRow: {
-      default: false,
+      default: false
     },
     // 当内容过长被隐藏时显示 tooltip
     showOverflowTooltip: {
-      default: true,
+      default: true
     },
     // 行的 className 的回调方法,也可以使用字符串为所有行设置一个固定的 className。
     rowClassName: {
       default() {
         return ({ row, rowIndex }) => "";
-      },
+      }
     },
     // 单元格的 className 的回调方法,也可以使用字符串为所有单元格设置一个固定的 className。
     cellClassName: {
       default() {
         return ({ row, rowIndex }) => "";
-      },
+      }
     },
-    loading:{
-      default:false,
+    loading: {
+      default: false
     },
     // 是否启用分页器
     isPagination: {
-      default: true,
+      default: true
     },
     // 当前页数,支持 .sync 修饰符
     currentPage: {
-      default: 1,
+      default: 1
     },
     // 每页显示个数选择器的选项设置
     pageSizes: {
       default() {
-        return [10, 20, 50, 100, 200, 1000];
-      },
+        return [5, 10, 20, 50, 100, 200, 1000, 50000];
+      }
     },
     // 每页显示条目个数,支持 .sync 修饰符
     pageSize: {
-      default: 10,
+      default: 10
     },
     //组件布局,子组件名用逗号分隔
     layout: {
-      default: "total, prev, pager, next, sizes, jumper",
+      default: "total, prev, pager, next, sizes, jumper"
     },
+    id:String,
+    individualPanel:{
+      type:Boolean,
+      default:false
+    }
   },
-  watch:{
-    requestUrl(){
+  watch: {
+    requestUrl() {
       this.refreshData();
     },
-    drawer(val){
-      if(val){
+    drawer(val) {
+      if (val) {
         this.dataRadioId = null;
       }
-    },
-    // dataTabel: function() {
-    //   this.$nextTick(function() {
-    //     this.$refs.mainTable.setCurrentRow(this.dataTabel[0])
-    //   })
-    // }
+    }
+  },
+  data() {
+    return {
+      height: null
+    };
   },
   methods: {
     // 刷新表格数据
     refreshData() {
       this.requestData();
       // 多选表格清空用户的选择
-      this.$refs.mainTable.clearSelection();
+      if (this.isClear != "1") {
+        this.$refs.mainTable.clearSelection();
+      }
+    },
+    rowDbClick(row) {
+      this.$emit("rowDbClick", row);
     },
     toggleRowExpansion(row, expanded) {
       this.$refs.mainTable.toggleRowExpansion(row, expanded);
-    },
-
-  },
+    }
+  }
 };
 </script>
 
@@ -272,14 +283,13 @@ export default {
   .el-pagination {
     display: none;
   }
-  
 }
- /deep/.el-table .success-row {
-    background: #fff !important;
-    color: #f56c6c;
-    height: 44px;
-    line-height: 46px;
-    font-size: 22px;
-    font-weight: 700;
-  }
+/deep/.el-table .success-row {
+  background: #fff !important;
+  color: #f56c6c;
+  height: 44px;
+  line-height: 46px;
+  font-size: 22px;
+  font-weight: 700;
+}
 </style>

+ 20 - 0
src/components/OffFactoryMapShow/index.js

@@ -0,0 +1,20 @@
+import GAODEMap from "./packages/src/GAODEMap.js";
+
+
+const components = [GAODEMap];
+
+const install = function(Vue) {
+  components.forEach(component => {
+    Vue.component(component.name, component);
+  });
+};
+
+if (typeof window !== "undefined" && window.Vue) {
+  install(window.Vue);
+}
+
+export default {
+  version: "0.1.0",
+  install,
+  GAODEMap
+};

+ 360 - 0
src/components/OffFactoryMapShow/packages/src/GAODEMap.js

@@ -0,0 +1,360 @@
+
+import { Loading } from 'element-ui';
+
+export default {
+    props:{
+        //运输订单号
+        orderNumber:'', 
+        //车牌号
+        capacityNumber:'',
+    },
+    data() {
+        return {
+            //地图对象
+            map:{},
+            //加载消息
+            loading : null,
+            //运输详情
+            transportDetails:{
+                //车牌号
+                capacityNumber:'',
+                //规划路线
+                planeRoute:[],
+                //已行驶轨迹
+                routeTraveled:[],
+                //当前位置
+                currentPoint:{
+                    currentPointLat:"",
+                    currentPointLon:""
+                },
+                //起点位置
+                startPoint:{
+                    currentPointLat:"",
+                    currentPointLon:""
+                },
+                //重点位置
+                endPoint:{
+                    currentPointLat:"",
+                    currentPointLon:""
+                },
+                //自定义标记
+                content:[],
+                //异常位置
+                abnormalLocation:[],
+            }
+        };
+    },
+    watch:{
+        //监听车牌号变化
+        orderNumber:{
+            deep: true,
+            handler(val, oldVal) {
+                this.reloadData();
+            }
+        },
+        //进度条速度
+        sliderVal(newVal) {
+            if (!this.isOnSlider) {
+                return false;
+            }
+            this.sliderChange(newVal)
+        },
+    },
+    created(){
+        //加载数据
+        this.reloadData();
+    },
+    mounted: function () {
+                
+    },
+    methods: {
+        //加载中提示
+        startLoading (){
+            this.loading = Loading.service({ lock: true, text: '加载中……', background: 'rgba(0, 0, 0, 0.7)' });
+        },
+        //加载数据
+        reloadData() {
+            let resultData = {
+                orderNumber: this.orderNumber,
+            };
+            this.startLoading(this.orderNumber);
+            this.$axios.post(
+                "api/v1/getway/fullPathVisualization",resultData
+                ).then((res) => {
+                this.loading.close(); 
+                if(res.data.startAndEndRoutes!=null){
+                    this.initMap(res.data);
+                }else{
+                    this.$message('车辆未入网或没有开启定位,不能访问');
+                    this.newMap();
+                }
+            }).catch(error => {
+                    this.loading.close(); 
+                
+                if((error+"").indexOf("500") !== -1){
+                        this.$message('车辆未入网或没有开启定位,不能访问');
+                        this.newMap();
+                }
+            });    
+        },
+        //初始化一个地图
+        initMap1(){
+            lazyAMapApiLoaderInstance.load().then(() => {
+                this.map = new AMap.Map('test-map', {
+                  zooms: [13, 18], // 地图缩放范围
+                  center: new AMap.LngLat(116.397428, 39.90923)
+                })
+                this.initPathSimplifier()
+            })
+            let that = this;
+            let el = document.getElementsByClassName("el-slider__button-wrapper")[0];
+            let el2 = document.getElementsByClassName("el-slider__runway")[0];
+            el2.addEventListener("click", that.sliderChange,false);
+            el.addEventListener("mousedown", that.openSlider,false);
+            // 此处用document是因为,滑动较为随意时,mouseup可能不是作用在el上
+            document.addEventListener("mouseup",that.closeSlider,false);
+        },
+        // 初始化组件实例
+        initPathSimplifier() {
+            let that = this
+            AMapUI.load(['ui/misc/PathSimplifier'], (PathSimplifier) => {
+            if (!PathSimplifier.supportCanvas) {
+                alert('当前环境不支持 Canvas!')
+                return
+            }
+            //创建一个巡航轨迹路线
+            that.pathSimplifierIns = new PathSimplifier({
+                zIndex: 100,//地图层级,
+                map: this.map, //所属的地图实例
+                //巡航路线轨迹列表
+                getPath: (pathData, pathIndex) => {
+                    return pathData.path;
+                },
+                //hover每一个轨迹点,展示内容
+                getHoverTitle: function(pathData, pathIndex, pointIndex) {
+                    if (pointIndex >= 0) {
+                        return pathData.name + ',点:' + pointIndex + '/' + pathData.path.length;
+                    }
+                    return pathData.name + ',点数量' + pathData.path.length;
+                    },
+                    //自定义样式,可设置巡航器样式,巡航轨迹样式,巡航轨迹点击、hover等不同状态下的样式,不设置则用默认样式,详情请参考api文档 renderOptions:{}
+                    //绘制路线节点
+                    renderOptions: {
+                    renderAllPointsIfNumberBelow: 100 //绘制路线节点,如不需要可设置为-1
+                }
+            });
+
+            //设置数据
+            that.pathSimplifierIns.setData([{
+                name: '1',
+                path: that.actualList
+            }]);
+            //对第一条线路(即索引 0)创建一个巡航器
+            that.navgtr = that.pathSimplifierIns.createPathNavigator(0, {
+                loop: false, //循环播放
+                speed: that.navgtrSpeed //巡航速度,单位千米/小时
+            });
+
+            that.navgtr.on("start resume", function() {
+                that.navgtr._startTime = Date.now();
+                that.navgtr._startDist = this.getMovedDistance();
+            });
+            that.navgtr.on("stop pause", function() {
+                that.navgtr._movedTime = Date.now() - that.navgtr._startTime;
+                that.navgtr._movedDist = this.getMovedDistance() - that.navgtr._startDist;
+            });
+            that.navgtr.on("move", function(data,position) {
+                let idx = position.dataItem.pointIndex //走到了第几个点
+                let tail = position.tail //至下一个节点的比例位置
+                let totalIdx = idx + tail
+                let len = position.dataItem.pathData.path.length
+
+                // 计算下一个距离速度
+                if (idx < len - 1) {
+                that.navgtr.setSpeed(that.navgtrSpeed * that.times);
+                }
+                // 进度条实时展示tail
+                !that.isOnSlider && (that.sliderVal = (totalIdx / len) * 100);
+                // 如果到头了,回到初始状态
+                if (that.navgtr.isCursorAtPathEnd()) {
+                that.playIcon = "start";
+                that.isPlay = false;
+                that.sliderVal = 0;
+                that.passedTime = that.totalTime;
+                }
+            });
+            })
+        },
+        //控制车辆跟随进度条移动
+        sliderChange(val){
+            let newVal = typeof(newVal)==='number' ? val : this.sliderVal
+            let num = parseInt((newVal / 100) * this.actualList.length);
+            let decimal = String((newVal / 100) * this.actualList.length).split('.')[1]||0
+            this.navgtr.moveToPoint(num, Number('0.'+decimal));
+            this.pathSimplifierIns.renderLater();
+        },
+         //创建一个地图
+        newMap(){
+            var currentPointLat='32.483276';//默认的中心点的纬度
+            var currentPointLon='114.03629';//默认的中心点的经度
+            this.map = new AMap.Map('container', {
+                zoom:11,//级别
+                center: [currentPointLon,currentPointLat],//中心点坐标
+                viewMode:'3D'//使用3D视图
+            });
+            //自定义的标记点
+            var content = [
+                    "<div  style='top:1px;width: 180px; background-color: rgba(0, 0, 0, 1);' ><b>"+this.capacityNumber+")</b>",
+                    "<div style='background-color:rgba(255, 255, 255, 0.5);'>提示 :"+'GPS没有开启'+"</div></div>"
+            ];
+            // 创建 infoWindow 实例	
+            var infoWindow = new AMap.InfoWindow({
+                content: content.join("<br>")  //传入 dom 对象,或者 html 字符串
+            });
+            // 打开信息窗体
+            infoWindow.open(this.map,[currentPointLon,currentPointLat]);
+        },
+        initMap(data) {
+            var currentPointLat='32.483276';
+            var currentPointLon='114.03629';
+            var polyline=[];
+            //初始化地图
+            if (data.startAndEndRoutes[0].currentPoint!=null){
+                currentPointLat=data.startAndEndRoutes[0].currentPoint.lat;
+                currentPointLon=data.startAndEndRoutes[0].currentPoint.lon;
+            }
+            this.map = new AMap.Map('container', {
+                zoom:11,//级别
+                center: [currentPointLon,currentPointLat],//中心点坐标
+                viewMode:'3D'//使用3D视图
+            });
+            var limeList= [];
+            data.startAndEndRoutes.forEach((element,index) => {
+                var startPaths=[];
+                element.runRoute.forEach((element,index) => {
+                    var path= [element.lon,element.lat];
+                    startPaths.push(path);
+                });
+                var endPaths=[];
+                if(element.estimateRoute!=null){
+                    element.estimateRoute.forEach((element,index) => {
+                        var path= [element.lon,element.lat]
+                        endPaths.push(path);
+                    });
+                }
+                if (element.startPoint!=null){
+                    //当前点图标标记点
+                    let startPointicon = new AMap.Icon({
+                        size: new AMap.Size(25, 35), // 图标尺寸
+                        image: require('@/assets/img/start.png'), // Icon的图像
+                        imageOffset: new AMap.Pixel(0,0), // 图像相对展示区域的偏移量,适于雪碧图等
+                        imageSize: new AMap.Size(25, 35) // 根据所设置的大小拉伸或压缩图片
+                    });
+                    // 创建一个 Marker 实例:
+                    var startPointmarker = new AMap.Marker({
+                        position: new AMap.LngLat(element.startPoint.lon, element.startPoint.lat),   // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
+                            icon: startPointicon, 
+                        title: '北京'
+                    });
+                    // 将创建的点标记添加到已有的地图实例:
+                    this.map.add(startPointmarker);
+                }
+                //终点
+                if (element.endPoint!=null){
+                    //当前点图标标记点
+                    let endPointicon = new AMap.Icon({
+                        size: new AMap.Size(25, 35), // 图标尺寸
+                        image: require('@/assets/img/end.png'), // Icon的图像
+                        imageOffset: new AMap.Pixel(0,0), // 图像相对展示区域的偏移量,适于雪碧图等
+                        imageSize: new AMap.Size(25, 35) // 根据所设置的大小拉伸或压缩图片
+                    });
+                    // 创建一个 Marker 实例:
+                    var endPointmarker = new AMap.Marker({
+                        position: new AMap.LngLat(element.endPoint.lon, element.endPoint.lat),   // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
+                        icon: endPointicon, 
+                        title: '北京'
+                    });
+
+                    // 将创建的点标记添加到已有的地图实例:
+                    this.map.add(endPointmarker);
+                }
+                //已行驶轨迹
+                if(startPaths.length>0){
+                    var startLine = new AMap.Polyline({
+                        map:this.map,
+                        path: startPaths,
+                        isOutline: true,
+                        outlineColor: '#00FF00',
+                        borderWeight: 0,
+                        strokeColor: "#00FF00", 
+                        strokeOpacity: 1,
+                        strokeWeight: 5,
+                        // 折线样式还支持 'dashed'
+                        strokeStyle: "solid",
+                        // strokeStyle是dashed时有效
+                        strokeDasharray: [10, 5],
+                        lineJoin: 'round',
+                        lineCap: 'round',
+                        zIndex: 50,
+                    })
+                    limeList.push(startLine);
+                }
+
+            if(endPaths.length>0){
+                //预计轨迹
+                var endLine = new AMap.Polyline({
+                    map:this.map,
+                    path: endPaths,
+                    isOutline: true,
+                    outlineColor: '#FF0000',
+                    borderWeight: 0,
+                    strokeColor: "#FF0000", 
+                    strokeOpacity: 1,
+                    strokeWeight: 5,
+                    // 折线样式还支持 'dashed'
+                    strokeStyle: "solid",
+                    // strokeStyle是dashed时有效
+                    strokeDasharray: [10, 5],
+                    lineJoin: 'round',
+                    lineCap: 'round',
+                    zIndex: 50,
+                })
+                limeList.push(endLine);
+            }
+                
+            });
+            var content = [
+                    "<div  style='top:1px;width: 180px; background-color: rgba(0, 0, 0, 1);' ><font color='white'>"+this.capacityNumber+'('+data.startAndEndRoutes[0].miled+")</font>",
+                    "<div style='background-color:rgba(255, 255, 255, 0.5);'><font color='white'>地址 :"+data.startAndEndRoutes[0].currentPointName+"</font></div></div>"
+            
+            ];
+            data.startAndEndRoutes.forEach((element,index) => {
+                // 创建 infoWindow 实例	
+                var infoWindow = new AMap.InfoWindow({
+                content: content.join("<br>")  //传入 dom 对象,或者 html 字符串
+                });
+
+                //当前点图标标记点
+                let currentPointicon = new AMap.Icon({
+                    size: new AMap.Size(40, 40), // 图标尺寸
+                    image: require('@/assets/img/car1.png'), // Icon的图像
+                    imageOffset: new AMap.Pixel(0,0), // 图像相对展示区域的偏移量,适于雪碧图等
+                    imageSize: new AMap.Size(40, 40) // 根据所设置的大小拉伸或压缩图片
+                });
+
+                // 创建一个 Marker 实例:
+                var currentPointmarker = new AMap.Marker({
+                    position: new AMap.LngLat(element.runRoute[element.runRoute.length-1].lon,element.runRoute[element.runRoute.length-1].lat),   // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
+                        icon: currentPointicon, 
+                    title: '北京'
+                });
+                // 将创建的点标记添加到已有的地图实例:
+                this.map.add(currentPointmarker);
+                    // 打开信息窗体
+                    infoWindow.open(this.map,[element.runRoute[element.runRoute.length-1].lon,element.runRoute[element.runRoute.length-1].lat]);
+            });
+            
+            this.map.setFitView([ limeList ])
+        }
+    }
+};

+ 144 - 0
src/components/OffFactoryMapShow/packages/src/GAODEMap.vue

@@ -0,0 +1,144 @@
+<template>
+    <div id="demo">
+        <el-main id="container" style="position:relative;"></el-main>
+        <!--控制条-->
+        <div class="map-control" v-show="isActual">
+            <!--播放暂停按钮-->
+            <Icon
+                v-if="!isPlay"
+                class="play-icon"
+                type="ios-play"
+                @click="isPlay=true;navgControl('start')"
+            />
+            <Icon v-else class="play-icon" type="ios-pause" @click="isPlay=false;navgControl('pause')"/>
+            <!--已播放时间-->
+            <span class="passed-time">{{passedTime}}</span>
+            <!--进度条-->
+            <el-slider v-model="sliderVal" :format-tooltip="hideFormat" :step="0.0001"></el-slider>
+            <!--倍速-->
+            <div class="map-times" @mouseenter="isTimesChoose=true" @mouseleave="isTimesChoose=false">
+                <div class="times-show">倍速 {{times}}</div>
+                <div class="choose-box">
+                <ul v-show="isTimesChoose">
+                    <li v-for="item in speedList" :key="item.value" :class="{active:times==item.value}" @click="changeSpeed(item.value)">{{item.label}}</li>
+                </ul>
+            </div>
+        </div>
+        <!--结束时间-->
+        <span class="passed-time">{{totalTime}}</span>
+        </div>
+    </div>
+</template>
+
+<script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.15&key=eed46ea40bbcadbf8a9cdd5dc1a94642"></script>
+<script>
+import GAODEMap from "./GAODEMap.js";
+export default {
+  name: "GAODEMap",
+  extends: GAODEMap,
+  data() {
+        return {
+            //地图展示中心点
+            centerPoint:{
+                pointLat:"",
+                pointLon:""
+            },
+        };
+    },
+}
+</script>
+<style>
+
+#container {
+	width: 100%;
+	height: 100%;
+	overflow: hidden;
+	margin: 0;
+	font-family: "微软雅黑";
+}
+.info_card {
+    display: inline-block;margin: 50px auto;position: absolute;width: 200px;height:150px;background-color: #c7c9c8AA;border: 5px solid #ffffff;color: #000000;
+}
+.info_card .title{
+    width: 100%;
+    height:40px;
+    background-color: #000000AA;
+    color: #ffffff;
+}
+
+.title span.title_name{
+    position: relative;
+    top: 7px;
+    left: 10px;
+    font-size: 18px;
+}
+
+
+.info_card .title .close_img{
+    position: absolute;
+    top:10px;
+    right: 10px;
+    width: 20px;
+    height: 20px;
+    background-color: #ffffff;
+}
+.info_card .title .close_img .min {
+    width: 0;
+    height: 0;
+    font-size:0;
+    overflow:hidden;
+    position:absolute;
+    border-width:10px;
+}
+
+.info_card .title .close_img .top_img {
+    border-style:solid dashed dashed;
+    border-color:#000000 transparent transparent transparent;
+    top:-2px;
+}
+
+.info_card .title .close_img .right_img {
+    border-style:solid dashed dashed;
+    border-color:transparent #000000 transparent transparent;
+    left:2px;
+}
+
+.info_card .title .close_img .bottom_img{
+    border-style:solid dashed dashed;
+    border-color:transparent transparent #000000 transparent;
+    top:2px;
+}
+
+.info_card .title .close_img .left_img{
+    border-style:solid dashed dashed;
+    border-color:transparent transparent transparent #000000;
+    left:-2px;
+}
+
+.info_card span.cancle{
+    width:0;
+    height:0;
+    font-size:0;
+    overflow:hidden;
+    position:absolute;
+}
+
+.info_card span.bot{
+    border-width:20px;
+    border-style:solid dashed dashed;
+    border-color:#ffffff transparent transparent;
+    left:80px;
+    bottom:-40px;
+}
+.info_card span.top{
+    border-width:20px;
+    border-style:solid dashed dashed;
+    border-color:#c7c9c8AA transparent transparent;
+    left:80px;
+    bottom:-33px;
+}
+.info_card .content{
+    margin-top: 10px;
+    margin-left: 10px;
+}
+</style>

+ 214 - 0
src/components/OffFactoryMapShow/packages/src/README.md

@@ -0,0 +1,214 @@
+## 通用表格使用说明
+### 属性说明
+
+
+
+#### requestUrl : string
+
+表格请求的地址
+
+示例:
+
+``` js
+//全地址
+requestUrl:http://192.168.10.113:8081/api/v1/truck/type/status2;
+//后半截地址
+requestUrl:/api/v1/truck/type/status2;
+```
+
+
+
+#### requestQuery : object
+
+表格请求的参数:用于自己触发筛选和排序时使用
+
+可传入参数
+
+
+
+
+
+#### current-page : number
+
+当前页数,支持 .sync 修饰符
+
+默认是第一页
+
+
+
+#### page-size : number
+
+每页显示条目个数,支持 .sync 修饰符
+
+默认是 每页十条
+
+
+
+#### page-sizes : number[]
+
+每页显示个数选择器的选项设置
+
+默认是 [1,2,5,10]
+
+
+
+#### type : string
+
+表格类型:目前支持:base , common
+
+之后会根据需求增加更多的类型
+
+
+
+#### lastColumnData : array[object]
+
+表格最右边列的数据信息,数组中是放一个对象,对象中的属性如下,
+
+基本和Table-column Attributes的相同,
+
+``` js
+lastColumnData:[{
+    // 表头显示的文案
+    label: "操作",
+    // 设置列的宽度
+    width: 100,
+    // 固定操作列
+    fixed: 'right',
+    // 注意!!!
+    // 操作列按钮点击触发的操作改为 $emit 抛事件的形式
+    // 默认可以获取 scope 属性;里面的具体内容和el-table一样
+    template: `
+		<el-button type="text" size="mini" @click="$emit('transportProgress',scope.row)" > 
+			运输进度 
+		</el-button>
+	`,
+}]
+```
+
+
+
+
+
+### 事件说明
+
+#### radio-change(row)
+
+用于当选表格,当用户改变选中行数据时调用,返回选中行的数据对象 **row**
+
+用户再次点击取消选中时,会返回一个**空对象 {}**
+
+
+
+#### selection-change(rows)
+
+用于多选表格,当选择项发生变化时会触发该事件
+
+返回所有被选中的行的数据的数组 rows[]
+
+即使换页,依然保留被选中的数据
+
+
+
+### 方法说明
+
+#### refreshData()
+
+用户主动刷新表格数据
+
+
+
+## 接口相关说明
+
+### 请求参数说明
+
+链接后的参数
+
+``` json
+// 表格头接口的唯一标识
+apiId:13
+// 控制当前显示第几页
+pageNum:1
+// 控制当前每页显示几条
+pageSize:10
+```
+
+请求体的参数
+
+``` json
+// 排序的数据的参数字段
+orderField:""
+// 排序类型 asc : 升序;  desc : 降序;
+orderType:""
+
+// 需要筛选时,键值对的键,是需要筛选的参数的字段名,
+// 键值对的值,是个数组,存放符合条件的字段值,
+// 筛选的字段可以同时存在多条
+[筛选字段名]:[筛选字段值1,筛选字段值2]
+```
+
+
+
+### 回调参数要求
+
+``` json
+{
+    // 状态码 0:标识成功
+    "code": "0",
+    // 后端自定义给前端的数据对象
+    "data": {
+        // 表格的数据源
+        "list": [
+            // 每行表的数据内容
+            {
+                // 每行数据的唯一标识 必设项
+                "ROW_ID":"",
+            }
+        ],
+
+        // 表头的数据内容
+        // 表头按需要的显示顺序排序
+        "columnData": [
+            // 每个表头的相关信息
+            // 这个之后会根据需求不断添加
+            {
+                // 唯一标识 必设项
+                "data_id": "",
+                // 对应列内容的字段名 必设项
+                "prop": "",
+                // 显示的标题 必设项
+                "label": "",
+
+                // 一下为 非必填选项
+                // 自定义列模板
+                // html的字符串
+                // 当有这个属性时,会忽略label属性
+                "template": "",
+
+                // 列的宽度 非必填选项
+                "width": "",
+                // 当前列对应的 筛选功能数组 非必填选项
+                "filters":[
+                    {
+                        // 筛选选项 所对应的后端数值
+                        value:0,
+                        // 筛选选项 的中文名称
+                        text:"",
+                    },
+                ],
+            },
+        ],
+        
+        // 总条目数
+        "total": 0
+    }
+}
+```
+
+
+
+## 相关网站说明
+
+### 配置表头数据地址
+
+https://diluitable.steerinfo.com/#/
+

+ 8 - 10
src/components/Page/Title/index.vue

@@ -1,12 +1,10 @@
 <template>
-  <div
-    class="page-title"
-    :class="{ 'show-border-buttom': showBorderBottom }"
-    @click="onClickBack"
-  >
-    <i class="el-icon-back" v-if="showIcon"></i>
-    <span>{{ title }}</span>
-    <slot></slot>
+  <div class="page-title" :class="{ 'show-border-buttom': showBorderBottom }">
+    <div style="width:30%" @click="onClickBack">
+      <i class="el-icon-back" v-if="showIcon"></i>
+      <span>{{ title }}</span>
+      <slot></slot>
+    </div>
   </div>
 </template>
 
@@ -24,7 +22,7 @@ export default {
     // 是否显示底部分割线
     showBorderBottom: {
       default: true
-    },
+    }
     //跳转的地址,默认-1(返回上一个页面)
     // BackURL:{
     //   type:String,
@@ -45,7 +43,7 @@ export default {
   height: 3.75rem;
   padding-left: 2.5rem;
   color: #0c2278;
-  background:  #f5f5f5;;
+  background: #f5f5f5;
   line-height: 3;
   font-weight: 800;
   font-size: 1.25rem;

+ 39 - 0
src/components/exportAllExcel/exportAllExcel.js

@@ -0,0 +1,39 @@
+/**
+ * 导出页面的所有数据合并为一个Excel
+ */
+// 导出表格为excel格式
+export default{
+  install (Vue, options) {
+    console.log(options)
+    Vue.prototype.exportAllData = function () {
+        var title = this.tableTitle
+        let tHeader = [];
+        let filterVal = [];
+        let refArr = Object.values(this.$refs);
+        var list = [];
+        refArr.forEach((e) => {
+            console.log(e)
+            e.dataColumnData.forEach((e1) => {
+              if(tHeader.indexOf(e1.label) === -1){
+                tHeader.push(e1.label)
+              }
+              if(filterVal.indexOf(e1.prop) === -1){
+                filterVal.push(e1.prop)
+              }
+            })
+            if(filterVal.indexOf(e.dataColumnData.prop) === -1){
+                filterVal.push(e.dataColumnData.prop)
+            }
+            list = list.concat(e.dataTabel)
+        })
+      //导出为excel
+      this.downloadLoading = true
+      require.ensure([], () => {
+      const { export_json_to_excel } = require("@/assets/excel/Export2Excel.js"); //这里必须使用绝对路径,使用@/+存放export2Excel的路径
+      // let list = this.$refs.excelDom.dataTabel;
+      let data = list.map((v) => filterVal.map((j) => v[j]));//3.formatJson格式转换
+      export_json_to_excel(tHeader, data, title); // (title)导出的表格名称
+    });
+    }
+  },
+}

+ 6 - 3
src/components/exportExcel/exportExcel.js

@@ -1,13 +1,16 @@
+/** */
+
 // 导出表格为excel格式
 export default{
   install (Vue, options) {
+    console.log(options)
     Vue.prototype.exportData = function () {
       var title = this.tableTitle
       let tHeader = [];
-        let filterVal = [];
-        this.$refs.excelDom.dataColumnData.filter( (item,i) =>{
+      let filterVal = [];
+      this.$refs.excelDom.dataColumnData.filter( (item,i) =>{
           tHeader.push(item.label);
-              filterVal.push(item.prop);
+          filterVal.push(item.prop);
           } )
       //导出为excel
       this.downloadLoading = true

+ 51 - 32
src/components/exportPdf/exportPdf.js

@@ -1,43 +1,62 @@
 // 导出页面为PDF格式
-import html2Canvas from 'html2canvas'
-import JsPDF from 'jspdf'
-export default{
-  install (Vue, options) {
-    Vue.prototype.getPdf = function () {
-      var title = this.htmlTitle
-      html2Canvas(document.querySelector('#pdfDom'), {
+import html2Canvas from "html2canvas";
+import JsPDF from "jspdf";
+export default {
+  install(Vue, options) {
+    Vue.prototype.getPdf = function() {
+      var title = this.htmlTitle;
+      html2Canvas(document.querySelector("#pdfDom"), {
         allowTaint: true
-      }).then(function (canvas) {
-        var pdf = new JsPDF('p', 'mm', 'a4') // A4纸,纵向
+      }).then(function(canvas) {
+        var pdf = new JsPDF("p", "mm", "a4"); // A4纸,纵向
 
-        var ctx = canvas.getContext('2d')
+        var ctx = canvas.getContext("2d");
 
+        // var a4w = 210;
         var a4w = 210;
-        var a4h = 297 // A4大小,210mm x 297mm,四边不保留边距,显示区域210x297 (四边各保留20mm的边距,显示区域170x257)(pass)
+        var a4h = 297; // A4大小,210mm x 297mm,四边不保留边距,显示区域210x297 (四边各保留20mm的边距,显示区域170x257)(pass)
 
-        var imgHeight = Math.floor(a4h * canvas.width / a4w) // 按A4显示比例换算一页图像的像素高度
+        var imgHeight = Math.floor((a4h * canvas.width) / a4w); // 按A4显示比例换算一页图像的像素高度
 
-        var renderedHeight = 0
+        var renderedHeight = 0;
 
         while (renderedHeight < canvas.height) {
-            var page = document.createElement('canvas')
-
-            page.width = canvas.width
-
-            page.height = Math.min(imgHeight, canvas.height - renderedHeight) // 可能内容不足一页
-
-            // 用getImageData剪裁指定区域,并画到前面建立的canvas对象中
-            page.getContext('2d').putImageData(ctx.getImageData(0, renderedHeight, canvas.width, Math.min(imgHeight, canvas.height - renderedHeight)), 0, 0)
-            pdf.addImage(page.toDataURL('image/jpeg', 1.0), 'JPEG', 0, 0, a4w, Math.min(a4h, a4w * page.height / page.width)) // 添加图像到页面,保留10mm边距
-            renderedHeight += imgHeight
-
-            if (renderedHeight < canvas.height) {
-                pdf.addPage()
-            } // 若是后面还有内容,添加一个空页
-            // delete page;
+          var page = document.createElement("canvas");
+
+          page.width = canvas.width;
+
+          page.height = Math.min(imgHeight, canvas.height - renderedHeight); // 可能内容不足一页
+
+          // 用getImageData剪裁指定区域,并画到前面建立的canvas对象中
+          page
+            .getContext("2d")
+            .putImageData(
+              ctx.getImageData(
+                0,
+                renderedHeight,
+                canvas.width,
+                Math.min(imgHeight, canvas.height - renderedHeight)
+              ),
+              0,
+              0
+            );
+          pdf.addImage(
+            page.toDataURL("image/jpeg", 1.0),
+            "JPEG",
+            0,
+            0,
+            a4w,
+            Math.min(a4h, (a4w * page.height) / page.width)
+          ); // 添加图像到页面,保留10mm边距
+          renderedHeight += imgHeight;
+
+          if (renderedHeight < canvas.height) {
+            pdf.addPage();
+          } // 若是后面还有内容,添加一个空页
+          // delete page;
         }
-        pdf.save(title + '.pdf')
-    })
-    }
+        pdf.save(title + ".pdf");
+      });
+    };
   }
-}
+};

+ 63 - 0
src/components/exportPdfs/exportPdfs.js

@@ -0,0 +1,63 @@
+// 导出页面为PDF格式
+import html2Canvas from "html2canvas";
+import JsPDF from "jspdf";
+export default {
+  install(Vue, options) {
+    Vue.prototype.getPdfs = function() {
+      var title = this.htmlTitle;
+      console.log(document.querySelector("#pdfDom"));
+      html2Canvas(document.querySelector("#pdfDom"), {
+        allowTaint: false,
+        // useCORS: true,
+        windowWidth: 1695,
+        width: 1695
+      }).then(function(canvas) {
+        var pdf = new JsPDF("l", "mm", "a4"); // A4纸,横向
+        var ctx = canvas.getContext("2d");
+        var a4w = 300;
+        var a4h = 297; // A4大小,210mm x 297mm,四边不保留边距,显示区域210x297 (四边各保留20mm的边距,显示区域170x257)(pass)
+
+        var imgHeight = Math.floor((a4h * canvas.width) / a4w); // 按A4显示比例换算一页图像的像素高度
+
+        var renderedHeight = 0;
+
+        while (renderedHeight < canvas.height) {
+          var page = document.createElement("canvas");
+
+          page.width = canvas.width;
+
+          page.height = Math.min(imgHeight, canvas.height - renderedHeight); // 可能内容不足一页
+
+          // 用getImageData剪裁指定区域,并画到前面建立的canvas对象中
+          page
+            .getContext("2d")
+            .putImageData(
+              ctx.getImageData(
+                0,
+                renderedHeight,
+                canvas.width,
+                Math.min(imgHeight, canvas.height - renderedHeight)
+              ),
+              0,
+              0
+            );
+          pdf.addImage(
+            page.toDataURL("image/jpeg", 1.0),
+            "JPEG",
+            0,
+            0,
+            a4w,
+            Math.min(a4h, (a4w * page.height) / page.width)
+          ); // 添加图像到页面,保留10mm边距
+          renderedHeight += imgHeight;
+
+          if (renderedHeight < canvas.height) {
+            pdf.addPage();
+          } // 若是后面还有内容,添加一个空页
+          // delete page;
+        }
+        pdf.save(title + ".pdf");
+      });
+    };
+  }
+};

+ 0 - 2
src/config/include.js

@@ -1,5 +1,4 @@
 /* eslint-disable */
-
 /**************************************************************** 通用引入,包含element-ui等 ***********************************************************************************/
 import Vue from 'vue';
 import ElementUI from 'element-ui';
@@ -30,7 +29,6 @@ Vue.use(VueClipboard)
 
 // use element-ui 2.4.2
 Vue.use(ElementUI);
-
 Vue.use(icorePlugin);
 
 /**************************************************************** 引入项目公用样式 简直覆盖Element-ui css ***********************************************************************/

+ 0 - 8
src/lib/el-table/index.js

@@ -1,8 +0,0 @@
-import ElTable from './src/table';
-
-/* istanbul ignore next */
-ElTable.install = function(Vue) {
-  Vue.component(ElTable.name, ElTable);
-};
-
-export default ElTable;

+ 0 - 28
src/lib/el-table/src/dropdown.js

@@ -1,28 +0,0 @@
-import Vue from 'vue';
-var dropdowns = [];
-
-!Vue.prototype.$isServer && document.addEventListener('click', function(event) {
-  dropdowns.forEach(function(dropdown) {
-    var target = event.target;
-    if (!dropdown || !dropdown.$el) return;
-    if (target === dropdown.$el || dropdown.$el.contains(target)) {
-      return;
-    }
-    dropdown.handleOutsideClick && dropdown.handleOutsideClick(event);
-  });
-});
-
-export default {
-  open(instance) {
-    if (instance) {
-      dropdowns.push(instance);
-    }
-  },
-
-  close(instance) {
-    var index = dropdowns.indexOf(instance);
-    if (index !== -1) {
-      dropdowns.splice(instance, 1);
-    }
-  }
-};

+ 0 - 259
src/lib/el-table/src/filter-panel.vue

@@ -1,259 +0,0 @@
-<template>
-  <transition name="el-zoom-in-top">
-    <div
-      class="el-table-filter"
-      v-if="multiple"
-      v-clickoutside="handleOutsideClick"
-      v-show="showPopper">
-      <div class="el-table-filter__content">
-        <el-input v-if="column.filters && column.filters.length > 5"
-          placeholder="请输入内容"
-          prefix-icon="el-icon-search"
-          @keyup.native="searchFilterEvent"
-          v-model="searchFilter">
-        </el-input>
-        <el-scrollbar wrap-class="el-table-filter__wrap">
-          <el-checkbox-group class="el-table-filter__checkbox-group" @change="handleCheckedChange" v-model="filteredValue">
-            <el-checkbox :id="'sb' + index"
-              v-for="(filter, index) in filtersBak"
-              :key="filter.value"
-              :label="filter.value">{{ filter.text }}</el-checkbox>
-          </el-checkbox-group>
-        </el-scrollbar>
-      </div>
-      <div class="el-table-filter__bottom">
-        <el-checkbox :indeterminate="isIndeterminate"  v-model="checkAll" @change="checkedAllChange">全选</el-checkbox>
-        <button @click="handleConfirm"
-          :class="{ 'is-disabled': filteredValue.length === 0 }"
-          :disabled="filteredValue.length === 0">{{ t('el.table.confirmFilter') }}</button>
-        <button @click="handleReset">{{ t('el.table.resetFilter') }}</button>
-      </div>
-    </div>
-    <div
-      class="el-table-filter"
-      v-else
-      v-clickoutside="handleOutsideClick"
-      v-show="showPopper">
-      <ul class="el-table-filter__list">
-        <li class="el-table-filter__list-item"
-            :class="{ 'is-active': filterValue === undefined || filterValue === null }"
-            @click="handleSelect(null)">{{ t('el.table.clearFilter') }}</li>
-        <li class="el-table-filter__list-item"
-            v-for="filter in filtersBak"
-            :label="filter.value"
-            :key="filter.value"
-            :class="{ 'is-active': isActive(filter) }"
-            @click="handleSelect(filter.value)" >{{ filter.text }}</li>
-      </ul>
-    </div>
-  </transition>
-</template>
-
-<script type="text/babel">
-  import Popper from 'element-ui/src/utils/vue-popper';
-  import { PopupManager } from 'element-ui/src/utils/popup';
-  import Locale from 'element-ui/src/mixins/locale';
-  import Clickoutside from 'element-ui/src/utils/clickoutside';
-  import Dropdown from './dropdown';
-  import ElCheckbox from 'element-ui/packages/checkbox';
-  import ElCheckboxGroup from 'element-ui/packages/checkbox-group';
-
-  export default {
-    name: 'ElTableFilterPanel',
-
-    mixins: [Popper, Locale],
-
-    directives: {
-      Clickoutside
-    },
-
-    components: {
-      ElCheckbox,
-      ElCheckboxGroup
-    },
-
-    props: {
-      placement: {
-        type: String,
-        default: 'bottom-end'
-      }
-    },
-
-    customRender(h) {
-      return (<div class="el-table-filter">
-        <div class="el-table-filter__content">
-        </div>
-        <div class="el-table-filter__bottom">
-          <button on-click={ this.handleConfirm }>{ this.t('el.table.confirmFilter') }</button>
-          <button on-click={ this.handleReset }>{ this.t('el.table.resetFilter') }</button>
-        </div>
-      </div>);
-    },
-
-    methods: {
-      searchFilterEvent() {
-        let that = this;
-        if (that.searchFilter !== '') {
-          var temp = that.filters.filter(function(val) {
-            return (val.value + '').indexOf(that.searchFilter + '') > -1;
-          });
-          that.filtersBak = temp;
-        } else {
-          that.filtersBak = that.filters;
-        }
-        that.handleCheckedChange(that.filteredValue);
-      },
-      handleCheckedChange(value) {
-        let checkedCount = value.length;
-        this.checkAll = checkedCount === this.filtersBak.length;
-        this.isIndeterminate = checkedCount > 0 && checkedCount < this.filtersBak.length;
-      },
-      checkedAllChange(val) {
-        let that = this;
-        if (val) {
-          var temp = [];
-          for (let i = 0; i < that.filtersBak.length; i++) {
-            temp.push(that.filtersBak[i].value);
-          }
-          temp.unshift('');
-          that.filteredValue = temp;
-        } else {
-          that.filteredValue = [];
-        }
-        that.isIndeterminate = false;
-      },
-      isActive(filter) {
-        return filter.value === this.filterValue;
-      },
-
-      handleOutsideClick() {
-        setTimeout(() => {
-          this.showPopper = false;
-        }, 16);
-      },
-
-      handleConfirm() {
-        this.confirmFilter(this.filteredValue);
-        this.handleOutsideClick();
-        this.searchFilter = '';
-        this.searchFilterEvent();
-      },
-
-      handleReset() {
-        this.filteredValue = [];
-        this.confirmFilter(this.filteredValue);
-        this.handleOutsideClick();
-        this.isIndeterminate = false;
-        this.checkAll = false;  
-        this.searchFilter = '';
-      },
-
-      handleSelect(filterValue) {
-        this.filterValue = filterValue;
-
-        if ((typeof filterValue !== 'undefined') && (filterValue !== null)) {
-          this.confirmFilter(this.filteredValue);
-        } else {
-          this.confirmFilter([]);
-        }
-
-        this.handleOutsideClick();
-      },
-
-      confirmFilter(filteredValue) {
-        this.table.store.commit('filterChange', {
-          column: this.column,
-          values: filteredValue
-        });
-        this.table.store.updateAllSelected();
-      }
-    },
-
-    data() {
-      return {
-        table: null,
-        cell: null,
-        column: null,
-        isIndeterminate: false,
-        checkAll: false,
-        searchFilter: '',
-        filtersBak: []
-      };
-    },
-
-    computed: {
-      filters: {
-        get() {
-					return this.column && this.column.filters;
-        },
-        set() {
-          this.filtersBak = this.column && this.column.filters;
-        }
-      },
-
-      filterValue: {
-        get() {
-          return (this.column.filteredValue || [])[0];
-        },
-        set(value) {
-          if (this.filteredValue) {
-            if ((typeof value !== 'undefined') && (value !== null)) {
-              this.filteredValue.splice(0, 1, value);
-            } else {
-              this.filteredValue.splice(0, 1);
-            }
-          }
-        }
-      },
-
-      filteredValue: {
-        get() {
-          if (this.column) {
-            return this.column.filteredValue || [];
-          }
-          return [];
-        },
-        set(value) {
-          if (this.column) {
-            this.column.filteredValue = value;
-          }
-        }
-      },
-
-      multiple() {
-        if (this.column) {
-          return this.column.filterMultiple;
-        }
-        return true;
-      }
-    },
-
-    mounted() {
-      this.popperElm = this.$el;
-      this.referenceElm = this.cell;  
-      this.table.bodyWrapper.addEventListener('scroll', () => {
-        this.updatePopper();
-      });
-
-      this.$watch('showPopper', (value) => {
-        if (this.column) this.column.filterOpened = value;
-        if (value) {
-          Dropdown.open(this);
-          this.filters = this.column && this.column.filters;
-          let checkedCount = this.filteredValue.length;
-          this.checkAll = checkedCount === this.filtersBak.length;
-          this.isIndeterminate = checkedCount > 0 && checkedCount < this.filtersBak.length;
-        } else {
-          Dropdown.close(this);
-        }
-      });
-    },
-    watch: {
-      showPopper(val) {
-        if (val === true && parseInt(this.popperJS._popper.style.zIndex, 10) < PopupManager.zIndex) {
-          this.popperJS._popper.style.zIndex = PopupManager.nextZIndex();
-        }
-      }
-    }
-  };
-</script>

+ 0 - 68
src/lib/el-table/src/layout-observer.js

@@ -1,68 +0,0 @@
-export default {
-  created() {
-    this.tableLayout.addObserver(this);
-  },
-
-  destroyed() {
-    this.tableLayout.removeObserver(this);
-  },
-
-  computed: {
-    tableLayout() {
-      let layout = this.layout;
-      if (!layout && this.table) {
-        layout = this.table.layout;
-      }
-      if (!layout) {
-        throw new Error('Can not find table layout.');
-      }
-      return layout;
-    }
-  },
-
-  mounted() {
-    this.onColumnsChange(this.tableLayout);
-    this.onScrollableChange(this.tableLayout);
-  },
-
-  updated() {
-    if (this.__updated__) return;
-    this.onColumnsChange(this.tableLayout);
-    this.onScrollableChange(this.tableLayout);
-    this.__updated__ = true;
-  },
-
-  methods: {
-    onColumnsChange() {
-      const cols = this.$el.querySelectorAll('colgroup > col');
-      if (!cols.length) return;
-      const flattenColumns = this.tableLayout.getFlattenColumns();
-      const columnsMap = {};
-      flattenColumns.forEach((column) => {
-        columnsMap[column.id] = column;
-      });
-      for (let i = 0, j = cols.length; i < j; i++) {
-        const col = cols[i];
-        const name = col.getAttribute('name');
-        const column = columnsMap[name];
-        if (column) {
-          col.setAttribute('width', column.realWidth || column.width);
-        }
-      }
-    },
-
-    onScrollableChange(layout) {
-      const cols = this.$el.querySelectorAll('colgroup > col[name=gutter]');
-      for (let i = 0, j = cols.length; i < j; i++) {
-        const col = cols[i];
-        col.setAttribute('width', layout.scrollY ? layout.gutterWidth : '0');
-      }
-      const ths = this.$el.querySelectorAll('th.gutter');
-      for (let i = 0, j = ths.length; i < j; i++) {
-        const th = ths[i];
-        th.style.width = layout.scrollY ? layout.gutterWidth + 'px' : '0';
-        th.style.display = layout.scrollY ? '' : 'none';
-      }
-    }
-  }
-};

+ 0 - 478
src/lib/el-table/src/table-body.js

@@ -1,478 +0,0 @@
-import { getCell, getColumnByCell, getRowIdentity } from './util';
-import { getStyle, hasClass, addClass, removeClass } from 'element-ui/src/utils/dom';
-// import ElCheckbox from 'element-ui/packages/checkbox';
-// import ElTooltip from 'element-ui/packages/tooltip';
-import debounce from 'throttle-debounce/debounce';
-import LayoutObserver from './layout-observer';
-
-export default {
-  name: 'ElTableBody',
-
-  mixins: [LayoutObserver],
-
-  components: {
-    // ElCheckbox,
-    // ElTooltip
-  },
-
-  props: {
-    store: {
-      required: true
-    },
-    stripe: Boolean,
-    context: {},
-    rowClassName: [String, Function],
-    rowStyle: [Object, Function],
-    fixed: String,
-    highlight: Boolean,
-    dragRow:[String,Boolean]
-  },
-
-  render(h) {
-    const columnsHidden = this.columns.map((column, index) => this.isColumnHidden(index));
-    return (
-      <table
-        class="el-table__body"
-        cellspacing="0"
-        cellpadding="0"
-        border="0">
-        <colgroup>
-          {
-            this._l(this.columns, column => <col name={ column.id } />)
-          }
-        </colgroup>
-        <tbody>
-          {
-            this._l(this.data, (row, $index) =>
-              [<tr
-                draggable = {this.dragRow ? true : false}
-                on-drop={ ($event) => this.dropRowSet($event,$index)}
-                on-dragstart={ ($event) => this.dropRowStart($event,$index) }
-                on-dragover={ ($event) => this.dropRowOver($event) }
-                style={ this.rowStyle ? this.getRowStyle(row, $index) : null }
-                key={ this.table.rowKey ? this.getKeyOfRow(row, $index) : $index }
-                on-dblclick={ ($event) => this.handleDoubleClick($event, row) }
-                on-click={ ($event) => this.handleClick($event, row) }
-                on-contextmenu={ ($event) => this.handleContextMenu($event, row) }
-                on-mouseenter={ _ => this.handleMouseEnter($index) }
-                on-mouseleave={ _ => this.handleMouseLeave() }
-                class={ [this.getRowClass(row, $index)] }>
-                {
-                  this._l(this.columns, (column, cellIndex) => {
-                    const { rowspan, colspan } = this.getSpan(row, column, $index, cellIndex);
-                    if (!rowspan || !colspan) {
-                      return '';
-                    } else {
-                      if (rowspan === 1 && colspan === 1) {
-                        return (
-                          <td
-                            style={ this.getCellStyle($index, cellIndex, row, column) }
-                            class={ this.getCellClass($index, cellIndex, row, column) }
-                            on-mouseenter={ ($event) => this.handleCellMouseEnter($event, row) }
-                            on-mouseleave={ this.handleCellMouseLeave }>
-                            {
-                              column.renderCell.call(
-                                this._renderProxy,
-                                h,
-                                {
-                                  row,
-                                  column,
-                                  $index,
-                                  store: this.store,
-                                  _self: this.context || this.table.$vnode.context
-                                },
-                                columnsHidden[cellIndex]
-                              )
-                            }
-                          </td>
-                        );
-                      } else {
-                        return (
-                          <td
-                            style={ this.getCellStyle($index, cellIndex, row, column) }
-                            class={ this.getCellClass($index, cellIndex, row, column) }
-                            rowspan={ rowspan }
-                            colspan={ colspan }
-                            on-mouseenter={ ($event) => this.handleCellMouseEnter($event, row) }
-                            on-mouseleave={ this.handleCellMouseLeave }>
-                            {
-                              column.renderCell.call(
-                                this._renderProxy,
-                                h,
-                                {
-                                  row,
-                                  column,
-                                  $index,
-                                  store: this.store,
-                                  _self: this.context || this.table.$vnode.context
-                                },
-                                columnsHidden[cellIndex]
-                              )
-                            }
-                          </td>
-                        );
-                      }
-                    }
-                  })
-                }
-              </tr>,
-              this.store.isRowExpanded(row)
-                ? (<tr>
-                  <td colspan={ this.columns.length } class="el-table__expanded-cell">
-                    { this.table.renderExpanded ? this.table.renderExpanded(h, { row, $index, store: this.store }) : ''}
-                  </td>
-                </tr>)
-                : ''
-              ]
-            ).concat(
-              <el-tooltip effect={ this.table.tooltipEffect } placement="top" ref="tooltip" content={ this.tooltipContent }></el-tooltip>
-            )
-          }
-        </tbody>
-      </table>
-    );
-  },
-
-  watch: {
-    'store.states.hoverRow'(newVal, oldVal) {
-      if (!this.store.states.isComplex) return;
-      const el = this.$el;
-      if (!el) return;
-      const tr = el.querySelector('tbody').children;
-      const rows = [].filter.call(tr, row => hasClass(row, 'el-table__row'));
-      const oldRow = rows[oldVal];
-      const newRow = rows[newVal];
-      if (oldRow) {
-        removeClass(oldRow, 'hover-row');
-      }
-      if (newRow) {
-        addClass(newRow, 'hover-row');
-      }
-    },
-    'store.states.currentRow'(newVal, oldVal) {
-      if (!this.highlight) return;
-      const el = this.$el;
-      if (!el) return;
-      const data = this.store.states.data;
-      const tr = el.querySelector('tbody').children;
-      const rows = [].filter.call(tr, row => hasClass(row, 'el-table__row'));
-      const oldRow = rows[data.indexOf(oldVal)];
-      const newRow = rows[data.indexOf(newVal)];
-      if (oldRow) {
-        removeClass(oldRow, 'current-row');
-      } else {
-        [].forEach.call(rows, row => removeClass(row, 'current-row'));
-      }
-      if (newRow) {
-        addClass(newRow, 'current-row');
-      }
-    }
-  },
-
-  computed: {
-    table() {
-      return this.$parent;
-    },
-
-    data() {
-      return this.store.states.data;
-    },
-
-    columnsCount() {
-      return this.store.states.columns.length;
-    },
-
-    leftFixedLeafCount() {
-      return this.store.states.fixedLeafColumnsLength;
-    },
-
-    rightFixedLeafCount() {
-      return this.store.states.rightFixedLeafColumnsLength;
-    },
-
-    leftFixedCount() {
-      return this.store.states.fixedColumns.length;
-    },
-
-    rightFixedCount() {
-      return this.store.states.rightFixedColumns.length;
-    },
-
-    columns() {
-      return this.store.states.columns;
-    }
-  },
-
-  data() {
-    return {
-      tooltipContent: '',
-    };
-  },
-
-  created() {
-    this.activateTooltip = debounce(50, tooltip => tooltip.handleShowPopper());
-  },
-
-  methods: {
-    getKeyOfRow(row, index) {
-      const rowKey = this.table.rowKey;
-      if (rowKey) {
-        return getRowIdentity(row, rowKey);
-      }
-      return index;
-    },
-
-    isColumnHidden(index) {
-      if (this.fixed === true || this.fixed === 'left') {
-        return index >= this.leftFixedLeafCount;
-      } else if (this.fixed === 'right') {
-        return index < this.columnsCount - this.rightFixedLeafCount;
-      } else {
-        return (index < this.leftFixedLeafCount) || (index >= this.columnsCount - this.rightFixedLeafCount);
-      }
-    },
-
-    getSpan(row, column, rowIndex, columnIndex) {
-      let rowspan = 1;
-      let colspan = 1;
-
-      const fn = this.table.spanMethod;
-      if (typeof fn === 'function') {
-        const result = fn({
-          row,
-          column,
-          rowIndex,
-          columnIndex
-        });
-
-        if (Array.isArray(result)) {
-          rowspan = result[0];
-          colspan = result[1];
-        } else if (typeof result === 'object') {
-          rowspan = result.rowspan;
-          colspan = result.colspan;
-        }
-      }
-
-      return {
-        rowspan,
-        colspan
-      };
-    },
-
-    getRowStyle(row, rowIndex) {
-      const rowStyle = this.table.rowStyle;
-      if (typeof rowStyle === 'function') {
-        return rowStyle.call(null, {
-          row,
-          rowIndex
-        });
-      }
-      return rowStyle;
-    },
-
-    getRowClass(row, rowIndex) {
-      const currentRow = this.store.states.currentRow;
-      const classes = this.table.highlightCurrentRow && currentRow === row
-        ? ['el-table__row', 'current-row']
-        : ['el-table__row'];
-
-      if (this.stripe && rowIndex % 2 === 1) {
-        classes.push('el-table__row--striped');
-      }
-      const rowClassName = this.table.rowClassName;
-      if (typeof rowClassName === 'string') {
-        classes.push(rowClassName);
-      } else if (typeof rowClassName === 'function') {
-        classes.push(rowClassName.call(null, {
-          row,
-          rowIndex
-        }));
-      }
-
-      if (this.store.states.expandRows.indexOf(row) > -1) {
-        classes.push('expanded');
-      }
-
-      return classes.join(' ');
-    },
-
-    getCellStyle(rowIndex, columnIndex, row, column) {
-      const cellStyle = this.table.cellStyle;
-      if (typeof cellStyle === 'function') {
-        return cellStyle.call(null, {
-          rowIndex,
-          columnIndex,
-          row,
-          column
-        });
-      }
-      return cellStyle;
-    },
-
-    getCellClass(rowIndex, columnIndex, row, column) {
-      const classes = [column.id, column.align, column.className];
-
-      if (this.isColumnHidden(columnIndex)) {
-        classes.push('is-hidden');
-      }
-      
-      if (column.whiteSpaceNowrap) {
-        let _div = document.createElement('div');
-        _div.style.position = 'absolute';
-        _div.style.opacity = '0';
-        _div.style['white-space'] = 'nowrap';
-        _div.innerHTML = row[column.property] ? row[column.property] : '';
-        $('body').append(_div)
-        var realWIdth = _div.scrollWidth;
-        $(_div).remove();
-        
-        if (column.realWidth != null && column.realWidth > realWIdth || column.width > realWIdth || column.minWidth > realWIdth) {
-          //TODO
-        } else {
-          column.width = column.realWidth = realWIdth + 50;
-        }
-      }
-      
-
-      const cellClassName = this.table.cellClassName;
-      if (typeof cellClassName === 'string') {
-        classes.push(cellClassName);
-      } else if (typeof cellClassName === 'function') {
-        classes.push(cellClassName.call(null, {
-          rowIndex,
-          columnIndex,
-          row,
-          column
-        }));
-      }
-
-      return classes.join(' ');
-    },
-
-    handleCellMouseEnter(event, row) {
-      const table = this.table;
-      const cell = getCell(event);
-
-      if (cell) {
-        const column = getColumnByCell(table, cell);
-        const hoverState = table.hoverState = {cell, column, row};
-        table.$emit('cell-mouse-enter', hoverState.row, hoverState.column, hoverState.cell, event);
-      }
-
-      // 判断是否text-overflow, 如果是就显示tooltip
-      const cellChild = event.target.querySelector('.cell');
-      if (!hasClass(cellChild, 'el-tooltip')) {
-        return;
-      }
-      // use range width instead of scrollWidth to determine whether the text is overflowing
-      // to address a potential FireFox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1074543#c3
-      const range = document.createRange();
-      range.setStart(cellChild, 0);
-      range.setEnd(cellChild, cellChild.childNodes.length);
-      const rangeWidth = range.getBoundingClientRect().width;
-      const padding = (parseInt(getStyle(cellChild, 'paddingLeft'), 10) || 0) +
-        (parseInt(getStyle(cellChild, 'paddingRight'), 10) || 0);
-      if ((rangeWidth + padding > cellChild.offsetWidth || cellChild.scrollWidth > cellChild.offsetWidth) 
-            && (this.$refs.tooltip && $(cellChild).find('input').length <= 0 ||  $(cellChild).find('input').css('display') == 'none')) {
-        const tooltip = this.$refs.tooltip;
-        // TODO 会引起整个 Table 的重新渲染,需要优化
-        this.tooltipContent = cell.textContent || cell.innerText;
-        tooltip.referenceElm = cell;
-        tooltip.$refs.popper && (tooltip.$refs.popper.style.display = 'none');
-        tooltip.doDestroy();
-        tooltip.setExpectedState(true);
-        this.activateTooltip(tooltip);
-      }
-    },
-
-    handleCellMouseLeave(event) {
-      const tooltip = this.$refs.tooltip;
-      if (tooltip) {
-        tooltip.setExpectedState(false);
-        tooltip.handleClosePopper();
-      }
-      const cell = getCell(event);
-      if (!cell) return;
-
-      const oldHoverState = this.table.hoverState || {};
-      this.table.$emit('cell-mouse-leave', oldHoverState.row, oldHoverState.column, oldHoverState.cell, event);
-    },
-
-    handleMouseEnter(index) {
-      this.store.commit('setHoverRow', index);
-    },
-
-    handleMouseLeave() {
-      this.store.commit('setHoverRow', null);
-    },
-
-    handleContextMenu(event, row) {
-      this.handleEvent(event, row, 'contextmenu');
-    },
-
-    handleDoubleClick(event, row) {
-      let eventParent = event.target.parentNode.parentNode;
-      //取消拖拽
-      this.handleEvent(event, row, 'dblclick');
-      $(eventParent).attr('draggable',false)
-    },
-
-    handleClick(event, row) {
-        this.store.commit('setCurrentRow', row);
-        this.handleEvent(event, row, 'click');      
-        let eventParent = event.target.parentNode.parentNode;
-        let allTr = $(eventParent).siblings();
-        //恢复拖拽
-        if(this.dragRow){
-          if ($(eventParent).attr('draggable')){
-            for (let i = 0; i<allTr.length; i++){
-              $(allTr[i]).attr('draggable',true);
-            }
-          } 
-        }             
-    },
-
-    handleEvent(event, row, name) {
-      const table = this.table;
-      const cell = getCell(event);
-      let column;
-      if (cell) {
-        column = getColumnByCell(table, cell);
-        if (column) {
-          table.$emit(`cell-${name}`, row, column, cell, event);
-        }
-      }
-      table.$emit(`row-${name}`, row, event, column);
-    },
-
-    handleExpandClick(row, e) {
-      e.stopPropagation();
-      this.store.toggleRowExpansion(row);
-    },
-
-    //拖动行
-    dropRowSet(event,index) {
-      let that =this;
-      if (!that.dragRow){
-        return;
-      }
-      that.dragEnd = index;
-      if (that.dragRow && that.dragStart != that.dragEnd){
-        that.store.changeRowOrder(that.dragStart, that.dragEnd);
-      }
-    },
-    dropRowStart(event,index) {
-      if (!this.dragRow){
-        return;
-      }
-      this.dragStart = index;
-    },
-    dropRowOver(event,index) {
-      if (!this.dragRow){
-        return;
-      }
-      event.preventDefault();
-    }
-  }
-};

+ 0 - 438
src/lib/el-table/src/table-column.js

@@ -1,438 +0,0 @@
-import ElCheckbox from 'element-ui/packages/checkbox';
-import ElTag from 'element-ui/packages/tag';
-import objectAssign from 'element-ui/src/utils/merge';
-import { getPropByPath } from 'element-ui/src/utils/util';
-
-let columnIdSeed = 1;
-
-const defaults = {
-  default: {
-    order: ''
-  },
-  selection: {
-    width: 48,
-    minWidth: 48,
-    realWidth: 48,
-    order: '',
-    className: 'el-table-column--selection'
-  },
-  expand: {
-    width: 48,
-    minWidth: 48,
-    realWidth: 48,
-    order: ''
-  },
-  index: {
-    width: 48,
-    minWidth: 48,
-    realWidth: 48,
-    order: ''
-  }
-};
-
-const forced = {
-  selection: {
-    renderHeader: function(h, { store }) {
-      return <el-checkbox
-        disabled={ store.states.data && store.states.data.length === 0 }
-        indeterminate={ store.states.selection.length > 0 && !this.isAllSelected }
-        nativeOn-click={ this.toggleAllSelection }
-        value={ this.isAllSelected } />;
-    },
-    renderCell: function(h, { row, column, store, $index }) {
-      return <el-checkbox
-        nativeOn-click={ (event) => event.stopPropagation() }
-        value={ store.isSelected(row) }
-        disabled={ column.selectable ? !column.selectable.call(null, row, $index) : false }
-        on-input={ () => { store.commit('rowSelectedChanged', row); } } />;
-    },
-    sortable: false,
-    resizable: false
-  },
-  index: {
-    renderHeader: function(h, { column }) {
-      return column.label || '#';
-    },
-    renderCell: function(h, { $index, column }) {
-      let i = $index + 1;
-      const index = column.index;
-
-      if (typeof index === 'number') {
-        i = $index + index;
-      } else if (typeof index === 'function') {
-        i = index($index);
-      }
-
-      return <div>{ i }</div>;
-    },
-    sortable: false
-  },
-  expand: {
-    renderHeader: function(h, { column }) {
-      return column.label || '';
-    },
-    renderCell: function(h, { row, store }, proxy) {
-      const expanded = store.states.expandRows.indexOf(row) > -1;
-      return <div class={ 'el-table__expand-icon ' + (expanded ? 'el-table__expand-icon--expanded' : '') }
-        on-click={ e => proxy.handleExpandClick(row, e) }>
-        <i class='el-icon el-icon-arrow-right'></i>
-      </div>;
-    },
-    sortable: false,
-    resizable: false,
-    className: 'el-table__expand-column'
-  }
-};
-
-const getDefaultColumn = function(type, options) {
-  const column = {};
-
-  objectAssign(column, defaults[type || 'default']);
-
-  for (let name in options) {
-    if (options.hasOwnProperty(name)) {
-      const value = options[name];
-      if (typeof value !== 'undefined') {
-        column[name] = value;
-      }
-    }
-  }
-
-  if (!column.minWidth) {
-    column.minWidth = 80;
-  }
-
-  column.realWidth = column.width === undefined ? column.minWidth : column.width;
-
-  return column;
-};
-
-const DEFAULT_RENDER_CELL = function(h, { row, column, $index }) {
-  const property = column.property;
-  const value = property && getPropByPath(row, property).v;
-  if (column && column.formatter) {
-    return column.formatter(row, column, value, $index);
-  }
-  return value;
-};
-
-const parseWidth = (width) => {
-  if (width !== undefined) {
-    width = parseInt(width, 10);
-    if (isNaN(width)) {
-      width = null;
-    }
-  }
-  return width;
-};
-
-const parseMinWidth = (minWidth) => {
-  if (minWidth !== undefined) {
-    minWidth = parseInt(minWidth, 10);
-    if (isNaN(minWidth)) {
-      minWidth = 80;
-    }
-  }
-  return minWidth;
-};
-
-export default {
-  name: 'ElTableColumn',
-
-  props: {
-    type: {
-      type: String,
-      default: 'default'
-    },
-    label: String,
-    className: String,
-    labelClassName: String,
-    property: String,
-    prop: String,
-    width: {},
-    minWidth: {},
-    renderHeader: Function,
-    sortable: {
-      type: [String, Boolean],
-      default: false
-    },
-    sortMethod: Function,
-    sortBy: [String, Function, Array],
-    resizable: {
-      type: Boolean,
-      default: true
-    },
-    context: {},
-    columnKey: String,
-    align: String,
-    headerAlign: String,
-    showTooltipWhenOverflow: Boolean,
-    showOverflowTooltip: Boolean,
-    whiteSpaceNowrap: Boolean,
-    fixed: [Boolean, String],
-    formatter: Function,
-    selectable: Function,
-    reserveSelection: Boolean,
-    filterMethod: Function,
-    filteredValue: Array,
-    filters: Array,
-    filterPlacement: String,
-    filterMultiple: {
-      type: Boolean,
-      default: true
-    },
-    index: [Number, Function],
-    sortOrders: {
-      type: Array,
-      default() {
-        return ['ascending', 'descending', null];
-      },
-      validator(val) {
-        return val.every(order => ['ascending', 'descending', null].indexOf(order) > -1);
-      }
-    }
-  },
-
-  data() {
-    return {
-      isSubColumn: false,
-      columns: []
-    };
-  },
-
-  beforeCreate() {
-    this.row = {};
-    this.column = {};
-    this.$index = 0;
-  },
-
-  components: {
-    ElCheckbox,
-    ElTag
-  },
-
-  computed: {
-    owner() {
-      let parent = this.$parent;
-      while (parent && !parent.tableId) {
-        parent = parent.$parent;
-      }
-      return parent;
-    },
-    columnOrTableParent() {
-      let parent = this.$parent;
-      while (parent && !parent.tableId && !parent.columnId) {
-        parent = parent.$parent;
-      }
-      return parent;
-    }
-  },
-
-  created() {
-    this.customRender = this.$options.render;
-    this.$options.render = h => h('div', this.$slots.default);
-
-    let parent = this.columnOrTableParent;
-    let owner = this.owner;
-    this.isSubColumn = owner !== parent;
-    this.columnId = (parent.tableId || parent.columnId) + '_column_' + columnIdSeed++;
-
-    let type = this.type;
-
-    const width = parseWidth(this.width);
-    const minWidth = parseMinWidth(this.minWidth);
-
-    let isColumnGroup = false;
-
-    let column = getDefaultColumn(type, {
-      id: this.columnId,
-      columnKey: this.columnKey,
-      label: this.label,
-      className: this.className,
-      labelClassName: this.labelClassName,
-      property: this.prop || this.property,
-      type,
-      renderCell: null,
-      renderHeader: this.renderHeader,
-      minWidth,
-      width,
-      isColumnGroup,
-      context: this.context,
-      align: this.align ? 'is-' + this.align : null,
-      headerAlign: this.headerAlign ? 'is-' + this.headerAlign : (this.align ? 'is-' + this.align : null),
-      sortable: this.sortable === '' ? true : this.sortable,
-      sortMethod: this.sortMethod,
-      sortBy: this.sortBy,
-      resizable: this.resizable,
-      showOverflowTooltip: this.showOverflowTooltip || this.showTooltipWhenOverflow,
-      whiteSpaceNowrap: this.whiteSpaceNowrap,
-      formatter: this.formatter,
-      selectable: this.selectable,
-      reserveSelection: this.reserveSelection,
-      fixed: this.fixed === '' ? true : this.fixed,
-      filterMethod: this.filterMethod,
-      filters: this.filters,
-      filterable: this.filters || this.filterMethod,
-      filterMultiple: this.filterMultiple,
-      filterOpened: false,
-      filteredValue: this.filteredValue || [],
-      filterPlacement: this.filterPlacement || '',
-      index: this.index,
-      sortOrders: this.sortOrders
-    });
-
-    objectAssign(column, forced[type] || {});
-
-    this.columnConfig = column;
-
-    let renderCell = column.renderCell;
-    let _self = this;
-
-    if (type === 'expand') {
-      owner.renderExpanded = function(h, data) {
-        return _self.$scopedSlots.default
-          ? _self.$scopedSlots.default(data)
-          : _self.$slots.default;
-      };
-
-      column.renderCell = function(h, data) {
-        return <div class="cell">{ renderCell(h, data, this._renderProxy) }</div>;
-      };
-
-      return;
-    }
-
-    column.renderCell = function(h, data) {
-      if (_self.$scopedSlots.default) {
-        renderCell = () => _self.$scopedSlots.default(data);
-      }
-
-      if (!renderCell) {
-        renderCell = DEFAULT_RENDER_CELL;
-      }
-
-      return _self.showOverflowTooltip || _self.showTooltipWhenOverflow
-        ? <div class="cell el-tooltip" style={ {width: (data.column.realWidth || data.column.width) - 1 + 'px'} }>{ renderCell(h, data) }</div>
-        : <div class="cell">{ renderCell(h, data) }</div>;
-    };
-  },
-
-  destroyed() {
-    if (!this.$parent) return;
-    const parent = this.$parent;
-    this.owner.store.commit('removeColumn', this.columnConfig, this.isSubColumn ? parent.columnConfig : null);
-  },
-
-  watch: {
-    label(newVal) {
-      if (this.columnConfig) {
-        this.columnConfig.label = newVal;
-      }
-    },
-
-    prop(newVal) {
-      if (this.columnConfig) {
-        this.columnConfig.property = newVal;
-      }
-    },
-
-    property(newVal) {
-      if (this.columnConfig) {
-        this.columnConfig.property = newVal;
-      }
-    },
-
-    filters(newVal) {
-      if (this.columnConfig) {
-        this.columnConfig.filters = newVal;
-      }
-    },
-
-    filterMultiple(newVal) {
-      if (this.columnConfig) {
-        this.columnConfig.filterMultiple = newVal;
-      }
-    },
-
-    align(newVal) {
-      if (this.columnConfig) {
-        this.columnConfig.align = newVal ? 'is-' + newVal : null;
-
-        if (!this.headerAlign) {
-          this.columnConfig.headerAlign = newVal ? 'is-' + newVal : null;
-        }
-      }
-    },
-
-    headerAlign(newVal) {
-      if (this.columnConfig) {
-        this.columnConfig.headerAlign = 'is-' + (newVal ? newVal : this.align);
-      }
-    },
-
-    width(newVal) {
-      if (this.columnConfig) {
-        this.columnConfig.width = parseWidth(newVal);
-        this.owner.store.scheduleLayout();
-      }
-    },
-
-    minWidth(newVal) {
-      if (this.columnConfig) {
-        this.columnConfig.minWidth = parseMinWidth(newVal);
-        this.owner.store.scheduleLayout();
-      }
-    },
-
-    fixed(newVal) {
-      if (this.columnConfig) {
-        this.columnConfig.fixed = newVal;
-        this.owner.store.scheduleLayout(true);
-      }
-    },
-
-    sortable(newVal) {
-      if (this.columnConfig) {
-        this.columnConfig.sortable = newVal;
-      }
-    },
-
-    index(newVal) {
-      if (this.columnConfig) {
-        this.columnConfig.index = newVal;
-      }
-    },
-
-    formatter(newVal) {
-      if (this.columnConfig) {
-        this.columnConfig.formatter = newVal;
-      }
-    },
-
-    className(newVal) {
-      if (this.columnConfig) {
-        this.columnConfig.className = newVal;
-      }
-    },
-
-    labelClassName(newVal) {
-      if (this.columnConfig) {
-        this.columnConfig.labelClassName = newVal;
-      }
-    }
-  },
-
-  mounted() {
-    const owner = this.owner;
-    const parent = this.columnOrTableParent;
-    let columnIndex;
-
-    if (!this.isSubColumn) {
-      columnIndex = [].indexOf.call(parent.$refs.hiddenColumns.children, this.$el);
-    } else {
-      columnIndex = [].indexOf.call(parent.$el.children, this.$el);
-    }
-
-    owner.store.commit('insertColumn', this.columnConfig, columnIndex, this.isSubColumn ? parent.columnConfig : null);
-  }
-};

+ 0 - 147
src/lib/el-table/src/table-footer.js

@@ -1,147 +0,0 @@
-import LayoutObserver from './layout-observer';
-
-export default {
-  name: 'ElTableFooter',
-
-  mixins: [LayoutObserver],
-
-  render(h) {
-    let sums = [];
-    if (this.summaryMethod) {
-      sums = this.summaryMethod({ columns: this.columns, data: this.store.states.data });
-    } else {
-      this.columns.forEach((column, index) => {
-        if (index === 0) {
-          sums[index] = this.sumText;
-          return;
-        }
-        const values = this.store.states.data.map(item => Number(item[column.property]));
-        const precisions = [];
-        let notNumber = true;
-        values.forEach(value => {
-          if (!isNaN(value)) {
-            notNumber = false;
-            let decimal = ('' + value).split('.')[1];
-            precisions.push(decimal ? decimal.length : 0);
-          }
-        });
-        const precision = Math.max.apply(null, precisions);
-        if (!notNumber) {
-          sums[index] = values.reduce((prev, curr) => {
-            const value = Number(curr);
-            if (!isNaN(value)) {
-              return parseFloat((prev + curr).toFixed(Math.min(precision, 20)));
-            } else {
-              return prev;
-            }
-          }, 0);
-        } else {
-          sums[index] = '';
-        }
-      });
-    }
-
-    return (
-      <table
-        class="el-table__footer"
-        cellspacing="0"
-        cellpadding="0"
-        border="0">
-        <colgroup>
-          {
-            this._l(this.columns, column => <col name={ column.id } />)
-          }
-          {
-            this.hasGutter ? <col name="gutter" /> : ''
-          }
-        </colgroup>
-        <tbody class={ [{ 'has-gutter': this.hasGutter }] }>
-          <tr>
-            {
-              this._l(this.columns, (column, cellIndex) =>
-                <td
-                  colspan={ column.colSpan }
-                  rowspan={ column.rowSpan }
-                  class={ [column.id, column.headerAlign, column.className || '', this.isCellHidden(cellIndex, this.columns) ? 'is-hidden' : '', !column.children ? 'is-leaf' : '', column.labelClassName] }>
-                  <div class={ ['cell', column.labelClassName] }>
-                    {
-                      sums[cellIndex]
-                    }
-                  </div>
-                </td>
-              )
-            }
-            {
-              this.hasGutter ? <th class="gutter"></th> : ''
-            }
-          </tr>
-        </tbody>
-      </table>
-    );
-  },
-
-  props: {
-    fixed: String,
-    store: {
-      required: true
-    },
-    summaryMethod: Function,
-    sumText: String,
-    border: Boolean,
-    defaultSort: {
-      type: Object,
-      default() {
-        return {
-          prop: '',
-          order: ''
-        };
-      }
-    }
-  },
-
-  computed: {
-    table() {
-      return this.$parent;
-    },
-
-    isAllSelected() {
-      return this.store.states.isAllSelected;
-    },
-
-    columnsCount() {
-      return this.store.states.columns.length;
-    },
-
-    leftFixedCount() {
-      return this.store.states.fixedColumns.length;
-    },
-
-    rightFixedCount() {
-      return this.store.states.rightFixedColumns.length;
-    },
-
-    columns() {
-      return this.store.states.columns;
-    },
-
-    hasGutter() {
-      return !this.fixed && this.tableLayout.gutterWidth;
-    }
-  },
-
-  methods: {
-    isCellHidden(index, columns) {
-      if (this.fixed === true || this.fixed === 'left') {
-        return index >= this.leftFixedCount;
-      } else if (this.fixed === 'right') {
-        let before = 0;
-        for (let i = 0; i < index; i++) {
-          before += columns[i].colSpan;
-        }
-        return before < this.columnsCount - this.rightFixedCount;
-      } else {
-        return (index < this.leftFixedCount) || (index >= this.columnsCount - this.rightFixedCount);
-      }
-    }
-  }
-};

+ 0 - 656
src/lib/el-table/src/table-header.js

@@ -1,656 +0,0 @@
-import { hasClass, addClass, removeClass } from 'element-ui/src/utils/dom';
-import ElCheckbox from 'element-ui/packages/checkbox';
-import ElTag from 'element-ui/packages/tag';
-import Vue from 'vue';
-import FilterPanel from './filter-panel.vue';
-import LayoutObserver from './layout-observer';
-import { setCookie, getCookie } from '@/utils/util.js';
-
-const getAllColumns = (columns) => {
-  const result = [];
-  columns.forEach((column) => {
-    if (column.children) {
-      result.push(column);
-      result.push.apply(result, getAllColumns(column.children));
-    } else {
-      result.push(column);
-    }
-  });
-  return result;
-};
-
-const convertToRows = (originColumns) => {
-  let maxLevel = 1;
-  const traverse = (column, parent) => {
-    if (parent) {
-      column.level = parent.level + 1;
-      if (maxLevel < column.level) {
-        maxLevel = column.level;
-      }
-    }
-    if (column.children) {
-      let colSpan = 0;
-      column.children.forEach((subColumn) => {
-        traverse(subColumn, column);
-        colSpan += subColumn.colSpan;
-      });
-      column.colSpan = colSpan;
-    } else {
-      column.colSpan = 1;
-    }
-  };
-
-  originColumns.forEach((column) => {
-    column.level = 1;
-    traverse(column);
-  });
-
-  const rows = [];
-  for (let i = 0; i < maxLevel; i++) {
-    rows.push([]);
-  }
-
-  const allColumns = getAllColumns(originColumns);
-
-  allColumns.forEach((column) => {
-    if (!column.children) {
-      column.rowSpan = maxLevel - column.level + 1;
-    } else {
-      column.rowSpan = 1;
-    }
-    rows[column.level - 1].push(column);
-  });
-
-  return rows;
-};
-
-export default {
-  name: 'ElTableHeader',
-
-  mixins: [LayoutObserver],
-
-  render(h) {
-    const originColumns = this.store.states.originColumns;
-    const columnRows = convertToRows(originColumns, this.columns);
-    // 是否拥有多级表头
-    const isGroup = columnRows.length > 1;
-    if (isGroup) this.$parent.isGroup = true;
-    return (
-      <table
-        class="el-table__header"
-        cellspacing="0"
-        cellpadding="0"
-        border="0">
-        <colgroup>
-          {
-            this._l(this.columns, column => <col name={ column.id } />)
-          }
-          {
-            this.hasGutter ? <col name="gutter" /> : ''
-          }
-        </colgroup>
-        <thead class={ [{ 'is-group': isGroup, 'has-gutter': this.hasGutter }] }>
-          {
-            this._l(columnRows, (columns, rowIndex) =>
-              <tr
-                style={ this.getHeaderRowStyle(rowIndex) }
-                class={ this.getHeaderRowClass(rowIndex) }
-              >
-                {
-                  this._l(columns, (column, cellIndex) =>
-                    <th
-                      draggable={!column.fixed && this.dragColumn && column.level === 1}
-                      colspan={ column.colSpan }
-                      rowspan={ column.rowSpan }
-                      on-drop={ ($event) => this.dropColumnSet($event, column )}
-                      on-dragstart={ ($event) => this.dropColumnStart($event, column) }
-                      on-dragover={ ($event) => this.dropColumnOver($event, column) }
-                      on-mousemove={ ($event) => this.handleMouseMove($event, column) }
-                      on-mouseout={ this.handleMouseOut }
-                      on-mousedown={ ($event) => this.handleMouseDown($event, column) }
-                      on-click={ ($event) => this.handleHeaderClick($event, column) }
-                      on-contextmenu={ ($event) => this.handleHeaderContextMenu($event, column) }
-                      style={ this.getHeaderCellStyle(rowIndex, cellIndex, columns, column) }
-                      class={ this.getHeaderCellClass(rowIndex, cellIndex, columns, column) }>
-                      <div class={ ['cell', column.filteredValue && column.filteredValue.length > 0 ? 'highlight' : '', column.labelClassName] }>
-                        {
-                          column.renderHeader
-                            ? column.renderHeader.call(this._renderProxy, h, { column, $index: cellIndex, store: this.store, _self: this.$parent.$vnode.context })
-                            : column.label
-                        }
-                        {
-                          column.sortable
-                            ? <span class="caret-wrapper" on-click={ ($event) => this.handleSortClick($event, column) }>
-                              <i class="sort-caret ascending" on-click={ ($event) => this.handleSortClick($event, column, 'ascending') }>
-                              </i>
-                              <i class="sort-caret descending" on-click={ ($event) => this.handleSortClick($event, column, 'descending') }>
-                              </i>
-                            </span>
-                            : ''
-                        }
-                        {
-                          column.filterable
-                            ? <span class="el-table__column-filter-trigger" on-click={ ($event) => this.handleFilterClick($event, column) }><i class={ ['el-icon-arrow-down', column.filterOpened ? 'el-icon-arrow-up' : ''] }></i></span>
-                            : ''
-                        }
-                      </div>
-                      {!column.fixed && this.dragColumn && column.level === 1 ? 
-                        <div style={"position:absolute;width:1px;height:" + this.$parent.bodyHeight.height}></div> : ''}
-                    </th>
-                  )
-                }
-                {
-                  this.hasGutter ? <th class="gutter"></th> : ''
-                }
-              </tr>
-            )
-          }
-        </thead>
-      </table>
-    );
-  },
-
-  props: {
-    fixed: String,
-    store: {
-      required: true
-    },
-    border: Boolean,
-    dragColumn: [String, Boolean],    
-    defaultSort: {
-      type: Object,
-      default() {
-        return {
-          prop: '',
-          order: ''
-        };
-      }
-    }
-  },
-
-  components: {
-    ElCheckbox,
-    ElTag
-  },
-
-  computed: {
-    table() {
-      return this.$parent;
-    },
-
-    isAllSelected() {
-      return this.store.states.isAllSelected;
-    },
-
-    columnsCount() {
-      return this.store.states.columns.length;
-    },
-
-    leftFixedCount() {
-      return this.store.states.fixedColumns.length;
-    },
-
-    rightFixedCount() {
-      return this.store.states.rightFixedColumns.length;
-    },
-
-    leftFixedLeafCount() {
-      return this.store.states.fixedLeafColumnsLength;
-    },
-
-    rightFixedLeafCount() {
-      return this.store.states.rightFixedLeafColumnsLength;
-    },
-
-    columns() {
-      return this.store.states.columns;
-    },
-
-    hasGutter() {
-      return !this.fixed && this.tableLayout.gutterWidth;
-    }
-  },
-
-  created() {
-    this.filterPanels = {};
-  },
-
-  mounted() {
-    const { prop, order } = this.defaultSort;
-    this.store.commit('sort', { prop, order });
-    this.setCookieColumn();
-  },
-
-  beforeDestroy() {
-    const panels = this.filterPanels;
-    for (let prop in panels) {
-      if (panels.hasOwnProperty(prop) && panels[prop]) {
-        panels[prop].$destroy(true);
-      }
-    }
-  },
-
-  methods: {
-    setCookieColumn() {
-      let that = this;
-      var columnOrderCookie = null;
-      if (typeof(that.dragColumn) === 'string') {
-        try {
-          columnOrderCookie = JSON.parse(getCookie(that.dragColumn));
-          that.setColumnMounted(columnOrderCookie);
-        }
-        catch(err){
-          return;
-        }
-      }
-    },
-    isCellHidden(index, columns) {
-      let start = 0;
-      for (let i = 0; i < index; i++) {
-        start += columns[i].colSpan;
-      }
-      const after = start + columns[index].colSpan - 1;
-      if (this.fixed === true || this.fixed === 'left') {
-        return after >= this.leftFixedLeafCount;
-      } else if (this.fixed === 'right') {
-        return start < this.columnsCount - this.rightFixedLeafCount;
-      } else {
-        return (after < this.leftFixedLeafCount) || (start >= this.columnsCount - this.rightFixedLeafCount);
-      }
-    },
-
-    getHeaderRowStyle(rowIndex) {
-      const headerRowStyle = this.table.headerRowStyle;
-      if (typeof headerRowStyle === 'function') {
-        return headerRowStyle.call(null, { rowIndex });
-      }
-      return headerRowStyle;
-    },
-
-    getHeaderRowClass(rowIndex) {
-      const classes = [];
-
-      const headerRowClassName = this.table.headerRowClassName;
-      if (typeof headerRowClassName === 'string') {
-        classes.push(headerRowClassName);
-      } else if (typeof headerRowClassName === 'function') {
-        classes.push(headerRowClassName.call(null, { rowIndex }));
-      }
-
-      return classes.join(' ');
-    },
-
-    getHeaderCellStyle(rowIndex, columnIndex, row, column) {
-      const headerCellStyle = this.table.headerCellStyle;
-      if (typeof headerCellStyle === 'function') {
-        return headerCellStyle.call(null, {
-          rowIndex,
-          columnIndex,
-          row,
-          column
-        });
-      }
-      return headerCellStyle;
-    },
-
-    getHeaderCellClass(rowIndex, columnIndex, row, column) {
-      const classes = [column.id, column.order, column.headerAlign, column.className, column.labelClassName];
-
-      if (rowIndex === 0 && this.isCellHidden(columnIndex, row)) {
-        classes.push('is-hidden');
-      }
-
-      if (!column.children) {
-        classes.push('is-leaf');
-      }
-
-      if (column.sortable) {
-        classes.push('is-sortable');
-      }
-
-      const headerCellClassName = this.table.headerCellClassName;
-      if (typeof headerCellClassName === 'string') {
-        classes.push(headerCellClassName);
-      } else if (typeof headerCellClassName === 'function') {
-        classes.push(headerCellClassName.call(null, {
-          rowIndex,
-          columnIndex,
-          row,
-          column
-        }));
-      }
-
-      return classes.join(' ');
-    },
-
-    toggleAllSelection() {
-      this.store.commit('toggleAllSelection');
-    },
-
-    handleFilterClick(event, column) {
-      event.stopPropagation();
-      const target = event.target;
-      let cell = target.tagName === 'TH' ? target : target.parentNode;
-      cell = cell.querySelector('.el-table__column-filter-trigger') || cell;
-      const table = this.$parent;
-
-      let filterPanel = this.filterPanels[column.id];
-
-      if (filterPanel && column.filterOpened) {
-        filterPanel.showPopper = false;
-        return;
-      }
-
-      if (!filterPanel) {
-        filterPanel = new Vue(FilterPanel);
-        this.filterPanels[column.id] = filterPanel;
-        if (column.filterPlacement) {
-          filterPanel.placement = column.filterPlacement;
-        }
-        filterPanel.table = table;
-        filterPanel.cell = cell;
-        filterPanel.column = column;
-        !this.$isServer && filterPanel.$mount(document.createElement('div'));
-      }
-
-      setTimeout(() => {
-        filterPanel.showPopper = true;
-      }, 16);
-    },
-
-    dropColumnSet(event, column) {
-      if(!(!column.fixed && this.dragColumn && column.level === 1)) {
-        return;
-      }
-      this.dragEnd = $(event.target).offset().left;
-      let target = event.target;
-      while (target && !$(target).hasClass('el-table')) {
-        target = target.parentNode;
-      }
-      this.setColumn(target);
-    },
-
-    setColumn(target) {
-      let that = this;
-      var ths = $(target).find('th');
-      var prevTargets = [];
-      var setTargets = [];
-      for (let i = 0; i < ths.length; i++) {
-        if ($(ths[i]).attr('draggable') === 'false') {
-          continue;
-        }
-        if ($(ths[i]).offset().left === that.dragStart) {
-          prevTargets.push(ths[i]);
-        }
-        if ($(ths[i]).offset().left === that.dragEnd) {
-          setTargets.push(ths[i]);
-        }
-      }
-      var preClassList = $(prevTargets[0])[0].classList;
-      var preId = '';
-      for (let i = 0; i < preClassList.length; i++) {
-        if (preClassList[i].indexOf('el-table_') > -1) {
-          preId = preClassList[i];
-        }
-      }
-      if (!$(setTargets[0])[0]) {
-        return;
-      }
-      var setClassList = $(setTargets[0])[0].classList;
-      var setId = '';
-      for (let i = 0; i < setClassList.length; i++) {
-        if (setClassList[i].indexOf('el-table_') > -1) {
-          setId = setClassList[i];
-        }
-      }
-      let array = this.store.states._columns;
-      let preIndex = 0;
-      let setIndex = 0;
-      for (let i = 0; i < array.length; i++) {
-        if (array[i].id === preId) {
-          preIndex = i;
-        }
-        if (array[i].id === setId) {
-          setIndex = i;
-        }
-      }
-      var temp = array[preIndex];
-      array.splice(setIndex,0,temp);
-      if (preIndex <= setIndex) {
-        array.splice(preIndex,1);
-      } else {
-        array.splice(preIndex+1,1);
-      }
-      if (typeof(that.dragColumn) === 'string') {
-        let temp = [];
-        for (let i = 0; i < array.length; i++) {
-          temp.push(array[i].label);
-        }
-        setCookie(that.dragColumn, JSON.stringify(temp), 9999, '/');
-      }
-      if (this.table.$ready) {
-        this.store.updateColumns(); // hack for dynamics remove column
-        this.store.scheduleLayout();
-      }
-    },
-
-    setColumnMounted(columnOrderCookie) {
-      let that = this;
-      that.$nextTick(function () {
-        let array = that.store.states._columns;
-        let temp = [];
-        for (let i = 0; i < columnOrderCookie.length; i++) {
-          for (let k = 0; k < array.length; k++) {
-            if (array[k].label === columnOrderCookie[i]) {
-              temp.push(array[k]);
-              continue;
-            }
-          }
-        }
-        that.store.states._columns = temp;
-        if (that.table.$ready) {
-          that.store.updateColumns(); // hack for dynamics remove column
-          that.store.scheduleLayout();
-        }
-      });
-      
-    },
-
-    dropColumnStart(event, column) {
-      if(!(!column.fixed && this.dragColumn && column.level === 1)) {
-        return;
-      }
-      this.dragStart = $(event.target).offset().left;
-    },
-
-    dropColumnOver(event, column) {
-      if(!(!column.fixed && this.dragColumn && column.level === 1)) {
-        return;
-      }
-      event.preventDefault();
-    },
-
-    handleHeaderClick(event, column) {
-      if (!column.filters && column.sortable) {
-        this.handleSortClick(event, column);
-      } else if (column.filters && !column.sortable) {
-        this.handleFilterClick(event, column);
-      }
-
-      this.$parent.$emit('header-click', column, event);
-    },
-
-    handleHeaderContextMenu(event, column) {
-      this.$parent.$emit('header-contextmenu', column, event);
-    },
-
-    handleMouseDown(event, column) {
-      if (this.$isServer) return;
-      if (column.children && column.children.length > 0) return;
-      /* istanbul ignore if */
-      if (this.draggingColumn && this.border) {
-        this.dragging = true;
-
-        this.$parent.resizeProxyVisible = true;
-
-        const table = this.$parent;
-        const tableEl = table.$el;
-        const tableLeft = tableEl.getBoundingClientRect().left;
-        const columnEl = this.$el.querySelector(`th.${column.id}`);
-        const columnRect = columnEl.getBoundingClientRect();
-        const minLeft = columnRect.left - tableLeft + 30;
-
-        addClass(columnEl, 'noclick');
-
-        this.dragState = {
-          startMouseLeft: event.clientX,
-          startLeft: columnRect.right - tableLeft,
-          startColumnLeft: columnRect.left - tableLeft,
-          tableLeft
-        };
-
-        const resizeProxy = table.$refs.resizeProxy;
-        resizeProxy.style.left = this.dragState.startLeft + 'px';
-
-        document.onselectstart = function() { return false; };
-        document.ondragstart = function() { return false; };
-
-        const handleMouseMove = (event) => {
-          const deltaLeft = event.clientX - this.dragState.startMouseLeft;
-          const proxyLeft = this.dragState.startLeft + deltaLeft;
-
-          resizeProxy.style.left = Math.max(minLeft, proxyLeft) + 'px';
-        };
-
-        const handleMouseUp = () => {
-          if (this.dragging) {
-            const {
-              startColumnLeft,
-              startLeft
-            } = this.dragState;
-            const finalLeft = parseInt(resizeProxy.style.left, 10);
-            const columnWidth = finalLeft - startColumnLeft;
-            column.width = column.realWidth = columnWidth;
-            table.$emit('header-dragend', column.width, startLeft - startColumnLeft, column, event);
-
-            this.store.scheduleLayout();
-
-            document.body.style.cursor = '';
-            this.dragging = false;
-            this.draggingColumn = null;
-            this.dragState = {};
-
-            table.resizeProxyVisible = false;
-          }
-
-          document.removeEventListener('mousemove', handleMouseMove);
-          document.removeEventListener('mouseup', handleMouseUp);
-          document.onselectstart = null;
-          document.ondragstart = null;
-
-          setTimeout(function() {
-            removeClass(columnEl, 'noclick');
-          }, 0);
-        };
-
-        document.addEventListener('mousemove', handleMouseMove);
-        document.addEventListener('mouseup', handleMouseUp);
-      }
-    },
-
-    handleMouseMove(event, column) {
-      if (column.children && column.children.length > 0) return;
-      let target = event.target;
-      while (target && target.tagName !== 'TH') {
-        target = target.parentNode;
-      }
-
-      if (!column || !column.resizable) return;
-
-      if (!this.dragging && this.border) {
-        let rect = target.getBoundingClientRect();
-
-        const bodyStyle = document.body.style;
-        if (rect.width > 12 && rect.right - event.pageX < 8) {
-          bodyStyle.cursor = 'col-resize';
-          if (hasClass(target, 'is-sortable')) {
-            target.style.cursor = 'col-resize';
-          }
-          this.draggingColumn = column;
-        } else if (!this.dragging) {
-          bodyStyle.cursor = '';
-          if (hasClass(target, 'is-sortable')) {
-            target.style.cursor = 'pointer';
-          }
-          this.draggingColumn = null;
-        }
-      }
-    },
-
-    handleMouseOut() {
-      if (this.$isServer) return;
-      document.body.style.cursor = '';
-    },
-
-    toggleOrder({ order, sortOrders }) {
-      if (order === '') return sortOrders[0];
-      const index = sortOrders.indexOf(order || null);
-      return sortOrders[index > sortOrders.length - 2 ? 0 : index + 1];
-    },
-
-    handleSortClick(event, column, givenOrder) {
-      event.stopPropagation();
-      let order = givenOrder || this.toggleOrder(column);
-
-      let target = event.target;
-      while (target && target.tagName !== 'TH') {
-        target = target.parentNode;
-      }
-
-      if (target && target.tagName === 'TH') {
-        if (hasClass(target, 'noclick')) {
-          removeClass(target, 'noclick');
-          return;
-        }
-      }
-
-      if (!column.sortable) return;
-
-      const states = this.store.states;
-      let sortProp = states.sortProp;
-      let sortOrder;
-      const sortingColumn = states.sortingColumn;
-
-      if (sortingColumn !== column || (sortingColumn === column && sortingColumn.order === null)) {
-        if (sortingColumn) {
-          sortingColumn.order = null;
-        }
-        states.sortingColumn = column;
-        sortProp = column.property;
-      }
-
-      if (!order) {
-        sortOrder = column.order = null;
-        states.sortingColumn = null;
-        sortProp = null;
-      } else {
-        sortOrder = column.order = order;
-      }
-
-      states.sortProp = sortProp;
-      states.sortOrder = sortOrder;
-
-      this.store.commit('changeSortCondition');
-    }
-  },
-
-  data() {
-    return {
-      draggingColumn: null,
-      dragging: false,
-      dragState: {},
-      dragStart: 0,
-      dragEnd: 0
-    };
-  }
-};

+ 0 - 231
src/lib/el-table/src/table-layout.js

@@ -1,231 +0,0 @@
-import scrollbarWidth from 'element-ui/src/utils/scrollbar-width';
-import Vue from 'vue';
-
-class TableLayout {
-  constructor(options) {
-    this.observers = [];
-    this.table = null;
-    this.store = null;
-    this.columns = null;
-    this.fit = true;
-    this.showHeader = true;
-
-    this.height = null;
-    this.scrollX = false;
-    this.scrollY = false;
-    this.bodyWidth = null;
-    this.fixedWidth = null;
-    this.rightFixedWidth = null;
-    this.tableHeight = null;
-    this.headerHeight = 44; // Table Header Height
-    this.appendHeight = 0; // Append Slot Height
-    this.footerHeight = 44; // Table Footer Height
-    this.viewportHeight = null; // Table Height - Scroll Bar Height
-    this.bodyHeight = null; // Table Height - Table Header Height
-    this.fixedBodyHeight = null; // Table Height - Table Header Height - Scroll Bar Height
-    this.gutterWidth = scrollbarWidth();
-
-    for (let name in options) {
-      if (options.hasOwnProperty(name)) {
-        this[name] = options[name];
-      }
-    }
-
-    if (!this.table) {
-      throw new Error('table is required for Table Layout');
-    }
-    if (!this.store) {
-      throw new Error('store is required for Table Layout');
-    }
-  }
-
-  updateScrollY() {
-    const height = this.height;
-    if (typeof height !== 'string' && typeof height !== 'number') return;
-    const bodyWrapper = this.table.bodyWrapper;
-    if (this.table.$el && bodyWrapper) {
-      const body = bodyWrapper.querySelector('.el-table__body');
-      this.scrollY = body.offsetHeight > this.bodyHeight;
-    }
-  }
-
-  setHeight(value, prop = 'height') {
-    if (Vue.prototype.$isServer) return;
-    const el = this.table.$el;
-    if (typeof value === 'string' && /^\d+$/.test(value)) {
-      value = Number(value);
-    }
-    this.height = value;
-
-    if (!el && (value || value === 0)) return Vue.nextTick(() => this.setHeight(value, prop));
-
-    if (typeof value === 'number') {
-      el.style[prop] = value + 'px';
-
-      this.updateElsHeight();
-    } else if (typeof value === 'string') {
-      el.style[prop] = value;
-      this.updateElsHeight();
-    }
-  }
-
-  setMaxHeight(value) {
-    return this.setHeight(value, 'max-height');
-  }
-
-  updateElsHeight() {
-    if (!this.table.$ready) return Vue.nextTick(() => this.updateElsHeight());
-    const { headerWrapper, appendWrapper, footerWrapper } = this.table.$refs;
-    this.appendHeight = appendWrapper ? appendWrapper.offsetHeight : 0;
-
-    if (this.showHeader && !headerWrapper) return;
-    const headerHeight = this.headerHeight = !this.showHeader ? 0 : headerWrapper.offsetHeight;
-    if (this.showHeader && headerWrapper.offsetWidth > 0 && (this.table.columns || []).length > 0 && headerHeight < 2) {
-      return Vue.nextTick(() => this.updateElsHeight());
-    }
-    const tableHeight = this.tableHeight = this.table.$el.clientHeight;
-    if (this.height !== null && (!isNaN(this.height) || typeof this.height === 'string')) {
-      const footerHeight = this.footerHeight = footerWrapper ? footerWrapper.offsetHeight : 0;
-      this.bodyHeight = tableHeight - headerHeight - footerHeight + (footerWrapper ? 1 : 0);
-    }
-    this.fixedBodyHeight = this.scrollX ? this.bodyHeight - this.gutterWidth : this.bodyHeight;
-
-    const noData = !this.table.data || this.table.data.length === 0;
-    this.viewportHeight = this.scrollX ? tableHeight - (noData ? 0 : this.gutterWidth) : tableHeight;
-
-    this.updateScrollY();
-    this.notifyObservers('scrollable');
-  }
-
-  getFlattenColumns() {
-    const flattenColumns = [];
-    const columns = this.table.columns;
-    columns.forEach((column) => {
-      if (column.isColumnGroup) {
-        flattenColumns.push.apply(flattenColumns, column.columns);
-      } else {
-        flattenColumns.push(column);
-      }
-    });
-
-    return flattenColumns;
-  }
-
-  updateColumnsWidth() {
-    if (Vue.prototype.$isServer) return;
-    const fit = this.fit;
-    const bodyWidth = this.table.$el.clientWidth;
-    let bodyMinWidth = 0;
-
-    const flattenColumns = this.getFlattenColumns();
-    let flexColumns = flattenColumns.filter((column) => typeof column.width !== 'number');
-
-    flattenColumns.forEach((column) => { // Clean those columns whose width changed from flex to unflex
-      if (typeof column.width === 'number' && column.realWidth) column.realWidth = null;
-    });
-
-    if (flexColumns.length > 0 && fit) {
-      flattenColumns.forEach((column) => {
-        bodyMinWidth += column.width || column.minWidth || 80;
-      });
-
-      const scrollYWidth = this.scrollY ? this.gutterWidth : 0;
-
-      if (bodyMinWidth <= bodyWidth - scrollYWidth) { // DON'T HAVE SCROLL BAR
-        this.scrollX = false;
-
-        const totalFlexWidth = bodyWidth - scrollYWidth - bodyMinWidth;
-
-        if (flexColumns.length === 1) {
-          flexColumns[0].realWidth = (flexColumns[0].minWidth || 80) + totalFlexWidth;
-        } else {
-          const allColumnsWidth = flexColumns.reduce((prev, column) => prev + (column.minWidth || 80), 0);
-          const flexWidthPerPixel = totalFlexWidth / allColumnsWidth;
-          let noneFirstWidth = 0;
-
-          flexColumns.forEach((column, index) => {
-            if (index === 0) return;
-            const flexWidth = Math.floor((column.minWidth || 80) * flexWidthPerPixel);
-            noneFirstWidth += flexWidth;
-            column.realWidth = (column.minWidth || 80) + flexWidth;
-          });
-
-          flexColumns[0].realWidth = (flexColumns[0].minWidth || 80) + totalFlexWidth - noneFirstWidth;
-        }
-      } else { // HAVE HORIZONTAL SCROLL BAR
-        this.scrollX = true;
-        flexColumns.forEach(function(column) {
-          column.realWidth = column.minWidth;
-        });
-      }
-
-      this.bodyWidth = Math.max(bodyMinWidth, bodyWidth);
-      this.table.resizeState.width = this.bodyWidth;
-    } else {
-      flattenColumns.forEach((column) => {
-        if (!column.width && !column.minWidth) {
-          column.realWidth = 80;
-        } else {
-          column.realWidth = column.width || column.minWidth;
-        }
-
-        bodyMinWidth += column.realWidth;
-      });
-      this.scrollX = bodyMinWidth > bodyWidth;
-
-      this.bodyWidth = bodyMinWidth;
-    }
-
-    const fixedColumns = this.store.states.fixedColumns;
-
-    if (fixedColumns.length > 0) {
-      let fixedWidth = 0;
-      fixedColumns.forEach(function(column) {
-        fixedWidth += column.realWidth || column.width;
-      });
-
-      this.fixedWidth = fixedWidth;
-    }
-
-    const rightFixedColumns = this.store.states.rightFixedColumns;
-    if (rightFixedColumns.length > 0) {
-      let rightFixedWidth = 0;
-      rightFixedColumns.forEach(function(column) {
-        rightFixedWidth += column.realWidth || column.width;
-      });
-
-      this.rightFixedWidth = rightFixedWidth;
-    }
-
-    this.notifyObservers('columns');
-  }
-
-  addObserver(observer) {
-    this.observers.push(observer);
-  }
-
-  removeObserver(observer) {
-    const index = this.observers.indexOf(observer);
-    if (index !== -1) {
-      this.observers.splice(index, 1);
-    }
-  }
-
-  notifyObservers(event) {
-    const observers = this.observers;
-    observers.forEach((observer) => {
-      switch (event) {
-        case 'columns':
-          observer.onColumnsChange(this);
-          break;
-        case 'scrollable':
-          observer.onScrollableChange(this);
-          break;
-        default:
-          throw new Error(`Table Layout don't have event ${event}.`);
-      }
-    });
-  }
-}
-
-export default TableLayout;

+ 0 - 650
src/lib/el-table/src/table-store.js

@@ -1,650 +0,0 @@
-import Vue from 'vue';
-import debounce from 'throttle-debounce/debounce';
-import merge from 'element-ui/src/utils/merge';
-import { hasClass, addClass, removeClass } from 'element-ui/src/utils/dom';
-import { orderBy, getColumnById, getRowIdentity } from './util';
-
-let filterColumnWatch = function (data = [], tableColumns = {}, _filters = []) {
-  for (let i = 0; i < tableColumns.length; i++) {
-    let filters = [];
-    let tableColumn = tableColumns[i];
-    let property = tableColumn.property;
-    for (let i in data) {
-      let flag = true;
-      var set = data[i][property] || data[i][property] === 0 ? (data[i][property] + '') : '';
-      for (let j in filters) {
-        
-        if ((filters[j].value + '') === (set)) {
-          flag = false;
-          break;
-        }
-      }
-      if (flag) {
-        filters.push({
-          value: set,
-          text: set
-        })
-      }
-    }
-    tableColumn.filters = filters;
-  }
-}
-
-const sortData = (data, states) => {
-  const sortingColumn = states.sortingColumn;
-  if (!sortingColumn || typeof sortingColumn.sortable === 'string') {
-    return data;
-  }
-  return orderBy(data, states.sortProp, states.sortOrder, sortingColumn.sortMethod, sortingColumn.sortBy);
-};
-
-const getKeysMap = function(array, rowKey) {
-  const arrayMap = {};
-  (array || []).forEach((row, index) => {
-    arrayMap[getRowIdentity(row, rowKey)] = { row, index };
-  });
-  return arrayMap;
-};
-
-const toggleRowSelection = function(states, row, selected) {
-  let changed = false;
-  const selection = states.selection;
-  const index = selection.indexOf(row);
-  if (typeof selected === 'undefined') {
-    if (index === -1) {
-      selection.push(row);
-      changed = true;
-    } else {
-      selection.splice(index, 1);
-      changed = true;
-    }
-  } else {
-    if (selected && index === -1) {
-      selection.push(row);
-      changed = true;
-    } else if (!selected && index > -1) {
-      selection.splice(index, 1);
-      changed = true;
-    }
-  }
-
-  return changed;
-};
-
-const toggleRowExpansion = function(states, row, expanded) {
-  let changed = false;
-  const expandRows = states.expandRows;
-  if (typeof expanded !== 'undefined') {
-    const index = expandRows.indexOf(row);
-    if (expanded) {
-      if (index === -1) {
-        expandRows.push(row);
-        changed = true;
-      }
-    } else {
-      if (index !== -1) {
-        expandRows.splice(index, 1);
-        changed = true;
-      }
-    }
-  } else {
-    const index = expandRows.indexOf(row);
-    if (index === -1) {
-      expandRows.push(row);
-      changed = true;
-    } else {
-      expandRows.splice(index, 1);
-      changed = true;
-    }
-  }
-
-  return changed;
-};
-
-const TableStore = function(table, initialState = {}) {
-  if (!table) {
-    throw new Error('Table is required.');
-  }
-  this.table = table;
-
-  this.states = {
-    rowKey: null,
-    _columns: [],
-    originColumns: [],
-    columns: [],
-    fixedColumns: [],
-    rightFixedColumns: [],
-    leafColumns: [],
-    fixedLeafColumns: [],
-    rightFixedLeafColumns: [],
-    leafColumnsLength: 0,
-    fixedLeafColumnsLength: 0,
-    rightFixedLeafColumnsLength: 0,
-    isComplex: false,
-    filteredData: null,
-    data: null,
-    sortingColumn: null,
-    sortProp: null,
-    sortOrder: null,
-    isAllSelected: false,
-    selection: [],
-    reserveSelection: false,
-    selectable: null,
-    currentRow: null,
-    hoverRow: null,
-    filters: {},
-    expandRows: [],
-    defaultExpandAll: false,
-    selectOnIndeterminate: false
-  };
-
-  for (let prop in initialState) {
-    if (initialState.hasOwnProperty(prop) && this.states.hasOwnProperty(prop)) {
-      this.states[prop] = initialState[prop];
-    }
-  }
-};
-
-TableStore.prototype.mutations = {
-  setData(states, data) {
-    const dataInstanceChanged = states._data !== data;
-    states._data = data;
-
-    Object.keys(states.filters).forEach((columnId) => {
-      const values = states.filters[columnId];
-      if (!values || values.length === 0) return;
-      const column = getColumnById(this.states, columnId);
-      if (column && column.filterMethod) {
-        data = data.filter((row) => {
-          return values.some(value => column.filterMethod.call(null, value, row, column));
-        });
-      }
-    });
-
-    states.filteredData = data;
-    states.data = sortData((data || []), states);
-
-    this.updateCurrentRow();
-
-    const rowKey = states.rowKey;
-
-    if (!states.reserveSelection) {
-      if (dataInstanceChanged) {
-        this.clearSelection();
-      } else {
-        this.cleanSelection();
-      }
-      this.updateAllSelected();
-    } else {
-      if (rowKey) {
-        const selection = states.selection;
-        const selectedMap = getKeysMap(selection, rowKey);
-
-        states.data.forEach((row) => {
-          const rowId = getRowIdentity(row, rowKey);
-          const rowInfo = selectedMap[rowId];
-          if (rowInfo) {
-            selection[rowInfo.index] = row;
-          }
-        });
-
-        this.updateAllSelected();
-      } else {
-        console.warn('WARN: rowKey is required when reserve-selection is enabled.');
-      }
-    }
-
-    const defaultExpandAll = states.defaultExpandAll;
-    if (defaultExpandAll) {
-      this.states.expandRows = (states.data || []).slice(0);
-    } else if (rowKey) {
-      // update expandRows to new rows according to rowKey
-      const ids = getKeysMap(this.states.expandRows, rowKey);
-      let expandRows = [];
-      for (const row of states.data) {
-        const rowId = getRowIdentity(row, rowKey);
-        if (ids[rowId]) {
-          expandRows.push(row);
-        }
-      }
-      this.states.expandRows = expandRows;
-    } else {
-      // clear the old rows
-      this.states.expandRows = [];
-    }
-    Vue.nextTick(() => this.table.updateScrollY());
-  },
-
-  changeSortCondition(states, options) {
-    states.data = sortData((states.filteredData || states._data || []), states);
-
-    const { $el, highlightCurrentRow } = this.table;
-    if ($el && highlightCurrentRow) {
-      const data = states.data;
-      const tr = $el.querySelector('tbody').children;
-      const rows = [].filter.call(tr, row => hasClass(row, 'el-table__row'));
-      const row = rows[data.indexOf(states.currentRow)];
-
-      [].forEach.call(rows, row => removeClass(row, 'current-row'));
-      addClass(row, 'current-row');
-    }
-
-    if (!options || !options.silent) {
-      this.table.$emit('sort-change', {
-        column: this.states.sortingColumn,
-        prop: this.states.sortProp,
-        order: this.states.sortOrder
-      });
-    }
-
-    Vue.nextTick(() => this.table.updateScrollY());
-  },
-
-  sort(states, options) {
-    const { prop, order } = options;
-    if (prop) {
-      states.sortProp = prop;
-      states.sortOrder = order || 'ascending';
-      Vue.nextTick(() => {
-        for (let i = 0, length = states.columns.length; i < length; i++) {
-          let column = states.columns[i];
-          if (column.property === states.sortProp) {
-            column.order = states.sortOrder;
-            states.sortingColumn = column;
-            break;
-          }
-        }
-
-        if (states.sortingColumn) {
-          this.commit('changeSortCondition');
-        }
-      });
-    }
-  },
-
-  filterChange(states, options) {
-    let { column, values, silent } = options;
-    if (values && !Array.isArray(values)) {
-      values = [values];
-    }
-
-    const prop = column.property;
-    const filters = {};
-
-    if (prop) {
-      states.filters[column.id] = values;
-      filters[column.columnKey || column.id] = values;
-    }
-
-    let data = states._data;
-
-    Object.keys(states.filters).forEach((columnId) => {
-      const values = states.filters[columnId];
-      if (!values || values.length === 0) return;
-      const column = getColumnById(this.states, columnId);
-      if (column && column.filterMethod) {
-        data = data.filter((row) => {
-          return values.some(value => column.filterMethod.call(null, value, row, column));
-        });
-      }
-    });
-
-    states.filteredData = data;
-    states.data = sortData(data, states);
-
-    if (!silent) {
-      // let filteredData = this.table.tableData;
-      // filterColumnWatch(filteredData, this.table.columns, filters)
-      this.table.$emit('filter-change', filters);
-    }
-
-    Vue.nextTick(() => this.table.updateScrollY());
-  },  
-
-  insertColumn(states, column, index, parent) {
-    let array = states._columns;
-    if (parent) {
-      array = parent.children;
-      if (!array) array = parent.children = [];
-    }
-
-    if (typeof index !== 'undefined') {
-      array.splice(index, 0, column);
-    } else {
-      array.push(column);
-    }
-
-    if (column.type === 'selection') {
-      states.selectable = column.selectable;
-      states.reserveSelection = column.reserveSelection;
-    }
-
-    if (this.table.$ready) {
-      this.updateColumns(); // hack for dynamics insert column
-      this.scheduleLayout();
-    }
-  },
-
-  removeColumn(states, column, parent) {
-    let array = states._columns;
-    if (parent) {
-      array = parent.children;
-      if (!array) array = parent.children = [];
-    }
-    if (array) {
-      array.splice(array.indexOf(column), 1);
-    }
-
-    if (this.table.$ready) {
-      this.updateColumns(); // hack for dynamics remove column
-      this.scheduleLayout();
-    }
-  },
-
-  setHoverRow(states, row) {
-    states.hoverRow = row;
-  },
-
-  setCurrentRow(states, row) {
-    const oldCurrentRow = states.currentRow;
-    states.currentRow = row;
-
-    if (oldCurrentRow !== row) {
-      this.table.$emit('current-change', row, oldCurrentRow);
-    }
-  },
-
-  rowSelectedChanged(states, row) {
-    const changed = toggleRowSelection(states, row);
-    const selection = states.selection;
-
-    if (changed) {
-      const table = this.table;
-      table.$emit('selection-change', selection ? selection.slice() : []);
-      table.$emit('select', selection, row);
-    }
-
-    this.updateAllSelected();
-  },
-
-  toggleAllSelection: debounce(10, function(states) {
-    const data = states.data || [];
-    if (data.length === 0) return;
-    const selection = this.states.selection;
-    // when only some rows are selected (but not all), select or deselect all of them
-    // depending on the value of selectOnIndeterminate
-    const value = states.selectOnIndeterminate
-      ? !states.isAllSelected
-      : !(states.isAllSelected || selection.length);
-    let selectionChanged = false;
-
-    data.forEach((item, index) => {
-      if (states.selectable) {
-        if (states.selectable.call(null, item, index) && toggleRowSelection(states, item, value)) {
-          selectionChanged = true;
-        }
-      } else {
-        if (toggleRowSelection(states, item, value)) {
-          selectionChanged = true;
-        }
-      }
-    });
-
-    const table = this.table;
-    if (selectionChanged) {
-      table.$emit('selection-change', selection ? selection.slice() : []);
-    }
-    table.$emit('select-all', selection);
-    states.isAllSelected = value;
-  })
-};
-
-const doFlattenColumns = (columns) => {
-  const result = [];
-  columns.forEach((column) => {
-    if (column.children) {
-      result.push.apply(result, doFlattenColumns(column.children));
-    } else {
-      result.push(column);
-    }
-  });
-  return result;
-};
-
-TableStore.prototype.updateColumns = function() {
-  const states = this.states;
-  const _columns = states._columns || [];
-  states.fixedColumns = _columns.filter((column) => column.fixed === true || column.fixed === 'left');
-  states.rightFixedColumns = _columns.filter((column) => column.fixed === 'right');
-
-  if (states.fixedColumns.length > 0 && _columns[0] && _columns[0].type === 'selection' && !_columns[0].fixed) {
-    _columns[0].fixed = true;
-    states.fixedColumns.unshift(_columns[0]);
-  }
-
-  const notFixedColumns = _columns.filter(column => !column.fixed);
-  states.originColumns = [].concat(states.fixedColumns).concat(notFixedColumns).concat(states.rightFixedColumns);
-
-  const leafColumns = doFlattenColumns(notFixedColumns);
-  const fixedLeafColumns = doFlattenColumns(states.fixedColumns);
-  const rightFixedLeafColumns = doFlattenColumns(states.rightFixedColumns);
-
-  states.leafColumnsLength = leafColumns.length;
-  states.fixedLeafColumnsLength = fixedLeafColumns.length;
-  states.rightFixedLeafColumnsLength = rightFixedLeafColumns.length;
-
-  states.columns = [].concat(fixedLeafColumns).concat(leafColumns).concat(rightFixedLeafColumns);
-  states.isComplex = states.fixedColumns.length > 0 || states.rightFixedColumns.length > 0;
-};
-
-TableStore.prototype.isSelected = function(row) {
-  return (this.states.selection || []).indexOf(row) > -1;
-};
-
-TableStore.prototype.clearSelection = function() {
-  const states = this.states;
-  states.isAllSelected = false;
-  const oldSelection = states.selection;
-  if (states.selection.length) {
-    states.selection = [];
-  }
-  if (oldSelection.length > 0) {
-    this.table.$emit('selection-change', states.selection ? states.selection.slice() : []);
-  }
-};
-
-TableStore.prototype.setExpandRowKeys = function(rowKeys) {
-  const expandRows = [];
-  const data = this.states.data;
-  const rowKey = this.states.rowKey;
-  if (!rowKey) throw new Error('[Table] prop row-key should not be empty.');
-  const keysMap = getKeysMap(data, rowKey);
-  rowKeys.forEach((key) => {
-    const info = keysMap[key];
-    if (info) {
-      expandRows.push(info.row);
-    }
-  });
-
-  this.states.expandRows = expandRows;
-};
-
-TableStore.prototype.toggleRowSelection = function(row, selected) {
-  const changed = toggleRowSelection(this.states, row, selected);
-  if (changed) {
-    this.table.$emit('selection-change', this.states.selection ? this.states.selection.slice() : []);
-  }
-};
-
-TableStore.prototype.toggleRowExpansion = function(row, expanded) {
-  const changed = toggleRowExpansion(this.states, row, expanded);
-  if (changed) {
-    this.table.$emit('expand-change', row, this.states.expandRows);
-    this.scheduleLayout();
-  }
-};
-
-TableStore.prototype.isRowExpanded = function(row) {
-  const { expandRows = [], rowKey } = this.states;
-  if (rowKey) {
-    const expandMap = getKeysMap(expandRows, rowKey);
-    return !!expandMap[getRowIdentity(row, rowKey)];
-  }
-  return expandRows.indexOf(row) !== -1;
-};
-
-TableStore.prototype.cleanSelection = function() {
-  const selection = this.states.selection || [];
-  const data = this.states.data;
-  const rowKey = this.states.rowKey;
-  let deleted;
-  if (rowKey) {
-    deleted = [];
-    const selectedMap = getKeysMap(selection, rowKey);
-    const dataMap = getKeysMap(data, rowKey);
-    for (let key in selectedMap) {
-      if (selectedMap.hasOwnProperty(key) && !dataMap[key]) {
-        deleted.push(selectedMap[key].row);
-      }
-    }
-  } else {
-    deleted = selection.filter((item) => {
-      return data.indexOf(item) === -1;
-    });
-  }
-
-  deleted.forEach((deletedItem) => {
-    selection.splice(selection.indexOf(deletedItem), 1);
-  });
-
-  if (deleted.length) {
-    this.table.$emit('selection-change', selection ? selection.slice() : []);
-  }
-};
-
-TableStore.prototype.clearFilter = function() {
-  const states = this.states;
-  const { tableHeader, fixedTableHeader, rightFixedTableHeader } = this.table.$refs;
-  let panels = {};
-
-  if (tableHeader) panels = merge(panels, tableHeader.filterPanels);
-  if (fixedTableHeader) panels = merge(panels, fixedTableHeader.filterPanels);
-  if (rightFixedTableHeader) panels = merge(panels, rightFixedTableHeader.filterPanels);
-
-  const keys = Object.keys(panels);
-  if (!keys.length) return;
-
-  keys.forEach(key => {
-    panels[key].filteredValue = [];
-  });
-
-  states.filters = {};
-
-  this.commit('filterChange', {
-    column: {},
-    values: [],
-    silent: true
-  });
-};
-
-TableStore.prototype.clearSort = function() {
-  const states = this.states;
-  if (!states.sortingColumn) return;
-  states.sortingColumn.order = null;
-  states.sortProp = null;
-  states.sortOrder = null;
-
-  this.commit('changeSortCondition', {
-    silent: true
-  });
-};
-
-TableStore.prototype.updateAllSelected = function() {
-  const states = this.states;
-  const { selection, rowKey, selectable, data } = states;
-  if (!data || data.length === 0) {
-    states.isAllSelected = false;
-    return;
-  }
-
-  let selectedMap;
-  if (rowKey) {
-    selectedMap = getKeysMap(states.selection, rowKey);
-  }
-
-  const isSelected = function(row) {
-    if (selectedMap) {
-      return !!selectedMap[getRowIdentity(row, rowKey)];
-    } else {
-      return selection.indexOf(row) !== -1;
-    }
-  };
-
-  let isAllSelected = true;
-  let selectedCount = 0;
-  for (let i = 0, j = data.length; i < j; i++) {
-    const item = data[i];
-    const isRowSelectable = selectable && selectable.call(null, item, i);
-    if (!isSelected(item)) {
-      if (!selectable || isRowSelectable) {
-        isAllSelected = false;
-        break;
-      }
-    } else {
-      selectedCount++;
-    }
-  }
-
-  if (selectedCount === 0) isAllSelected = false;
-
-  states.isAllSelected = isAllSelected;
-};
-
-TableStore.prototype.scheduleLayout = function(updateColumns) {
-  if (updateColumns) {
-    this.updateColumns();
-  }
-  this.table.debouncedUpdateLayout();
-};
-
-TableStore.prototype.setCurrentRowKey = function(key) {
-  const states = this.states;
-  const rowKey = states.rowKey;
-  if (!rowKey) throw new Error('[Table] row-key should not be empty.');
-  const data = states.data || [];
-  const keysMap = getKeysMap(data, rowKey);
-  const info = keysMap[key];
-  if (info) {
-    states.currentRow = info.row;
-  }
-};
-
-TableStore.prototype.updateCurrentRow = function() {
-  const states = this.states;
-  const table = this.table;
-  const data = states.data || [];
-  const oldCurrentRow = states.currentRow;
-
-  if (data.indexOf(oldCurrentRow) === -1) {
-    states.currentRow = null;
-
-    if (states.currentRow !== oldCurrentRow) {
-      table.$emit('current-change', null, oldCurrentRow);
-    }
-  }
-};
-
-TableStore.prototype.commit = function(name, ...args) {
-  const mutations = this.mutations;
-  if (mutations[name]) {
-    mutations[name].apply(this, [this.states].concat(args));
-  } else {
-    throw new Error(`Action not found: ${name}`);
-  }
-};
-
-TableStore.prototype.changeRowOrder = function(startIndex, endIndex) {
-  this.table.$emit('changeRowOrder', startIndex, endIndex)
-};
-
-export default TableStore;

+ 0 - 666
src/lib/el-table/src/table.vue

@@ -1,666 +0,0 @@
-<template>
-  <div class="el-table"
-    :class="[{
-      'el-table--fit': fit,
-      'el-table--striped': stripe,
-      'el-table--border': border || isGroup,
-      'el-table--hidden': isHidden,
-      'el-table--group': isGroup,
-      'el-table--fluid-height': maxHeight,
-      'el-table--scrollable-x': layout.scrollX,
-      'el-table--scrollable-y': layout.scrollY,
-      'el-table--enable-row-hover': !store.states.isComplex,
-      'el-table--enable-row-transition': (store.states.data || []).length !== 0 && (store.states.data || []).length < 100
-    }, tableSize ? `el-table--${ tableSize }` : '']"
-    @mouseleave="handleMouseLeave($event)">
-    <div class="hidden-columns" ref="hiddenColumns"><slot></slot></div>
-    <div
-      v-if="showHeader"
-      v-mousewheel="handleHeaderFooterMousewheel"
-      class="el-table__header-wrapper"
-      ref="headerWrapper">
-      <table-header
-        ref="tableHeader"
-        :store="store"
-        :dragColumn="dragColumn"
-        :border="border"
-        :default-sort="defaultSort"
-        :style="{
-          width: layout.bodyWidth ? layout.bodyWidth + 'px' : ''
-        }">
-      </table-header>
-    </div>
-    <div
-      class="el-table__body-wrapper"
-      ref="bodyWrapper"
-      :class="[layout.scrollX ? `is-scrolling-${scrollPosition}` : 'is-scrolling-none']"
-      :style="[bodyHeight]">
-      <table-body
-        :dragRow="dragRow"
-        :context="context"
-        :store="store"
-        :stripe="stripe"
-        :row-class-name="rowClassName"
-        :row-style="rowStyle"
-        :highlight="highlightCurrentRow"
-        :style="{
-           width: bodyWidth
-        }">
-      </table-body>
-      <div
-        v-if="!data || data.length === 0"
-        class="el-table__empty-block"
-        ref="emptyBlock"
-        :style="{
-          width: bodyWidth
-        }">
-        <span class="el-table__empty-text">
-          <slot name="empty">{{ emptyText || t('el.table.emptyText') }}</slot>
-        </span>
-      </div>
-      <div
-        v-if="$slots.append"
-        class="el-table__append-wrapper"
-        ref="appendWrapper">
-        <slot name="append"></slot>
-      </div>
-    </div>
-    <div
-      v-if="showSummary"
-      v-show="data && data.length > 0"
-      v-mousewheel="handleHeaderFooterMousewheel"
-      class="el-table__footer-wrapper"
-      ref="footerWrapper">
-      <table-footer
-        :store="store"
-        :border="border"
-        :sum-text="sumText || t('el.table.sumText')"
-        :summary-method="summaryMethod"
-        :default-sort="defaultSort"
-        :style="{
-          width: layout.bodyWidth ? layout.bodyWidth + 'px' : ''
-        }">
-      </table-footer>
-    </div>
-    <div
-      v-if="fixedColumns.length > 0"
-      v-mousewheel="handleFixedMousewheel"
-      class="el-table__fixed"
-      ref="fixedWrapper"
-      :style="[{
-        width: layout.fixedWidth ? layout.fixedWidth + 'px' : ''
-      },
-      fixedHeight]">
-      <div
-        v-if="showHeader"
-        class="el-table__fixed-header-wrapper"
-        ref="fixedHeaderWrapper" >
-        <table-header
-          ref="fixedTableHeader"
-          fixed="left"
-          :border="border"
-          :dragColumn="dragColumn"
-          :store="store"
-          :style="{
-            width: bodyWidth
-          }"></table-header>
-      </div>
-      <div
-        class="el-table__fixed-body-wrapper"
-        ref="fixedBodyWrapper"
-        :style="[{
-          top: layout.headerHeight + 'px'
-        },
-        fixedBodyHeight]">
-        <table-body
-          fixed="left"
-          :dragRow="dragRow"
-          :store="store"
-          :stripe="stripe"
-          :highlight="highlightCurrentRow"
-          :row-class-name="rowClassName"
-          :row-style="rowStyle"
-          :style="{
-            width: bodyWidth
-          }">
-        </table-body>
-        <div
-          v-if="$slots.append"
-          class="el-table__append-gutter"
-          :style="{
-            height: layout.appendHeight + 'px'
-          }"></div>
-      </div>
-      <div
-        v-if="showSummary"
-        v-show="data && data.length > 0"
-        class="el-table__fixed-footer-wrapper"
-        ref="fixedFooterWrapper">
-        <table-footer
-          fixed="left"
-          :border="border"
-          :sum-text="sumText || t('el.table.sumText')"
-          :summary-method="summaryMethod"
-          :store="store"
-          :style="{
-            width: bodyWidth
-          }"></table-footer>
-      </div>
-    </div>
-    <div
-      v-if="rightFixedColumns.length > 0"
-      v-mousewheel="handleFixedMousewheel"
-      class="el-table__fixed-right"
-      ref="rightFixedWrapper"
-      :style="[{
-        width: layout.rightFixedWidth ? layout.rightFixedWidth + 'px' : '',
-        right: layout.scrollY ? (border ? layout.gutterWidth : (layout.gutterWidth || 0)) + 'px' : ''
-      },
-      fixedHeight]">
-      <div v-if="showHeader"
-        class="el-table__fixed-header-wrapper"
-        ref="rightFixedHeaderWrapper">
-        <table-header
-          ref="rightFixedTableHeader"
-          fixed="right"
-          :border="border"
-          :store="store"
-          :dragColumn="dragColumn"
-          :style="{
-            width: bodyWidth
-          }"></table-header>
-      </div>
-      <div
-        class="el-table__fixed-body-wrapper"
-        ref="rightFixedBodyWrapper"
-        :style="[{
-          top: layout.headerHeight + 'px'
-        },
-        fixedBodyHeight]">
-        <table-body
-          fixed="right"
-          :dragRow="dragRow"
-          :store="store"          
-          :stripe="stripe"
-          :row-class-name="rowClassName"
-          :row-style="rowStyle"
-          :highlight="highlightCurrentRow"
-          :style="{
-            width: bodyWidth
-          }">
-        </table-body>
-      </div>
-      <div
-        v-if="showSummary"
-        v-show="data && data.length > 0"
-        class="el-table__fixed-footer-wrapper"
-        ref="rightFixedFooterWrapper">
-        <table-footer
-          fixed="right"
-          :border="border"
-          :sum-text="sumText || t('el.table.sumText')"
-          :summary-method="summaryMethod"
-          :store="store"
-          :style="{
-            width: bodyWidth
-          }"></table-footer>
-      </div>
-    </div>
-    <div
-      v-if="rightFixedColumns.length > 0"
-      class="el-table__fixed-right-patch"
-      ref="rightFixedPatch"
-      :style="{
-        width: layout.scrollY ? layout.gutterWidth + 'px' : '0',
-        height: layout.headerHeight + 'px'
-      }"></div>
-    <div class="el-table__column-resize-proxy" ref="resizeProxy" v-show="resizeProxyVisible"></div>
-  </div>
-</template>
-
-<script type="text/babel">
-  import ElCheckbox from 'element-ui/packages/checkbox';
-  import debounce from 'throttle-debounce/debounce';
-  import { addResizeListener, removeResizeListener } from 'element-ui/src/utils/resize-event';
-  import Mousewheel from 'element-ui/src/directives/mousewheel';
-  import Locale from 'element-ui/src/mixins/locale';
-  import Migrating from 'element-ui/src/mixins/migrating';
-  import TableStore from './table-store';
-  import TableLayout from './table-layout';
-  import TableBody from './table-body';
-  import TableHeader from './table-header';
-  import TableFooter from './table-footer';
-
-  let tableIdSeed = 1;
-
-  export default {
-    name: 'ElTable',
-
-    mixins: [Locale, Migrating],
-
-    directives: {
-      Mousewheel
-    },
-
-    props: {
-      data: {
-        type: Array,
-        default: function() {
-          return [];
-        }
-      },
-
-      size: String,
-
-      width: [String, Number],
-
-      height: [String, Number],
-
-      maxHeight: [String, Number],
-
-      fit: {
-        type: Boolean,
-        default: true
-      },
-
-      stripe: Boolean,
-
-      border: Boolean,
-
-      dragColumn: [String, Boolean],
-
-      dragRow: [String, Boolean],
-
-      rowKey: [String, Function],
-
-      context: {},
-
-      showHeader: {
-        type: Boolean,
-        default: true
-      },
-
-      showSummary: Boolean,
-
-      sumText: String,
-
-      summaryMethod: Function,
-
-      rowClassName: [String, Function],
-
-      rowStyle: [Object, Function],
-
-      cellClassName: [String, Function],
-
-      cellStyle: [Object, Function],
-
-      headerRowClassName: [String, Function],
-
-      headerRowStyle: [Object, Function],
-
-      headerCellClassName: [String, Function],
-
-      headerCellStyle: [Object, Function],
-
-      highlightCurrentRow: Boolean,
-
-      currentRowKey: [String, Number],
-
-      emptyText: String,
-
-      expandRowKeys: Array,
-
-      defaultExpandAll: Boolean,
-
-      defaultSort: Object,
-
-      tooltipEffect: String,
-
-      spanMethod: Function,
-
-      selectOnIndeterminate: {
-        type: Boolean,
-        default: true
-      }
-    },
-
-    components: {
-      TableHeader,
-      TableFooter,
-      TableBody,
-      ElCheckbox
-    },
-
-    methods: {
-      getMigratingConfig() {
-        return {
-          events: {
-            expand: 'expand is renamed to expand-change'
-          }
-        };
-      },
-
-      setCurrentRow(row) {
-        this.store.commit('setCurrentRow', row);
-      },
-
-      toggleRowSelection(row, selected) {
-        this.store.toggleRowSelection(row, selected);
-        this.store.updateAllSelected();
-      },
-
-      toggleRowExpansion(row, expanded) {
-        this.store.toggleRowExpansion(row, expanded);
-      },
-
-      clearSelection() {
-        this.store.clearSelection();
-      },
-
-      clearFilter() {
-        this.store.clearFilter();
-      },
-
-      clearSort() {
-        this.store.clearSort();
-      },
-
-      handleMouseLeave() {
-        this.store.commit('setHoverRow', null);
-        if (this.hoverState) this.hoverState = null;
-      },
-
-      updateScrollY() {
-        this.layout.updateScrollY();
-        this.layout.updateColumnsWidth();
-      },
-
-      handleFixedMousewheel(event, data) {
-        const bodyWrapper = this.bodyWrapper;
-        if (Math.abs(data.spinY) > 0) {
-          const currentScrollTop = bodyWrapper.scrollTop;
-          if (data.pixelY < 0 && currentScrollTop !== 0) {
-            event.preventDefault();
-          }
-          if (data.pixelY > 0 && bodyWrapper.scrollHeight - bodyWrapper.clientHeight > currentScrollTop) {
-            event.preventDefault();
-          }
-          bodyWrapper.scrollTop += Math.ceil(data.pixelY / 5);
-        } else {
-          bodyWrapper.scrollLeft += Math.ceil(data.pixelX / 5);
-        }
-      },
-
-      handleHeaderFooterMousewheel(event, data) {
-        const { pixelX, pixelY } = data;
-        if (Math.abs(pixelX) >= Math.abs(pixelY)) {
-          event.preventDefault();
-          this.bodyWrapper.scrollLeft += data.pixelX / 5;
-        }
-      },
-
-      bindEvents() {
-        const { headerWrapper, footerWrapper } = this.$refs;
-        const refs = this.$refs;
-        let self = this;
-
-        this.bodyWrapper.addEventListener('scroll', function() {
-          if (headerWrapper) headerWrapper.scrollLeft = this.scrollLeft;
-          if (footerWrapper) footerWrapper.scrollLeft = this.scrollLeft;
-          if (refs.fixedBodyWrapper) refs.fixedBodyWrapper.scrollTop = this.scrollTop;
-          if (refs.rightFixedBodyWrapper) refs.rightFixedBodyWrapper.scrollTop = this.scrollTop;
-          const maxScrollLeftPosition = this.scrollWidth - this.offsetWidth - 1;
-          const scrollLeft = this.scrollLeft;
-          if (scrollLeft >= maxScrollLeftPosition) {
-            self.scrollPosition = 'right';
-          } else if (scrollLeft === 0) {
-            self.scrollPosition = 'left';
-          } else {
-            self.scrollPosition = 'middle';
-          }
-        });
-
-        if (this.fit) {
-          addResizeListener(this.$el, this.resizeListener);
-        }
-      },
-
-      resizeListener() {
-        if (!this.$ready) return;
-        let shouldUpdateLayout = false;
-        const el = this.$el;
-        const { width: oldWidth, height: oldHeight } = this.resizeState;
-
-        const width = el.offsetWidth;
-        if (oldWidth !== width) {
-          shouldUpdateLayout = true;
-        }
-
-        const height = el.offsetHeight;
-        if ((this.height || this.shouldUpdateHeight) && oldHeight !== height) {
-          shouldUpdateLayout = true;
-        }
-
-        if (shouldUpdateLayout) {
-          this.resizeState.width = width;
-          this.resizeState.height = height;
-          this.doLayout();
-        }
-      },
-
-      doLayout() {
-        this.layout.updateColumnsWidth();
-        if (this.shouldUpdateHeight) {
-          this.layout.updateElsHeight();
-        }
-      },
-
-      sort(prop, order) {
-        this.store.commit('sort', { prop, order });
-      }
-    },
-
-    created() {
-      this.tableId = 'el-table_' + tableIdSeed++;
-      this.debouncedUpdateLayout = debounce(50, () => this.doLayout());
-    },
-
-    computed: {
-      tableSize() {
-        return this.size || (this.$ELEMENT || {}).size;
-      },
-
-      bodyWrapper() {
-        return this.$refs.bodyWrapper;
-      },
-
-      shouldUpdateHeight() {
-        return this.height ||
-          this.maxHeight ||
-          this.fixedColumns.length > 0 ||
-          this.rightFixedColumns.length > 0;
-      },
-
-      selection() {
-        return this.store.states.selection;
-      },
-
-      columns() {
-        return this.store.states.columns;
-      },
-
-      tableData() {
-        return this.store.states.data;
-      },
-
-      fixedColumns() {
-        return this.store.states.fixedColumns;
-      },
-
-      rightFixedColumns() {
-        return this.store.states.rightFixedColumns;
-      },
-
-      bodyWidth() {
-        const { bodyWidth, scrollY, gutterWidth } = this.layout;
-        return bodyWidth ? bodyWidth - (scrollY ? gutterWidth : 0) + 'px' : '';
-      },
-
-      bodyHeight() {
-        if (this.height) {
-          return {
-            height: this.layout.bodyHeight ? this.layout.bodyHeight + 'px' : ''
-          };
-        } else if (this.maxHeight) {
-          return {
-            'max-height': (this.showHeader
-              ? this.maxHeight - this.layout.headerHeight - this.layout.footerHeight
-              : this.maxHeight - this.layout.footerHeight) + 'px'
-          };
-        }
-        return {};
-      },
-
-      fixedBodyHeight() {
-        if (this.height) {
-          return {
-            height: this.layout.fixedBodyHeight ? this.layout.fixedBodyHeight + 'px' : ''
-          };
-        } else if (this.maxHeight) {
-          let maxHeight = this.layout.scrollX ? this.maxHeight - this.layout.gutterWidth : this.maxHeight;
-
-          if (this.showHeader) {
-            maxHeight -= this.layout.headerHeight;
-          }
-
-          maxHeight -= this.layout.footerHeight;
-
-          return {
-            'max-height': maxHeight + 'px'
-          };
-        }
-
-        return {};
-      },
-
-      fixedHeight() {
-        if (this.maxHeight) {
-          if (this.showSummary) {
-            return {
-              bottom: 0
-            };
-          }
-          return {
-            bottom: (this.layout.scrollX && this.data.length) ? this.layout.gutterWidth + 'px' : ''
-          };
-        } else {
-          if (this.showSummary) {
-            return {
-              height: this.layout.tableHeight ? this.layout.tableHeight + 'px' : ''
-            };
-          }
-          return {
-            height: this.layout.viewportHeight ? this.layout.viewportHeight + 'px' : ''
-          };
-        }
-      }
-    },
-
-    watch: {
-      height: {
-        immediate: true,
-        handler(value) {
-          this.layout.setHeight(value);
-        }
-      },
-
-      maxHeight: {
-        immediate: true,
-        handler(value) {
-          this.layout.setMaxHeight(value);
-        }
-      },
-
-      currentRowKey(newVal) {
-        this.store.setCurrentRowKey(newVal);
-      },
-
-      data: {
-        immediate: true,
-        handler(value) {
-          this.store.commit('setData', value);
-          if (this.$ready) {
-            this.$nextTick(() => {
-              this.doLayout();
-            });
-          }
-        }
-      },
-
-      expandRowKeys: {
-        immediate: true,
-        handler(newVal) {
-          if (newVal) {
-            this.store.setExpandRowKeys(newVal);
-          }
-        }
-      }
-    },
-
-    destroyed() {
-      if (this.resizeListener) removeResizeListener(this.$el, this.resizeListener);
-    },
-
-    mounted() {
-      this.bindEvents();
-      this.store.updateColumns();
-      this.doLayout();
-
-      this.resizeState = {
-        width: this.$el.offsetWidth,
-        height: this.$el.offsetHeight
-      };
-
-      // init filters
-      this.store.states.columns.forEach(column => {
-        if (column.filteredValue && column.filteredValue.length) {
-          this.store.commit('filterChange', {
-            column,
-            values: column.filteredValue,
-            silent: true
-          });
-        }
-      });
-
-      this.$ready = true;
-    },
-
-    data() {
-      const store = new TableStore(this, {
-        rowKey: this.rowKey,
-        defaultExpandAll: this.defaultExpandAll,
-        selectOnIndeterminate: this.selectOnIndeterminate
-      });
-      const layout = new TableLayout({
-        store,
-        table: this,
-        fit: this.fit,
-        showHeader: this.showHeader
-      });
-      return {
-        layout,
-        store,
-        isHidden: false,
-        renderExpanded: null,
-        resizeProxyVisible: false,
-        resizeState: {
-          width: null,
-          height: null
-        },
-        // 是否拥有多级表头
-        isGroup: false,
-        scrollPosition: 'left'
-      };
-    }
-  };
-</script>

+ 0 - 110
src/lib/el-table/src/util.js

@@ -1,110 +0,0 @@
-import { getValueByPath } from 'element-ui/src/utils/util';
-
-export const getCell = function(event) {
-  let cell = event.target;
-
-  while (cell && cell.tagName.toUpperCase() !== 'HTML') {
-    if (cell.tagName.toUpperCase() === 'TD') {
-      return cell;
-    }
-    cell = cell.parentNode;
-  }
-
-  return null;
-};
-
-const isObject = function(obj) {
-  return obj !== null && typeof obj === 'object';
-};
-
-export const orderBy = function(array, sortKey, reverse, sortMethod, sortBy) {
-  if (!sortKey && !sortMethod && (!sortBy || Array.isArray(sortBy) && !sortBy.length)) {
-    return array;
-  }
-  if (typeof reverse === 'string') {
-    reverse = reverse === 'descending' ? -1 : 1;
-  } else {
-    reverse = (reverse && reverse < 0) ? -1 : 1;
-  }
-  const getKey = sortMethod ? null : function(value, index) {
-    if (sortBy) {
-      if (!Array.isArray(sortBy)) {
-        sortBy = [sortBy];
-      }
-      return sortBy.map(function(by) {
-        if (typeof by === 'string') {
-          return getValueByPath(value, by);
-        } else {
-          return by(value, index, array);
-        }
-      });
-    }
-    if (sortKey !== '$key') {
-      if (isObject(value) && '$value' in value) value = value.$value;
-    }
-    return [isObject(value) ? getValueByPath(value, sortKey) : value];
-  };
-  const compare = function(a, b) {
-    if (sortMethod) {
-      return sortMethod(a.value, b.value);
-    }
-    for (let i = 0, len = a.key.length; i < len; i++) {
-      if (a.key[i] < b.key[i]) {
-        return -1;
-      }
-      if (a.key[i] > b.key[i]) {
-        return 1;
-      }
-    }
-    return 0;
-  };
-  return array.map(function(value, index) {
-    return {
-      value: value,
-      index: index,
-      key: getKey ? getKey(value, index) : null
-    };
-  }).sort(function(a, b) {
-    let order = compare(a, b);
-    if (!order) {
-      // make stable https://en.wikipedia.org/wiki/Sorting_algorithm#Stability
-      order = a.index - b.index;
-    }
-    return order * reverse;
-  }).map(item => item.value);
-};
-
-export const getColumnById = function(table, columnId) {
-  let column = null;
-  table.columns.forEach(function(item) {
-    if (item.id === columnId) {
-      column = item;
-    }
-  });
-  return column;
-};
-
-export const getColumnByCell = function(table, cell) {
-  const matches = (cell.className || '').match(/el-table_[^\s]+/gm);
-  if (matches) {
-    return getColumnById(table, matches[0]);
-  }
-  return null;
-};
-
-export const getRowIdentity = (row, rowKey) => {
-  if (!row) throw new Error('row is required when get row identity');
-  if (typeof rowKey === 'string') {
-    if (rowKey.indexOf('.') < 0) {
-      return row[rowKey];
-    }
-    let key = rowKey.split('.');
-    let current = row;
-    for (let i = 0; i < key.length; i++) {
-      current = current[key[i]];
-    }
-    return current;
-  } else if (typeof rowKey === 'function') {
-    return rowKey.call(null, row);
-  }
-};

+ 8 - 8
src/utils/QueueStartList.js

@@ -1,14 +1,14 @@
-import axios from 'axios'
+import axios from "axios";
 //返回月台
-export function loadingPoint(URL){
-  let loadingpoint = []
-  axios.get(URL).then((res)=>{
+export function loadingPoint(URL) {
+  let loadingpoint = [];
+  axios.get(URL).then(res => {
     res.data.data.forEach(e => {
       let arr = {
-          value:e.GRID_NAME
+        value: e.GRID_NAME
       };
-    loadingpoint.push(arr)
+      loadingpoint.push(arr);
     });
-  })
+  });
   return loadingpoint;
-}
+}

+ 24 - 0
src/utils/exportExcelAdvanced.JS

@@ -0,0 +1,24 @@
+/**
+ * 导出excel的高级版本
+ * luobang
+ * 2022-05-09 有待进一步优化
+ */
+// 导出Excel全局组件
+export function exportExcelAdvanced(tableTitle, tableColumnData, tableData) {
+    let tHeader = [];
+    let filterVal = [];
+    tableColumnData.forEach(e => {
+    if (tHeader.indexOf(e.label) === -1) {
+          tHeader.push(e.label);
+    };
+    if (filterVal.indexOf(e.prop) === -1) {
+          filterVal.push(e.prop);
+    };
+    });
+    // this.downloadLoading = true;
+    require.ensure([], () => {
+    const { exportJsonToExcel } = require('@/assets/excel/Export2Excel.js');
+    let data = tableData.map(v => filterVal.map(j => v[j]));
+    exportJsonToExcel(tHeader, data, tableTitle);
+    });
+ }

+ 62 - 31
src/utils/sharedJsFile.js

@@ -1,31 +1,62 @@
- // 把时间戳改为正常可读的时间
- export function renderTime(date) {
-   if (date !== null) {
-     let dateee = new Date(date).toJSON();
-     return new Date(+new Date(dateee) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '');
-   }
-   return null;
- }
- export function sjTime(orderPlanInTime) {
-   var stringTime = renderTime(orderPlanInTime);
-   var timestamp1 = stringTime.replace(/-/g, '/');
-   return new Date(timestamp1).getTime();
- }
- export function isNumber(value) {
-   // 验证是否为数字
-   var patrn = /^(-?\d+)(\.\d+)?$/;
-   if (patrn.exec(value) == null || value === '') {
-     return false;
-   } else {
-     return true;
-   }
- }
- export function isIntegerNumber(value) {
-   // 验证是否为整数
-   var patrn = /^\+?[1-9][0-9]*$/g;
-   if (patrn.exec(value) == null || value === '') {
-     return false;
-   } else {
-     return true;
-   }
- }
+// 把时间戳改为正常可读的时间
+export function renderTime(date) {
+  if (date !== null) {
+    let dateee = new Date(date).toJSON();
+    return new Date(+new Date(dateee) + 8 * 3600 * 1000)
+      .toISOString()
+      .replace(/T/g, ' ')
+      .replace(/\.[\d]{3}Z/, '');
+  }
+  return null;
+}
+export function sjTime(orderPlanInTime) {
+  var stringTime = renderTime(orderPlanInTime);
+  var timestamp1 = stringTime.replace(/-/g, '/');
+  return new Date(timestamp1).getTime();
+}
+export function isVehicleNumber(vehicleNumber) {
+  var result = false;
+  if (vehicleNumber != null) {
+    if (vehicleNumber.length === 7) {
+      var express = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/;
+      result = express.test(vehicleNumber);
+    }
+  }
+  return result;
+}
+
+export function isNumber(value) {
+  // 验证是否为数字
+  var patrn = /^(-?\d+)(\.\d+)?$/;
+  if (patrn.exec(value) == null || value === '') {
+    return false;
+  } else {
+    return true;
+  }
+}
+export function isIntegerNumber(value) {
+  // 验证是否为整数
+  var patrn = /^\+?[1-9][0-9]*$/g;
+  if (patrn.exec(value) == null || value === '') {
+    return false;
+  } else {
+    return true;
+  }
+}
+export function stringToDate(dateStr, separator) {
+  if (!separator) {
+    separator = '-';
+  }
+  var dateArr = dateStr.split(separator);
+  var year = parseInt(dateArr[0]);
+  var month;
+  // 处理月份为04这样的情况
+  if (dateArr[1].indexOf('0') === 0) {
+    month = parseInt(dateArr[1].substring(1));
+  } else {
+    month = parseInt(dateArr[1]);
+  }
+  var day = parseInt(dateArr[2]);
+  var date = new Date(year, month - 1, day);
+  return date;
+}

+ 28 - 13
src/views/ADMINISTRATORS/app.js

@@ -85,19 +85,34 @@ export function isIntegerNumber(value) {
 }
 
 //写一个方法封装date对象转换为时间字符串
-export function toDateString(value){
-    if(value==null){
-        return
-    }
-    var Year = value.getFullYear();
-    var Month = ("0" + (value.getMonth() + 1)).slice(-2)
-    var Day = ("0" + (value.getDate())).slice(-2)
-    var Hours = ("0" + (value.getHours())).slice(-2)
-    var Minutes = ("0" + (value.getMinutes())).slice(-2)
-    var Seconds = ("0" + (value.getSeconds())).slice(-2)
-    var DATE = Year + "-" + Month + "-" + Day + " " + Hours + ":" + Minutes + ":" + Seconds
-    return DATE
-}
+  export function toDateString(value){
+      if(value==null){
+          return
+      }
+      var Year = value.getFullYear();
+      var Month = ("0" + (value.getMonth() + 1)).slice(-2)
+      var Day = ("0" + (value.getDate())).slice(-2)
+      var Hours = ("0" + (value.getHours())).slice(-2)
+      var Minutes = ("0" + (value.getMinutes())).slice(-2)
+      var Seconds = ("0" + (value.getSeconds())).slice(-2)
+      var DATE = Year + "-" + Month + "-" + Day + " " + Hours + ":" + Minutes + ":" + Seconds
+      return DATE
+  }
+//写一个方法封装date对象转换为时间字符串
+  export function toDateNo(value){
+      if(value==null){
+          return
+      }
+      var Year = value.getFullYear();
+      var Month = ("0" + (value.getMonth() + 1)).slice(-2)
+      var Day = ("0" + (value.getDate())).slice(-2)
+      var Hours = ("0" + (value.getHours())).slice(-2)
+      var Minutes = ("0" + (value.getMinutes())).slice(-2)
+      var Seconds = ("0" + (value.getSeconds())).slice(-2)
+      var DATE = Year + "" + Month + "" + Day + "" + Hours + "" + Minutes + "" + Seconds
+      return DATE
+  }
+
 /* eslint-disable no-new */
 new Vue({
   el: '#app',

+ 556 - 380
src/views/ADMINISTRATORS/components/ADMINISTRATORS1.vue

@@ -6,147 +6,273 @@
         <el-tabs v-model="activeName">
           <el-tab-pane label="补录计量实绩" name="first">
             <div class="switch">
-                <el-switch
+              <el-switch
                 v-model="switchValue"
                 active-text="二次过磅"
                 inactive-text="首次过磅"
-                @change = "onchange">
-                </el-switch>
+                @change="onchange"
+              >
+              </el-switch>
             </div>
-          <div class="admin2">
-            <div class="carrier from">
+            <div class="admin2">
+              <div class="carrier from">
                 <el-form
-                    :inline="true"
-                    class="demo-form-inline"
-                    label-width="80px"
-                    >
-                    <el-form-item label="车牌号:">
+                  :inline="true"
+                  class="demo-form-inline"
+                  label-width="80px"
+                >
+                  <el-form-item label="车牌号:">
                     <el-autocomplete
-                    class="inline-input"
-                    v-model="capacityName"
-                    :fetch-suggestions="querySearchCapacity"
-                    placeholder="车牌号"
-                    :trigger-on-focus="false"
-                    @select="handleSelectCapacity"
+                      class="inline-input"
+                      v-model="capacityName"
+                      :fetch-suggestions="querySearchCapacity"
+                      placeholder="车牌号"
+                      :trigger-on-focus="false"
+                      @select="handleSelectCapacity"
                     >
-                    <template slot-scope="{ item }">
-                    <div class="name">{{ item.capacityNumber }}</div>
-                    </template>
+                      <template slot-scope="{ item }">
+                        <div class="name">{{ item.capacityNumber }}</div>
+                      </template>
                     </el-autocomplete>
-                    </el-form-item>
+                  </el-form-item>
                 </el-form>
-            </div>
-            <div class="material from">
+              </div>
+              <div class="material from">
                 <span class="text">物资:</span>
                 <el-select v-model="materialId" placeholder="请选择">
-                <el-option
+                  <el-option
                     v-for="item in materialList"
                     :key="item.materialId"
-                    :label="item.materialName" 
+                    :label="item.materialName"
                     :value="item.materialId"
-                >
-                </el-option>
+                  >
+                  </el-option>
                 </el-select>
-            </div>
-
-            <div class="poundNo from">
-                <span class="text">磅单号:</span>
-                <el-input v-model="poundNo"></el-input>
-            </div>
-            <div class="block" v-if="first">
+              </div>
+              <div class="block" v-if="first">
                 <span class="text">首次称重时间:</span>
                 <el-date-picker
-                v-model="value1"
-                type="datetime"
-                placeholder="选择日期时间">
+                  v-model="value1"
+                  type="datetime"
+                  placeholder="选择日期时间"
+                >
                 </el-date-picker>
-            </div>
-            <div class="firstWeight from " v-if="first">
+              </div>
+              <div class="firstWeight from " v-if="first">
                 <span class="text">首次称重重量(吨):</span>
                 <el-input v-model="firstWeight"></el-input>
-            </div>
-            <div class="truckCalFirst from" v-if="first">
+              </div>
+              <div class="truckCalFirst from" v-if="first">
                 <span class="text">首次汽车衡:</span>
-                <el-select v-model="truckCalFirst" placeholder="请选择" @change="onchange1">
-                <el-option
+                <el-select
+                  v-model="truckCalFirst"
+                  placeholder="请选择"
+                  @change="onchange1"
+                >
+                  <el-option
                     v-for="item in truckCalFirstList"
                     :key="item.value"
-                    :label="item.label" 
+                    :label="item.label"
                     :value="item.value"
-                >
-                </el-option>
+                  >
+                  </el-option>
                 </el-select>
-            </div>
-            <div class="block" v-if="second">
+              </div>
+              <div class="block" v-if="second">
                 <span class="text">二次称重时间:</span>
                 <el-date-picker
-                v-model="value2"
-                type="datetime"
-                placeholder="选择日期时间">
+                  v-model="value2"
+                  type="datetime"
+                  placeholder="选择日期时间"
+                >
                 </el-date-picker>
-            </div>
-            <div class="secondWeight from" v-if="second">
+              </div>
+              <div class="secondWeight from" v-if="second">
                 <span class="text">二次称重重量(吨):</span>
                 <el-input v-model="secondWeight"></el-input>
-            </div>
-            <div class="truckCalSecond from" v-if="second">
+              </div>
+              <div class="truckCalSecond from" v-if="second">
                 <span class="text">二次汽车衡:</span>
-                <el-select v-model="truckCalSecond" placeholder="请选择" @change="onchange2">
-                <el-option
+                <el-select
+                  v-model="truckCalSecond"
+                  placeholder="请选择"
+                  @change="onchange2"
+                >
+                  <el-option
                     v-for="item in truckCalSecondList"
                     :key="item.value"
-                    :label="item.label" 
+                    :label="item.label"
                     :value="item.value"
-                >
-                </el-option>
+                  >
+                  </el-option>
                 </el-select>
+              </div>
             </div>
-            <div class="netWeight from" v-if="second">
-                <span class="text">净重(吨):</span>
-                <el-input v-model="netWeight"></el-input>
+            <div class="button_box">
+              <el-button @click="onClickCancel">返回</el-button>
+              <el-button
+                type="primary"
+                @click="onClickConfirm"
+                :disabled="disabled"
+                >确认</el-button
+              >
             </div>
-          </div>
-          <div class="button_box">
-            <el-button @click="onClickCancel">返回</el-button>
-            <el-button type="primary" @click="onClickConfirm" :disabled = "disabled">确认</el-button>
-          </div>
           </el-tab-pane>
           <el-tab-pane label="修改路段顺序" name="second">
-              <div class="admin2">
-            <div class="carrier from">
+            <div class="admin2">
+              <div class="carrier from">
                 <el-form
-                    :inline="true"
-                    class="demo-form-inline"
-                    label-width="80px"
+                  :inline="true"
+                  class="demo-form-inline"
+                  label-width="80px"
+                >
+                  <el-form-item label="车牌号:">
+                    <el-autocomplete
+                      class="inline-input"
+                      v-model="capacityName"
+                      :fetch-suggestions="querySearchCapacity"
+                      placeholder="车牌号"
+                      :trigger-on-focus="false"
+                      @select="handleSelectCapacity"
                     >
-                    <el-form-item label="车牌号:">
+                      <template slot-scope="{ item }">
+                        <div class="name">{{ item.capacityNumber }}</div>
+                      </template>
+                    </el-autocomplete>
+                  </el-form-item>
+                </el-form>
+              </div>
+              <div class="poundNo from">
+                <span class="text">运输订单号:</span>
+                <el-input v-model="orderNumber" disabled></el-input>
+              </div>
+              <div class="poundNo from">
+                <span class="text">路段顺序号:</span>
+                <el-input v-model="lineQuence" @input="oninput"></el-input>
+              </div>
+              <div class="button_box">
+                <el-button
+                  type="primary"
+                  @click="updateLineSqe"
+                  :disabled="disabled"
+                  >确认</el-button
+                >
+              </div>
+            </div>
+          </el-tab-pane>
+          <el-tab-pane label="删除多余实绩" name="third">
+            <div class="admin2">
+              <div class="carrier from">
+                <el-form
+                  :inline="true"
+                  class="demo-form-inline"
+                  label-width="80px"
+                >
+                  <el-form-item label="车牌号:">
                     <el-autocomplete
-                    class="inline-input"
-                    v-model="capacityName"
-                    :fetch-suggestions="querySearchCapacity"
-                    placeholder="车牌号"
-                    :trigger-on-focus="false"
-                    @select="handleSelectCapacity"
+                      class="inline-input"
+                      v-model="capacityName"
+                      :fetch-suggestions="querySearchCapacity"
+                      placeholder="车牌号"
+                      :trigger-on-focus="false"
+                      @select="handleSelectCapacity"
                     >
-                    <template slot-scope="{ item }">
-                    <div class="name">{{ item.capacityNumber }}</div>
-                    </template>
+                      <template slot-scope="{ item }">
+                        <div class="name">{{ item.capacityNumber }}</div>
+                      </template>
                     </el-autocomplete>
-                    </el-form-item>
+                  </el-form-item>
                 </el-form>
+              </div>
+              <div class="poundNo from">
+                <span class="text">运输订单号:</span>
+                <el-input v-model="orderNumber" disabled></el-input>
+              </div>
+              <div class="button_box">
+                <el-button
+                  type="primary"
+                  @click="deleteMoreResult"
+                  :disabled="disabled"
+                  >确认</el-button
+                >
+              </div>
             </div>
-            <div class="poundNo from">
+          </el-tab-pane>
+          <el-tab-pane label="手动车辆排队" name="fourth">
+            <div class="admin2">
+              <div class="carrier from">
+                <el-form
+                  :inline="true"
+                  class="demo-form-inline"
+                  label-width="80px"
+                >
+                  <el-form-item label="车牌号:">
+                    <el-autocomplete
+                      class="inline-input"
+                      v-model="capacityName"
+                      :fetch-suggestions="querySearchCapacity"
+                      placeholder="车牌号"
+                      :trigger-on-focus="false"
+                      @select="handleSelectCapacity"
+                    >
+                      <template slot-scope="{ item }">
+                        <div class="name">{{ item.capacityNumber }}</div>
+                      </template>
+                    </el-autocomplete>
+                  </el-form-item>
+                </el-form>
+              </div>
+              <div class="poundNo from">
                 <span class="text">运输订单号:</span>
                 <el-input v-model="orderNumber" disabled></el-input>
+              </div>
+              <div class="button_box">
+                <el-button
+                  type="primary"
+                  @click="queueClick"
+                  :disabled="disabled"
+                  >确认</el-button
+                >
+              </div>
             </div>
-            <div class="poundNo from">
-                <span class="text">路段顺序号:</span>
-                <el-input v-model="lineQuence" @input="oninput"></el-input>
+          </el-tab-pane>
+          <el-tab-pane label="钢材车辆手动放行" name="fifth">
+            <div class="admin2">
+              <div class="carrier from">
+                <el-form
+                  :inline="true"
+                  class="demo-form-inline"
+                  label-width="80px"
+                >
+                  <el-form-item label="车牌号:">
+                    <el-autocomplete
+                      class="inline-input"
+                      v-model="capacityName"
+                      :fetch-suggestions="querySearchCapacity"
+                      placeholder="车牌号"
+                      :trigger-on-focus="false"
+                      @select="handleSelectCapacity"
+                    >
+                      <template slot-scope="{ item }">
+                        <div class="name">{{ item.capacityNumber }}</div>
+                      </template>
+                    </el-autocomplete>
+                  </el-form-item>
+                </el-form>
+              </div>
+              <div class="poundNo from">
+                <span class="text">运输订单号:</span>
+                <el-input v-model="orderNumber" disabled></el-input>
+              </div>
+              <div class="button_box">
+                <el-button
+                  type="primary"
+                  @click="allowEnfactoryClick"
+                  :disabled="disabled"
+                  >确认</el-button
+                >
+              </div>
             </div>
-            <div class="button_box">
-            <el-button type="primary" @click="updateLineSqe" :disabled = "disabled">确认</el-button>
-          </div>
-          </div>
           </el-tab-pane>
         </el-tabs>
       </div>
@@ -154,347 +280,397 @@
   </div>
 </template>
 <script>
-import { toDateString } from "../app.js"
+import { toDateString, toDateNo } from "../app.js";
 export default {
   data() {
     return {
-        orderNumber:null,
-        first:true,
-        second:true,
-        activeName:"first",
-        capacityName:null,
-        stateCapacity:null,
-        materialList:[],
-        capacityId:null,
-        materialId:null,
-        value1:null,
-        value2:null,
-        disabled:false,
-        orderId:null,
-        firstWeight:null,
-        secondWeight:null,
-        netWeight:null,
-        poundNo:null,
-        truckCalFirstList:[],
-        truckCalSecondList:[],
-        truckCalFirst:null,
-        truckCalSecond:null,
-        switchValue:true,
-        truckCalFirstNum:null,
-        truckCalSecondNum:null,
-        lineQuence:null
+      orderNumber: null,
+      first: true,
+      second: true,
+      activeName: "first",
+      capacityName: null,
+      stateCapacity: null,
+      materialList: [],
+      capacityId: null,
+      materialId: null,
+      value1: null,
+      value2: null,
+      disabled: false,
+      orderId: null,
+      firstWeight: null,
+      secondWeight: null,
+      netWeight: null,
+      poundNo: null,
+      truckCalFirstList: [],
+      truckCalSecondList: [],
+      truckCalFirst: null,
+      truckCalSecond: null,
+      switchValue: true,
+      truckCalFirstNum: null,
+      truckCalSecondNum: null,
+      lineQuence: null
     };
   },
-  created(){ 
+  created() {
+    this.value1 = new Date();
+    this.value2 = new Date();
   },
-  mounted(){
-      this.information()
+  mounted() {
+    this.information();
   },
   methods: {
-    updateLineSqe(){
-        let map = {
-            orderId:this.orderId,
-            orderLineSqe:this.lineQuence
+    allowEnfactoryClick() {},
+    queueClick() {
+      this.axios
+        .post("/api/v1/qms/addQueueResult?vno=" + this.capacityName)
+        .then(res => {
+          if (res.data.code == 200) {
+            this.$message.success("操作成功");
+            this.$router.go(0);
+          }
+        });
+    },
+    deleteMoreResult() {
+      console.log(this.orderNumber);
+      this.axios
+        .post("/api/v1/bp/deleteErrorResult?orderNumber=" + this.orderNumber)
+        .then(res => {
+          if (res.data.code == "200") {
+            this.$message.success("删除成功");
+          }
+        });
+    },
+    updateLineSqe() {
+      let map = {
+        orderId: this.orderId,
+        orderLineSqe: this.lineQuence
+      };
+      this.axios.post("/api/v1/uc/updateLineSqe", map).then(res => {
+        console.log(res.data);
+        if (res.data.code == "200") {
+          this.$message.success("修改路段顺序号成功");
+          this.$router.go(0);
         }
-        this.axios.post("/api/v1/uc/updateLineSqe",map).then((res) =>{
-            console.log(res.data);
-             if(res.data.code == "200"){
-                this.$message.success("修改路段顺序号成功")
-                this.$router.go(0)
-            }
-           
-        })
+      });
     },
-    oninput(){
-
+    oninput() {},
+    onchange() {
+      if (this.switchValue) {
+        this.first = true;
+        this.second = true;
+      } else {
+        this.second = false;
+      }
     },
-    onchange(){
-        console.log(this.switchValue)
-        console.log(typeof(this.switchValue))
-        if(this.switchValue){
-            this.first = true
-            this.second = true
-        }else{
-            this.second = false
+    onchange1() {
+      console.log(this.truckCalFirst);
+      this.truckCalFirstList.forEach(e => {
+        if (this.truckCalFirst == e.value) {
+          this.truckCalFirstNum = e.label;
         }
+      });
     },
-    onchange1(){
-        console.log(this.truckCalFirst)
-        this.truckCalFirstList.forEach(e => {
-            if(this.truckCalFirst == e.value){
-                this.truckCalFirstNum = e.label
-            }
-        });
+    onchange2() {
+      this.truckCalSecondList.forEach(e => {
+        if (this.truckCalSecond == e.value) {
+          this.truckCalSecondNum = e.label;
+        }
+      });
     },
-    onchange2(){
-        console.log(this.truckCalSecond)
-        this.truckCalSecondList.forEach(e => {
-            if(this.truckCalSecond == e.value){
-                this.truckCalSecondNum = e.label
-            }
-        });
-    },        
     //运力弹出层
-    handleSelectCapacity(item){
-      console.log(item)
-      this.capacityId = item.capacityId
-      this.capacityName = item.capacityNumber
-      this.axios.get("/api/v1/uc/getOrderNumber?capacityId=" + this.capacityId).then((res) =>{
-          if(res.data.code == "200"){
-              console.log("----");
-              console.log(res.data)
-              console.log("----");
-              this.orderId = res.data.data.orderId
-              this.orderNumber = res.data.data.orderNumber
-              this.axios.get("/api/v1/uc/getMaterialIdByOrderId?orderId=" + this.orderId).then((res) =>{
-                  if(res.data.code == "200"){
-                      this.materialList = res.data.data
-                  }
-              })
+    handleSelectCapacity(item) {
+      this.capacityId = item.capacityId;
+      this.capacityName = item.capacityNumber;
+      this.axios
+        .get("/api/v1/uc/getOrderNumber?capacityId=" + this.capacityId)
+        .then(res => {
+          if (res.data.code == "200") {
+            this.orderId = res.data.data.orderId;
+            this.orderNumber = res.data.data.orderNumber;
+            this.axios
+              .get("/api/v1/uc/getMaterialIdByOrderId?orderId=" + this.orderId)
+              .then(res => {
+                if (res.data.code == "200") {
+                  this.materialList = res.data.data;
+                }
+              });
           }
-      })
+        });
     },
     //以下是运力边输边查搜索
     querySearchCapacity(queryString, cb) {
-        if(queryString.length < 3){
-            return
-        }
-        this.axios.get('/api/v1/uc/getCapacityNumber?index='+queryString).then((res)=>{
-        if(res.data.code == "200"){
-          var restaurantsCarrier = res.data.data
-          console.log(restaurantsCarrier,"restaurantsCarrier");
-          var results = queryString ? restaurantsCarrier.filter(this.createFilterCarrier(queryString)) :restaurantsCarrier;
-           // 调用 callback 返回建议列表的数据
-          cb(results);
-        }
-        })     
-      },
+      if (queryString.length < 3) {
+        return;
+      }
+      this.axios
+        .get("/api/v1/uc/getCapacityNumber?index=" + queryString)
+        .then(res => {
+          if (res.data.code == "200") {
+            var restaurantsCarrier = res.data.data;
+            console.log(restaurantsCarrier, "restaurantsCarrier");
+            var results = queryString
+              ? restaurantsCarrier.filter(this.createFilterCarrier(queryString))
+              : restaurantsCarrier;
+            // 调用 callback 返回建议列表的数据
+            cb(results);
+          }
+        });
+    },
     createFilterCarrier(queryString) {
-        return (restaurantsCarrier)  =>  {
-          return (restaurantsCarrier.capacityNumber.toLowerCase().indexOf(queryString.toLowerCase()) > -1);
-        };
-      },
+      return restaurantsCarrier => {
+        return (
+          restaurantsCarrier.capacityNumber
+            .toLowerCase()
+            .indexOf(queryString.toLowerCase()) > -1
+        );
+      };
+    },
     //以上是承运商边输边查搜索
-    information(){
-        this.axios.get("/api/v1/uc/getAllCalculateMes").then((res) =>{
-            
-            this.truckCalFirstList = res.data
-            this.truckCalSecondList = res.data
-        })
+    information() {
+      this.axios.get("/api/v1/uc/getAllCalculateMes").then(res => {
+        this.truckCalFirstList = res.data;
+        this.truckCalSecondList = res.data;
+      });
     },
-    onClickConfirm(){
-        if(this.switchValue){
-            if(this.orderNumber==null||this.truckCalFirst==null||this.truckCalSecond==null||
-            this.firstWeight==null||this.secondWeight==null||this.netWeight==null||this.value1==null
-            ||this.value2==null||this.poundNo==null||this.materialId==null){
-                this.$message.warning("请填写所有值!!!")
-                return
-            }
-        }else{
-            if(this.orderNumber==null||this.truckCalFirst==null||
-            this.firstWeight==null||this.value1==null
-            ||this.poundNo==null||this.materialId==null){
-                this.$message.warning("请填写所有值!!!")
-                return
-            }
-        }
-        let mapFirst = {
-            orderNumber:this.orderNumber,
-            resultTareCalculateNumber: this.truckCalFirstNum,
-            resultTareWeight: this.firstWeight + "",
-            resultTareWeightTime: toDateString(this.value1),
-            resultPoundNo: this.poundNo,
-            materialId: this.materialId + ""
-        }
-        let mapSecond = {
-            orderNumber:this.orderNumber,
-            resultTareCalculateNumber: this.truckCalFirstNum,
-            resultCrossCalculateNumber: this.truckCalSecondNum,
-            resultTareWeight: this.firstWeight + "",
-            resultCrossWeight: this.secondWeight + "",
-            resultNetWeight: this.netWeight + "",
-            resultTareWeightTime: toDateString(this.value1),
-            resultCrossWeightTime: toDateString(this.value2),
-            resultPoundNo: this.poundNo,
-            materialId: this.materialId + ""
+    onClickConfirm() {
+      this.poundNo = "jlbl" + toDateNo(new Date());
+      if (this.switchValue) {
+        if (
+          this.orderNumber == null ||
+          this.truckCalFirst == null ||
+          this.truckCalSecond == null ||
+          this.firstWeight == null ||
+          this.secondWeight == null ||
+          this.value1 == null ||
+          this.value2 == null ||
+          this.materialId == null
+        ) {
+          this.$message.warning("请填写所有值!!!");
+          return;
         }
-        var arr = []
-        if(this.switchValue){
-            arr.push(mapSecond)
-        }else{
-            arr.push(mapFirst)
+      } else {
+        if (
+          this.orderNumber == null ||
+          this.truckCalFirst == null ||
+          this.firstWeight == null ||
+          this.value1 == null ||
+          this.materialId == null
+        ) {
+          this.$message.warning("请填写所有值!!!");
+          return;
         }
-        this.axios.post("http://172.16.33.166:8066/api/v1/join/tmstruckweightresult/receiveTmsTruckWeightResult",arr).then((res) =>{
-            if(res.data.code == "200"){
-                this.$message.success("补录计量实绩成功")
-                this.$router.go(0)
-            }
-        })
-    },
-    onClickCancel(){
+      }
+      let mapFirst = {
+        orderNumber: this.orderNumber,
+        resultTareCalculateNumber: this.truckCalFirstNum,
+        resultTareWeight: this.firstWeight + "",
+        resultTareWeightTime: toDateString(this.value1),
+        resultPoundNo: this.poundNo,
+        materialId: this.materialId + ""
+      };
+      //如果首次大于二次,那么是先毛后皮,首次放在毛重上面,二次放在皮重上面
+      if (this.firstWeight >= this.secondWeight) {
+        var mapSecond = {
+          orderNumber: this.orderNumber,
+          resultTareCalculateNumber: this.truckCalSecondNum,
+          resultCrossCalculateNumber: this.truckCalFirstNum,
+          resultTareWeight: this.secondWeight + "",
+          resultCrossWeight: this.firstWeight + "",
+          resultNetWeight:
+            Math.abs(this.firstWeight - this.secondWeight).toFixed(2) + "",
+          resultTareWeightTime: toDateString(this.value2),
+          resultCrossWeightTime: toDateString(this.value1),
+          resultPoundNo: this.poundNo,
+          materialId: this.materialId + ""
+        };
+      } else {
+        //如果首次小于二次,那么是先皮后毛,首次放在皮重上面,二次放在毛重上面
+        var mapSecond = {
+          orderNumber: this.orderNumber,
+          resultTareCalculateNumber: this.truckCalFirstNum,
+          resultCrossCalculateNumber: this.truckCalSecondNum,
+          resultTareWeight: this.firstWeight + "",
+          resultCrossWeight: this.secondWeight + "",
+          resultNetWeight:
+            Math.abs(this.secondWeight - this.firstWeight).toFixed(2) + "",
+          resultTareWeightTime: toDateString(this.value1),
+          resultCrossWeightTime: toDateString(this.value2),
+          resultPoundNo: this.poundNo,
+          materialId: this.materialId + ""
+        };
+      }
+      var arr = [];
+      if (this.switchValue) {
+        arr.push(mapSecond);
+      } else {
+        arr.push(mapFirst);
+      }
+      this.axios.post("/api/v1/uc/recordingWeightResult", arr).then(res => {
+        this.$message.success("补录计量实绩成功");
+        this.$router.go(0);
+      });
     },
-    
-  },
+    onClickCancel() {}
+  }
 };
 </script>
 <style lang="scss">
-.admin{
+.admin {
   .admin1 {
-
+    margin-top: 40px;
+    margin-left: 40px;
+    .switch {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      margin-top: 20px;
+      color: aqua;
+    }
+    .button_box {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      width: 100%;
+      height: 100px;
+    }
+    .admin2 {
       margin-top: 40px;
-      margin-left: 40px;
-      .switch {
-          display: flex;
-          justify-content: center;
-          align-items: center;
-          margin-top: 20px;
-          color: aqua;
+      .from {
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        margin-top: 20px;
+        margin-bottom: 20px;
+      }
+      .carrier {
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        .el-form-item {
+          text-align: right;
+        }
+        .el-autocomplete {
+          width: 250px;
+        }
       }
-      .button_box {
-            display: flex;
-            justify-content: center;
-            align-items: center;
-            width: 100%;
-            height: 100px;
+      .material {
+        display: flex;
+        justify-content: center;
+        margin-top: 20px;
+        margin-right: 100px;
+        .text {
+          display: inline-block;
+          width: 170px;
+          text-align: right;
         }
-      .admin2 {    
-        margin-top: 40px; 
-        .from {
+        .el-input {
+          width: 250px;
+        }
+      }
+      .poundNo {
         display: flex;
+        justify-content: center;
         align-items: center;
+        margin-top: 20px;
+        margin-right: 100px;
+        .text {
+          display: inline-block;
+          width: 170px;
+          text-align: right;
+        }
+        .el-input {
+          width: 250px;
+        }
+      }
+      .block {
+        display: flex;
         justify-content: center;
+        align-items: center;
         margin-top: 20px;
-        margin-bottom: 20px;
+        margin-right: 100px;
+        .el-input {
+          width: 250px;
         }
-        .carrier{
-            display: flex;
-            justify-content: center;
-            align-items: center;
-            .el-form-item {
-                text-align: right;
-            }
-            .el-autocomplete{
-            width: 250px;
-            }
+        .text {
+          display: inline-block;
+          width: 170px;
+          text-align: right;
         }
-        .material {
+      }
+      .truckCalFirst {
         display: flex;
         justify-content: center;
         margin-top: 20px;
         margin-right: 100px;
         .text {
-            display: inline-block;
-            width: 170px;
-            text-align: right;
+          display: inline-block;
+          width: 170px;
+          text-align: right;
         }
         .el-input {
-            width: 250px;
+          width: 250px;
         }
+      }
+      .truckCalSecond {
+        display: flex;
+        justify-content: center;
+        margin-top: 20px;
+        margin-right: 100px;
+        .text {
+          display: inline-block;
+          width: 170px;
+          text-align: right;
         }
-        .poundNo {
-            display: flex;
-            justify-content: center;
-            align-items: center;
-            margin-top: 20px;
-            margin-right: 100px;
-            .text {
-            display: inline-block;
-            width: 170px;
-            text-align: right;
-                  }
-            .el-input {
-            width: 250px;
-                    }
-        }  
-        .block {
-            display: flex;
-            justify-content: center;
-            align-items: center;
-            margin-top: 20px;
-            margin-right: 100px;
-            .el-input {
-                width: 250px;
-            }
-            .text {
-            display: inline-block;
-            width: 170px;
-            text-align: right;
-            }
+        .el-input {
+          width: 250px;
+        }
+      }
+      .secondWeight {
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        margin-top: 20px;
+        margin-right: 100px;
+        .text {
+          display: inline-block;
+          width: 170px;
+          text-align: right;
         }
-        .truckCalFirst {
-            display: flex;
-            justify-content: center;
-            margin-top: 20px;
-            margin-right: 100px;
-            .text {
-                display: inline-block;
-                width: 170px;
-                text-align: right;
-            }
-            .el-input {
-                width: 250px;
-            }
+        .el-input {
+          width: 250px;
         }
-        .truckCalSecond {
-            display: flex;
-            justify-content: center;
-            margin-top: 20px;
-            margin-right: 100px;
-            .text {
-                display: inline-block;
-                width: 170px;
-                text-align: right;
-            }
-            .el-input {
-                width: 250px;
-            }
+      }
+      .firstWeight {
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        margin-top: 20px;
+        margin-right: 100px;
+        .text {
+          display: inline-block;
+          width: 170px;
+          text-align: right;
         }
-        .secondWeight {
-           display: flex;
-            justify-content: center;
-            align-items: center;
-            margin-top: 20px;
-            margin-right: 100px;
-            .text {
-            display: inline-block;
-            width: 170px;
-            text-align: right;
-                  }
-            .el-input {
-            width: 250px;
-                    } 
+        .el-input {
+          width: 250px;
         }
-        .firstWeight {
-            display: flex;
-            justify-content: center;
-            align-items: center;
-            margin-top: 20px;
-            margin-right: 100px;
-            .text {
-            display: inline-block;
-            width: 170px;
-            text-align: right;
-                  }
-            .el-input {
-            width: 250px;
-                    }
+      }
+      .netWeight {
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        margin-top: 20px;
+        margin-right: 100px;
+        .text {
+          display: inline-block;
+          width: 170px;
+          text-align: right;
         }
-        .netWeight {
-            display: flex;
-            justify-content: center;
-            align-items: center;
-            margin-top: 20px;
-            margin-right: 100px;
-            .text {
-            display: inline-block;
-            width: 170px;
-            text-align: right;
-                  }
-            .el-input {
-            width: 250px;
-                    }
+        .el-input {
+          width: 250px;
         }
-      }      
-  }
+      }
+    }
   }
+}
 </style>

+ 18 - 12
src/views/ADMINISTRATORS/router/index.js

@@ -1,29 +1,35 @@
-import Vue from 'vue'
-import Router from 'vue-router'
-import routerBefore from '@/config/routerBefore.js'
+import Vue from "vue";
+import Router from "vue-router";
+import routerBefore from "@/config/routerBefore.js";
 // 主要
-import main from '@/components/main.vue'
+import main from "@/components/main.vue";
 // 系统配置管理
-import ADMINISTRATORS1 from '../components/ADMINISTRATORS1.vue'
+// import ADMINISTRATORS1 from "../components/ADMINISTRATORS1.vue";
 
-Vue.use(Router)
+Vue.use(Router);
 
 const constantRouterMap = [
   {
-    path: '/',
-    name: 'main',
-    meta: {title: '首页', code: 'xtpzgl'},
+    path: "/",
+    name: "main",
+    meta: { title: "首页", code: "xtpzgl" },
     component: main,
-    redirect: {name: 'ADMINISTRATORS1'},
+    redirect: { name: "ADMINISTRATORS1" },
     children: [
-      {path: 'ADMINISTRATORS1', name: 'ADMINISTRATORS1', meta: {code: 'xtpzgl-jggl'}, component: ADMINISTRATORS1}
+      {
+        path: "ADMINISTRATORS1",
+        name: "ADMINISTRATORS1",
+        meta: { code: "xtpzgl-jggl" },
+        component: () =>
+          import("@/views/ADMINISTRATORS/components/ADMINISTRATORS1")
+      }
     ]
   }
 ];
 
 const router = new Router({
   routes: constantRouterMap
-})
+});
 //  before
 routerBefore(router, constantRouterMap);
 

+ 113 - 25
src/views/RMS/components/addCapacity.vue

@@ -24,6 +24,33 @@
           </el-autocomplete>
         </el-form-item>
       </el-form>
+      <el-form :inline="true" class="demo-form-inline" label-width="80px">
+        <el-form-item label="上传行驶证">
+          <el-upload
+            class="upload-demo"
+            ref="upload1"
+            action="/api/v1/rms/uploadCarrier1"
+            :before-upload="beforeUpload"
+            :multiple="false"
+            list-type="picture"
+            :show-file-list="false"
+            :on-success="handleAvatarSuccess"
+            :on-error="onError(1)"
+          >
+            <span class="span"></span>
+            <el-input
+              class="shippingCertificate"
+              placeholder="请选择运输证(必填项)"
+              v-model="shippingCertificate"
+              disabled
+            >
+            </el-input>
+            <el-button size="small" type="primary" @click="upCLick(1)"
+              >点击上传运输证</el-button
+            >
+          </el-upload>
+        </el-form-item>
+      </el-form>
     </div>
 
     <div class="button_box">
@@ -42,15 +69,17 @@ export default {
   components: { PageTitle },
   data() {
     return {
+      driverLicence: "",
       addLoading: false,
       form1: {},
+      shippingCertificate: "",
       form1Initialization: {
         capacityTypeId: 1,
         capacityNumber: "",
         capacityCorlor: "黄",
         capacityOwneris: "否",
         capacityVip: "否",
-        capacityBlacklist: "否",
+        capacityBlacklist: "否"
       },
       value: undefined,
       carrierIds: null,
@@ -60,20 +89,19 @@ export default {
       accessToken: null,
       userCode: null,
       carrierUserId: null,
-      carrierId: null,
+      carrierId: null
     };
   },
   created() {
     this.carrierUserId = getCookie("userId");
     this.form1 = this.form1Initialization;
-    // console.log(this.carrierUserId, "carrierUserId");
   },
   mounted() {
     this.axios
       .post(
         "/api/v1/rms/getCarrierNameBySSOId?carrierSSOId=" + this.carrierUserId
       )
-      .then((res) => {
+      .then(res => {
         if (res.data.code == "200") {
           // console.log(res.data.data);
           if (res.data.data) {
@@ -84,6 +112,56 @@ export default {
       });
   },
   methods: {
+    upCLick(val) {
+      this.num = val;
+    },
+    beforeUpload(file) {
+      this.upBool = true;
+      const isLt2M = file.size < 1024 * 1024 * 0.5;
+      if (!isLt2M) {
+        this.$message.error("上传文件大小不能超过500kb!");
+      } else {
+        let size = file.size / 1024;
+        let _URL = window.URL || window.webkitURL;
+        let img  = new Image();
+        img.src  = _URL.createObjectURL(file);
+      }
+      return isLt2M;
+    },
+    onError(err) {
+      if (this.upBool) {
+        if (this.num == 1) {
+          this.shippingCertificate = null;
+          this.imageUrl1 = null;
+          // this.$message.error("上传失败");
+        } else if (this.num == 2) {
+          this.businessLicense = null;
+          this.imageUrl2 = null;
+          // this.$message.error("上传失败");
+        } else if (this.num == 3) {
+          this.businessLicense1 = null;
+          this.imageUrl3 = null;
+          // this.$message.error("上传失败");
+        }
+      }
+    },
+    handleAvatarSuccess(res, file) {
+      console.log(res, file);
+      if (res.code) {
+        this.upBool = false;
+        if (this.num == 1) {
+          this.driverLicence = res.data;
+          this.shippingCertificate = file.name;
+        } else if (this.num == 2) {
+          this.imageUrl2 = res.data;
+          this.businessLicense = file.name;
+        } else if (this.num == 3) {
+          this.imageUrl3 = res.data;
+          this.businessLicense1 = file.name;
+        }
+        this.$message.success("上传成功");
+      }
+    },
     //承运商弹出层
     handleSelect(item) {
       this.carrierIds = item.carrierId;
@@ -93,7 +171,7 @@ export default {
     querySearch(queryString, cb) {
       this.axios
         .post("/api/v1/uc/getCarrierMesByLike?index=" + queryString)
-        .then((res) => {
+        .then(res => {
           if (res.data.code == "200") {
             // console.log(res.data.data);
             var restaurants = res.data.data;
@@ -107,7 +185,7 @@ export default {
         });
     },
     createFilter(queryString) {
-      return (restaurants) => {
+      return restaurants => {
         return (
           restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
           -1
@@ -116,7 +194,7 @@ export default {
     },
     //以上是承运商边输边查搜索
     deleteUser(userId) {
-      this.axios.delete("pass/v1/sysusers/" + userId).then((res) => {
+      this.axios.delete("pass/v1/sysusers/" + userId).then(res => {
         this.$message.error("添加失败,车牌可能重复");
       });
     },
@@ -130,7 +208,7 @@ export default {
             "&roleId=" +
             "923693668269953024"
         )
-        .then((res) => {
+        .then(res => {
           if (res.code === "0") {
             this.$message.success("操作成功");
             this.saveLoading = false;
@@ -144,19 +222,18 @@ export default {
       // console.log(vehicleNumber);
       var result = false;
       if (vehicleNumber.length == 7) {
-        var express =
-          /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使场领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/;
+        var express = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使场领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/;
         result = express.test(vehicleNumber);
       }
       return result;
     },
     makeSure() {
       this.addLoading = true;
-      // if (!this.isVehicleNumber(this.form1.capacityNumber.toUpperCase())) {
-      //   this.$message.error("车牌号格式不正确");
-      //   this.addLoading = false;
-      //   return;
-      // }
+      if (!this.isVehicleNumber(this.form1.capacityNumber.toUpperCase())) {
+        this.$message.error("车牌号格式不正确");
+        this.addLoading = false;
+        return;
+      }
       if (this.carrierIds == null) {
         this.$message.error("请选择承运商");
         this.addLoading = false;
@@ -169,11 +246,12 @@ export default {
         capacityOwneris: this.form1.capacityOwneris,
         capacityVip: this.form1.capacityVip,
         capacityBlacklist: this.form1.capacityBlacklist,
+        driverLicence: this.driverLicence,
         remark: this.form1.remark,
         carrierId: this.carrierIds,
-        state: this.state,
+        state: this.state
       };
-      console.log(RmsCapacity)
+      console.log(RmsCapacity);
       if (
         RmsCapacity.capacityNumber == null ||
         RmsCapacity.capacityCorlor == null ||
@@ -189,6 +267,7 @@ export default {
         formData.append("userCode", this.form1.capacityNumber.toUpperCase());
         formData.append("orgCode", "yunli");
         formData.append("orgName", "运力");
+
         formData.append("groupId", "506514577756917769");
         formData.append("companyId", "713710108567277568");
         formData.append("orgId", "924126716337721344");
@@ -196,7 +275,7 @@ export default {
         // console.log(typeof formData);
         this.$store
           .dispatch("system/usersManage/addUser", formData)
-          .then((res) => {
+          .then(res => {
             // console.log(res);
             if (res.code === "0") {
               // console.log(res.data.userId);
@@ -205,7 +284,7 @@ export default {
               RmsCapacity.ssoId = res.data.userId;
               this.axios
                 .post("/api/v1/rms/insertCapacity", RmsCapacity)
-                .then((res) => {
+                .then(res => {
                   if (res.data.data == 1) {
                     this.insertRole(this.userId, this.userCode);
                     this.$message.success("添加成功");
@@ -225,13 +304,13 @@ export default {
                   {
                     confirmButtonText: "确定",
                     cancelButtonText: "取消",
-                    type: "warning",
+                    type: "warning"
                   }
                 )
                   .then(() => {
                     this.axios
                       .post("/api/v1/rms/insertCapacity", RmsCapacity)
-                      .then((res) => {
+                      .then(res => {
                         // console.log(res, "res");
                         if (res.data.data == 0) {
                           this.$message.success("新增承运商绑定关系成功!");
@@ -244,7 +323,7 @@ export default {
                   .catch(() => {
                     this.$message({
                       type: "info",
-                      message: "已取消删除",
+                      message: "已取消删除"
                     });
                   });
               }
@@ -256,11 +335,20 @@ export default {
     // 取消
     cancel() {
       this.$router.go(-1);
-    },
-  },
+    }
+  }
 };
 </script>
-<style lang='scss' >
+<style lang="scss">
+.shippingCertificate {
+  width: 200px;
+}
+.el-form--inline .el-form-item__content {
+  display: inline-block;
+  vertical-align: top;
+  position: relative;
+  left: 37px;
+}
 .addCapacity {
   .elForm {
     margin-left: 40%;

+ 91 - 0
src/views/RMS/components/addCargoDep.vue

@@ -0,0 +1,91 @@
+<template>
+  <!-- 添加原料仓库信息 -->
+  <div class="addWagonLoad">
+    <PageTitle>返回</PageTitle>
+    <div class="form-box" style="margin-right: 10rem">
+      <dil-form :formId="383" v-model="form1" ref="from1"></dil-form>
+    </div>
+    <div class="button-box">
+      <el-button @click="cancel">取消</el-button>
+      <el-button type="primary" @click="makeSure">确定</el-button>
+    </div>
+  </div>
+</template>
+<script>
+import PageTitle from "@/components/Page/Title";
+import { getCookie } from "@/utils/util.js";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+      form1: {},
+    };
+  },
+  mounted() {},
+  methods: {
+    makeSure() {
+      let RmsCargoDep = {
+        cargoType: this.form1.cargoType,
+        cargoName: this.form1.cargoName,
+        userId: getCookie("userId"),
+      };
+      if (RmsCargoDep.cargoType == null || RmsCargoDep.cargoName == null)
+        this.$message.error("存在空值!");
+      else
+        this.axios
+          .post("/api/v1/rms/insertCargoDep", RmsCargoDep)
+          .then((res) => {
+            if (res.data.code == 200) {
+              this.$message({
+                type: "success",
+                message: "新增成功!",
+              });
+              this.$router.go(-1);
+            } else {
+              this.$message({
+                type: "warning",
+                message: res.data.data,
+              });
+            }
+          });
+    },
+    // 取消
+    cancel() {
+      this.$router.go(-1);
+    },
+  },
+};
+</script>
+<style lang='scss' >
+.addWagonLoad {
+  .button-box {
+    display: flex;
+    justify-content: center;
+    margin-top: 30px;
+    .el-button {
+      width: 80px;
+      margin-right: 10px;
+    }
+  }
+  .form-box {
+    display: flex;
+    justify-content: center;
+    margin-top: 90px;
+    .el-form-item {
+      display: flex;
+      justify-content: center;
+      .el-form-item__label {
+        display: flex;
+        align-items: center;
+      }
+      .el-form-item__content {
+        .el-input {
+          .el-input__inner {
+            width: 250px;
+          }
+        }
+      }
+    }
+  }
+}
+</style>

+ 11 - 6
src/views/RMS/components/addCarrier.vue

@@ -35,7 +35,7 @@
     <el-upload
       class="upload-demo"
       ref="upload1"
-      action="https://wl.dasteel.cn:32322/api/v1/rms/uploadCarrier1"
+      action="/api/v1/rms/uploadCarrier1"
       :before-upload="beforeUpload"
       :multiple="false"
       list-type="picture"
@@ -55,10 +55,11 @@
         >点击上传运输证</el-button
       >
     </el-upload>
+     <!-- action="https://wl.dasteel.cn:32322/api/v1/rms/uploadCarrier1" -->
     <el-upload
       class="upload-demo"
       ref="upload2"
-      action="https://wl.dasteel.cn:32322/api/v1/rms/uploadCarrier1"
+      action="/api/v1/rms/uploadCarrier1"
       :before-upload="beforeUpload"
       :multiple="false"
       list-type="picture"
@@ -81,7 +82,7 @@
     <el-upload
       class="upload-demo"
       ref="upload3"
-      action="https://wl.dasteel.cn:32322/api/v1/rms/uploadCarrier1"
+      action="/api/v1/rms/uploadCarrier1"
       :before-upload="beforeUpload"
       :multiple="false"
       list-type="picture"
@@ -233,6 +234,11 @@ export default {
       this.bidAreaId = selection.bidAreaId;
     },
     makeSure() {
+      console.log(this.input.length)
+      if(this.input.length > 14){
+        this.$message.error("账号长度不能大于十四个字")
+        return
+      }
       let status = false;
       this.form1.carrierContactNumber = parseInt(this.form1.carrierContactNumber);
       if (!this.input) {
@@ -279,7 +285,6 @@ export default {
         this.$store
           .dispatch("system/usersManage/addUser", fromData)
           .then((res) => {
-            console.log(1)
             if (res.code === "0") {
               let userId = res.data.userId;
               this.axios
@@ -291,7 +296,6 @@ export default {
                     "&roleId=924449091658846208"
                 )
                 .then((res) => {
-                  console.log(2)
                   if (res.code == "0") {
                     //图片地址
                     let imageUrls = {
@@ -360,7 +364,7 @@ export default {
       margin-right: 10px;
       width: 40px;
       position: relative;
-      left: 40px;
+       left: 40px;
     }
     .input {
       width: 250px;
@@ -414,6 +418,7 @@ export default {
   .site{
     position: relative;
     left: -50px;
+  
   }
   span.text {
     position: relative;

+ 166 - 0
src/views/RMS/components/addContractPrice.vue

@@ -0,0 +1,166 @@
+<template>
+  <!-- 添加合同单价信息 -->
+  <div class="addWagonLoad">
+    <PageTitle>返回</PageTitle>
+    <div class="form-box">
+      <!-- <dil-form :formId="271" v-model="form1" ref="from1"></dil-form> -->
+      <el-form v-model="form">
+          <div class="preview-group">
+            <el-form-item label="合同号">
+                <el-input v-model="form.contractNo"></el-input>
+            </el-form-item>
+             <el-form-item label="单价">
+                <el-input v-model="form.unitPrice" type="number"></el-input>
+            </el-form-item>
+            <el-form-item label="港口">
+              <el-select v-model="form.portId" filterable>
+                <el-option
+                  v-for="port in ports"
+                  :key="port.portId"
+                  :label="port.portName"
+                  :value="port.portId"
+                >
+                </el-option>
+              </el-select>
+            </el-form-item>
+             <el-form-item label="起始日期">
+                 <el-date-picker
+                    v-model="form.startTime"
+                    type="datetime"
+                    placeholder="选择日期">
+                </el-date-picker>
+            </el-form-item>
+             <el-form-item label="截止日期">
+                 <el-date-picker
+                    v-model="form.endTime"
+                    type="datetime"
+                    placeholder="选择日期">
+                </el-date-picker>
+            </el-form-item>
+          </div>
+     </el-form>
+    </div>
+    <div class="button-box">
+      <el-button @click="cancel">取消</el-button>
+      <el-button type="primary" @click="makeSure" :loading="isLoading">确定</el-button>
+    </div>
+  </div>
+</template>
+
+<script>
+import PageTitle from "@/components/Page/Title";
+import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+      form: {
+        portId:null,
+        contractNo:null,
+        unitPrice:null,
+        startTime:null,
+        endTime:null,
+        userId:getCookie("userId")
+      },
+      ports:[],
+      isLoading:false
+    };
+  },
+  mounted() {
+    this.getPorts();
+  },
+  methods: {
+    makeSure() {
+      this.isLoading=true;
+      if (this.form.contractNo == null || 
+      this.form.contractNo =='' ||
+      this.form.unitPrice =='' ||
+      this.form.unitPrice == null ||
+      this.form.startTime == null || 
+      this.form.endTime == null){
+        this.$message.error("存在空值!");
+        this.isLoading=false;
+      }else if(this.form.startTime>=this.form.endTime){
+        this.$message.error("起始日期必须小于截止日期!");
+        this.isLoading=false;
+      }
+      else{
+         let map=this.form;
+         map.userId=getCookie("userId");
+         console.log(map);
+         map.startTime = sjTime(this.form.startTime);
+         map.endTime = sjTime(this.form.endTime);
+         this.axios.post("/api/v1/rms/insertBmsshipContractPrice",map).then(res => {
+          if (res.data.code == 200) {
+            this.$message({
+              type: "success",
+              message: "新增成功!"
+            });
+            this.cancel();
+          } else {
+            this.$message.error(res.data.data);
+          }
+        }).then(()=>{
+           this.isLoading=false;
+        });
+      }
+       
+    },
+    // 取消
+    cancel() {
+      this.$router.go(-1);
+    },
+    //查询港口id
+    getPorts(){
+        this.axios.post("/api/v1/rms/getPortName?index=").then(res => {
+          if (res.data.code == 200) {
+            this.ports=res.data.data;
+            console.log(this.ports);
+          } else {
+            this.$message.error(res.data.data);
+          }
+        }).then(()=>{
+          let copy=this.$route.query;
+          console.log("copy:",copy);
+          if(copy){
+            if(copy.portId){
+              copy.portId=copy.portId * 1;
+            }
+            this.$set(this,"form",copy);
+          }
+        });
+    }
+  }
+};
+</script>
+<style lang="scss">
+.button-box {
+  display: flex;
+  justify-content: center;
+  margin: 20px;
+  .el-button {
+    width: 80px;
+    margin: 10px;
+  }
+}
+.form-box {
+  display: flex;
+  justify-content: center;
+  .el-form-item {
+    display: flex;
+    justify-content: center;
+    .el-form-item__label {
+      display: flex;
+      align-items: center;
+    }
+    .el-form-item__content {
+      .el-input {
+        .el-input__inner {
+          width: 250px;
+        }
+      }
+    }
+  }
+}
+</style>

+ 75 - 0
src/views/RMS/components/addInwardContractMaterial.vue

@@ -0,0 +1,75 @@
+<template>
+  <!-- 添加港口信息 -->
+  <div class="addWagonLoad">
+    <PageTitle>返回</PageTitle>
+    <div class="form-box">
+      <dil-form :formId="382" v-model="form1" ref="from1"></dil-form>
+    </div>
+    <div class="button-box">
+      <el-button @click="cancel">取消</el-button>
+      <el-button type="primary" @click="makeSure">确定</el-button>
+    </div>
+  </div>
+</template>
+
+<script>
+import PageTitle from "@/components/Page/Title";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+      form1: {}
+    };
+  },
+  mounted() {},
+  methods: {
+    makeSure() {
+      console.log(this.form1);
+      this.axios
+        .post("/api/v1/rms/insertMaterialType", this.form1)
+        .then(res => {
+          if (res.data.code == 0) {
+            this.$message.success("新增成功");
+            this.$router.go(-1);
+          } else {
+            this.$message.warning("请重试!");
+            this.$router.go(0);
+          }
+        });
+    },
+    // 取消
+    cancel() {
+      this.$router.go(-1);
+    }
+  }
+};
+</script>
+<style lang="scss">
+.button-box {
+  display: flex;
+  justify-content: center;
+  .el-button {
+    width: 80px;
+    margin-right: 10px;
+  }
+}
+.form-box {
+  display: flex;
+  justify-content: center;
+  .el-form-item {
+    display: flex;
+    justify-content: center;
+    .el-form-item__label {
+      display: flex;
+      align-items: center;
+    }
+    .el-form-item__content {
+      .el-input {
+        .el-input__inner {
+          width: 250px;
+        }
+      }
+    }
+  }
+}
+</style>

+ 101 - 94
src/views/RMS/components/addMaterial.vue

@@ -2,36 +2,37 @@
   <!-- 添加物资信息 -->
   <div class="addWagonLoad">
     <PageTitle>返回</PageTitle>
-     <div class="form-box" style="margin-right: 10rem">
-        <dil-form :formId="326" v-model="form1" ref="from1"></dil-form>
-      </div>
-        <div class="form-box f1">
-          <el-form :inline="true" :model="formInline" class="demo-form-inline">
-  <div class="disableBox">
-  <el-form-item>
-    <el-input v-model="materialTypeName" disabled>  
-    </el-input>
-  </el-form-item>
-  <el-form-item>
-    <el-button type="primary" @click="drawer = true">物资种类</el-button>
-  </el-form-item>
-  </div>
-    </el-form>
+    <div class="form-box" style="margin-right: 10rem">
+      <dil-form :formId="326" v-model="form1" ref="from1"></dil-form>
+    </div>
+    <div class="form-box f1">
+      <el-input v-model="materialTypeName" disabled> </el-input>
+      <el-button type="primary" @click="openDrawer">物资种类</el-button>
     </div>
-    <el-drawer
-      :visible.sync="drawer"
-      :direction="direction"
-      :before-close="handleClose">
+    <div class="eldrawer">
+      <el-drawer
+        :visible.sync="drawer"
+        :direction="direction"
+        :before-close="handleClose"
+      >
         <el-input
-            placeholder="请输入内容"
-            v-model="inputText"
-            clearable>
-          </el-input>
-          <el-button type="primary" class="btn" @click="onclick">
-            <i class="el-icon-search"></i>查询
-          </el-button>
-            <div><dilTable v-bind.sync="options" @radio-change="currentRadioChange" ></dilTable></div>
-</el-drawer>
+          placeholder="请输入内容"
+          v-model="inputText"
+          clearable
+          style="width:250px"
+        >
+        </el-input>
+        <el-button type="primary" class="btn" @click="onclick">
+          <i class="el-icon-search"></i>查询
+        </el-button>
+        <div>
+          <dilTable
+            v-bind.sync="options"
+            @radio-change="currentRadioChange"
+          ></dilTable>
+        </div>
+      </el-drawer>
+    </div>
     <div class="button-box">
       <el-button @click="cancel">取消</el-button>
       <el-button type="primary" @click="makeSure">确定</el-button>
@@ -48,58 +49,58 @@ export default {
     return {
       form1: {},
       drawer: false,
-      direction: 'rtl',
-      inputText:"",
-      materialTypeId:"",
-      options:{
-        requestUrl:"/api/v1/rms/getMaterialTypeList?apiId=376",
-        selectionType:"radio",
-        mapList:[]
-      }
+      direction: "rtl",
+      inputText: "",
+      materialTypeId: "",
+      materialTypeName: null,
+      options: {
+        requestUrl: "/api/v1/rms/getMaterialTypeList?apiId=376",
+        selectionType: "radio"
+      },
+      mapList: {}
     };
   },
   mounted() {},
   methods: {
-      currentRadioChange(selection){
-      this.mapList=selection,
+    currentRadioChange(selection) {
+      console.log(selection);
+      this.mapList = selection;
       this.materialTypeId = this.mapList.materialTypeId;
-      console.log(this.mapList)
-      this.materialTypeName=this.mapList.materialTypeName
+      console.log(this.mapList);
+      this.materialTypeName = this.mapList.materialTypeName;
+    },
+    openDrawer() {
+      this.options.requestUrl =
+        "/api/v1/rms/getMaterialTypeList?apiId=376&i=" + new Date();
+      this.drawer = true;
+      this.inputText = null;
     },
-    onclick(){
-      this.options.requestUrl="/api/v1/rms/getMaterialTypeList?apiId=376&con=" +this.inputText;
+    onclick() {
+      this.options.requestUrl =
+        "/api/v1/rms/getMaterialTypeList?apiId=376&con=" + this.inputText;
     },
-     makeSure() {  
-       
+    makeSure() {
       let RmsMaterial = {
-        materialName:this.form1.materialName,
-        materialSpecification:this.form1.materialSpecification,
-        materialModel:this.form1.materialModel,
-        materialTypeId:this.materialTypeId,
-        unitOfMeasureId:this.form1.unitOfMeasureId,
-        materialTheoreticalWeight:this.form1.materialTheoreticalWeight,
+        materialName: this.form1.materialName,
+        materialSpecification: this.form1.materialSpecification,
+        materialModel: this.form1.materialModel,
+        materialTypeId: this.materialTypeId,
+        unitOfMeasureId: this.form1.unitOfMeasureId,
+        materialTheoreticalWeight: this.form1.materialTheoreticalWeight
       };
-    if(
-        RmsMaterial.materialName==null
-      )this.$message.error("存在空值!");
+      if (RmsMaterial.materialName == null) this.$message.error("存在空值!");
       else
-      this.axios
-        .post(
-          "/api/v1/rms/insertMaterial",
-           RmsMaterial
-        )
-        .then((res) => {
+        this.axios.post("/api/v1/rms/insertMaterial", RmsMaterial).then(res => {
           if (res.data.code == 200) {
             this.$message({
               type: "success",
-              message: "新增成功!",
+              message: "新增成功!"
             });
             // this.$refs.table.refreshData();
             this.$router.go(-1);
-          }else if(res.data.code == '201'){
-            this.$message.warning("该物资已存在")
-          } 
-          else {
+          } else if (res.data.code == "201") {
+            this.$message.warning("该物资已存在");
+          } else {
             this.$message.error("新增失败");
           }
           //this.$refs['table'].resetField();
@@ -108,27 +109,27 @@ export default {
     // 取消
     cancel() {
       this.$router.go(-1);
-    },
+    }
   },
-   handleClose(done) {
-        this.$confirm('确认关闭?')
-          .then(_ => {
-            done();
-          })
-          .catch(_ => {});
-      }
+  handleClose(done) {
+    this.$confirm("确认关闭?")
+      .then(_ => {
+        done();
+      })
+      .catch(_ => {});
+  }
 };
 </script>
-<style lang='scss' >
- .button-box{
-    display: flex;
-    justify-content: center;
-    .el-button{
-      width: 80px;
-      margin-right: 10px;
-    }
+<style lang="scss">
+.button-box {
+  display: flex;
+  justify-content: center;
+  .el-button {
+    width: 80px;
+    margin-right: 10px;
   }
-.disableBox{
+}
+.disableBox {
   display: flex;
   text-align: center;
   align-items: center;
@@ -143,7 +144,7 @@ export default {
 .input {
   margin-left: 90px;
 }
-.common{
+.common {
   font-weight: 700;
   font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
     Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
@@ -151,35 +152,41 @@ export default {
   cursor: default;
   color: #2c3e50;
 }
-.f1{
-  margin-top: -2.5rem;
-  margin-left: 22.3rem;
+.f1 {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  margin-top: 20px;
+  .el-input {
+    width: 250px;
+  }
 }
-.f11{
+.f11 {
   margin-top: -3rem;
   // margin-left: 29rem;
 }
-.f2{
+.f2 {
   margin-top: -2.5rem;
   margin-left: 20.7rem;
 }
-.f3{
+.f3 {
   margin-top: -2.5rem;
   margin-left: 25rem;
 }
-.form-box{
+.form-box {
   display: flex;
   justify-content: center;
-  .el-form-item{
+  align-items: center;
+  .el-form-item {
     display: flex;
     justify-content: center;
-    .el-form-item__label{
+    .el-form-item__label {
       display: flex;
       align-items: center;
     }
-    .el-form-item__content{
-      .el-input{
-        .el-input__inner{
+    .el-form-item__content {
+      .el-input {
+        .el-input__inner {
           width: 250px;
         }
       }

+ 18 - 18
src/views/RMS/components/addOtherCapacity.vue

@@ -50,7 +50,7 @@ export default {
         capacityCorlor: "黄",
         capacityOwneris: "否",
         capacityVip: "否",
-        capacityBlacklist: "否",
+        capacityBlacklist: "否"
       },
       value: undefined,
       carrierIds: null,
@@ -60,7 +60,7 @@ export default {
       accessToken: null,
       userCode: null,
       carrierUserId: null,
-      carrierId: null,
+      carrierId: null
     };
   },
   created() {
@@ -73,7 +73,7 @@ export default {
       .post(
         "/api/v1/rms/getCarrierNameBySSOId?carrierSSOId=" + this.carrierUserId
       )
-      .then((res) => {
+      .then(res => {
         if (res.data.code == "200") {
           // console.log(res.data.data);
           if (res.data.data) {
@@ -93,7 +93,7 @@ export default {
     querySearch(queryString, cb) {
       this.axios
         .post("/api/v1/uc/getCarrierMesByLike?index=" + queryString)
-        .then((res) => {
+        .then(res => {
           if (res.data.code == "200") {
             // console.log(res.data.data);
             var restaurants = res.data.data;
@@ -107,7 +107,7 @@ export default {
         });
     },
     createFilter(queryString) {
-      return (restaurants) => {
+      return restaurants => {
         return (
           restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
           -1
@@ -116,7 +116,7 @@ export default {
     },
     //以上是承运商边输边查搜索
     deleteUser(userId) {
-      this.axios.delete("pass/v1/sysusers/" + userId).then((res) => {
+      this.axios.delete("pass/v1/sysusers/" + userId).then(res => {
         this.$message.error("添加失败,车牌可能重复");
       });
     },
@@ -128,9 +128,9 @@ export default {
             "&userCode=" +
             userCode +
             "&roleId=" +
-            "923693668269953024"
+            "956144357092757504"
         )
-        .then((res) => {
+        .then(res => {
           if (res.code === "0") {
             this.$message.success("操作成功");
             this.saveLoading = false;
@@ -147,7 +147,7 @@ export default {
       //   this.addLoading = false;
       //   return;
       // }
-      if(this.form1.capacityNumber.length<=2){
+      if (this.form1.capacityNumber.length <= 2) {
         this.$message.error("车牌号必须大于三位");
         this.addLoading = false;
         return;
@@ -166,7 +166,7 @@ export default {
         capacityBlacklist: this.form1.capacityBlacklist,
         remark: this.form1.remark,
         carrierId: this.carrierIds,
-        state: this.state,
+        state: this.state
       };
       if (
         RmsCapacity.capacityNumber == null ||
@@ -190,7 +190,7 @@ export default {
         // console.log(typeof formData);
         this.$store
           .dispatch("system/usersManage/addUser", formData)
-          .then((res) => {
+          .then(res => {
             // console.log(res);
             if (res.code === "0") {
               // console.log(res.data.userId);
@@ -199,7 +199,7 @@ export default {
               RmsCapacity.ssoId = res.data.userId;
               this.axios
                 .post("/api/v1/rms/insertCapacity", RmsCapacity)
-                .then((res) => {
+                .then(res => {
                   if (res.data.data == 1) {
                     this.insertRole(this.userId, this.userCode);
                     this.$message.success("添加成功");
@@ -219,13 +219,13 @@ export default {
                   {
                     confirmButtonText: "确定",
                     cancelButtonText: "取消",
-                    type: "warning",
+                    type: "warning"
                   }
                 )
                   .then(() => {
                     this.axios
                       .post("/api/v1/rms/insertCapacity", RmsCapacity)
-                      .then((res) => {
+                      .then(res => {
                         // console.log(res, "res");
                         if (res.data.data == 0) {
                           this.$message.success("新增承运商绑定关系成功!");
@@ -238,7 +238,7 @@ export default {
                   .catch(() => {
                     this.$message({
                       type: "info",
-                      message: "已取消删除",
+                      message: "已取消删除"
                     });
                   });
               }
@@ -250,11 +250,11 @@ export default {
     // 取消
     cancel() {
       this.$router.go(-1);
-    },
-  },
+    }
+  }
 };
 </script>
-<style lang='scss' >
+<style lang="scss">
 .addCapacity {
   .elForm {
     margin-left: 40%;

+ 7 - 6
src/views/RMS/components/addPersonnel.vue

@@ -196,6 +196,7 @@ export default {
             this.form1.shipperId=='' ||
             this.form1.personnelShifts=='' ||
             this.form1.personnelTeam=='' ||
+            this.form1.ConcatTelephone==''||
             userInfo.orgName=='' ||
             userInfo.orgCode=='' ||
             userInfo.orgId=='' ||
@@ -218,7 +219,7 @@ export default {
               //保存权限表中的用户主键Id
               this.personnelSsoId = res.data.userId;
               //再新增RMS_PERSONNEL表信息
-              let rmsPersonnel = {
+              let map1 = {
                 personnelJobNumber : this.form1.personnelJobNumber,
                 personnelPost : this.form1.personnelPost,
                 personnelName : this.form1.personnelName,
@@ -226,21 +227,21 @@ export default {
                 // personnelWorkshopid : this.form1.personnelWorkshopid,
                 personnelShifts : this.form1.personnelShifts,
                 personnelTeam : this.form1.personnelTeam,
-                personnelSsoId : this.personnelSsoId
+                personnelSsoId : this.personnelSsoId,
+                //联系电话
+                ConcatTelephone : this.form1.ConcatTelephone,
+                userId: getCookie("userId"),
               }
               //  console.log("rmsPersonnel",rmsPersonnel)
-                  this.axios.post('/api/v1/rms/addPersonnel',rmsPersonnel)
+                  this.axios.post('/api/v1/rms/addPersonnel',map1)
                   .then((res)=>{
-                              // console.log("Personnel",res)
                         if (res.data.code == 200) {
                         this.$message({
                           type: "success",
                           message: "新增成功!",
                         });
                         // this.$refs.table.refreshData();
-                        
                         //最后新增角色赋权表
-
                           this.axios.post('pass/v1/sysuserroles/addUserroles?userId='
                           +this.personnelSsoId+'&userCode='+this.form1.personnelJobNumber+'&roleId='+this.value3)
                           .then((res)=>{

+ 33 - 44
src/views/RMS/components/addPort.vue

@@ -2,9 +2,9 @@
   <!-- 添加港口信息 -->
   <div class="addWagonLoad">
     <PageTitle>返回</PageTitle>
-     <div class="form-box" >
-        <dil-form :formId="271" v-model="form1" ref="from1"></dil-form>
-      </div>
+    <div class="form-box">
+      <dil-form :formId="271" v-model="form1" ref="from1"></dil-form>
+    </div>
     <div class="button-box">
       <el-button @click="cancel">取消</el-button>
       <el-button type="primary" @click="makeSure">确定</el-button>
@@ -18,78 +18,67 @@ export default {
   components: { PageTitle },
   data() {
     return {
-        portName:'',
+      portName: "",
       form1: {},
-      value: undefined,
+      value: undefined
     };
   },
   mounted() {},
-  methods: {                
-     makeSure() {
-        console.log(this.form1)
-    //   let RmsCapacity = {
-          
-    //   };
-       let RmsCapacity=this.form1;
-      console.log(RmsCapacity)
-      if (
-        RmsCapacity.portName==null||
-        RmsCapacity.portTypeId==null
-        
-      ) this.$message.error("存在空值!");
-      else 
-      this.axios
-        .post(
-          "/api/v1/rms/insertPort",
-           RmsCapacity
-        )
-        .then((res) => {
+  methods: {
+    makeSure() {
+  
+      let RmsCapacity = this.form1;
+      console.log(RmsCapacity);
+      if (RmsCapacity.portName == null || RmsCapacity.portTypeId == null)
+        this.$message.error("存在空值!");
+      else
+        this.axios.post("/api/v1/rms/insertPort", RmsCapacity).then(res => {
           if (res.data.code == 200) {
             this.$message({
               type: "success",
-              message: "新增成功!",
+              message: "新增成功!"
             });
             // this.$refs.table.refreshData();
             this.$router.go(-1);
           } else {
             this.$message.error("新增失败,可能存在重复!");
           }
-         // this.$refs['table'].resetField();
+          // this.$refs['table'].resetField();
         });
     },
     // 取消
     cancel() {
       this.$router.go(-1);
-    },
-  },
+    }
+  }
 };
 </script>
-<style lang='scss' >
- .button-box{
-    display: flex;
-    justify-content: center;
-    .el-button{
-      width: 80px;
-      margin-right: 10px;
-    }
+<style lang="scss">
+.button-box {
+  display: flex;
+  justify-content: center;
+  .el-button {
+    width: 80px;
+    margin-right: 10px;
   }
-.form-box{
+}
+.form-box {
   display: flex;
   justify-content: center;
-  .el-form-item{
+  .el-form-item {
     display: flex;
     justify-content: center;
-    .el-form-item__label{
+    .el-form-item__label {
       display: flex;
       align-items: center;
     }
-    .el-form-item__content{
-      .el-input{
-        .el-input__inner{
+    .el-form-item__content {
+      .el-input {
+        .el-input__inner {
           width: 250px;
         }
       }
     }
   }
 }
-</style>
+</style>

+ 44 - 47
src/views/RMS/components/addRawWarehouse.vue

@@ -2,9 +2,9 @@
   <!-- 添加原料仓库信息 -->
   <div class="addWagonLoad">
     <PageTitle>返回</PageTitle>
-     <div class="form-box" style="margin-right: 10rem">
-        <dil-form :formId="315" v-model="form1" ref="from1"></dil-form>
-      </div>
+    <div class="form-box" style="margin-right: 10rem">
+      <dil-form :formId="315" v-model="form1" ref="from1"></dil-form>
+    </div>
     <div class="button-box">
       <el-button @click="cancel">取消</el-button>
       <el-button type="primary" @click="makeSure">确定</el-button>
@@ -14,46 +14,43 @@
 
 <script>
 import PageTitle from "@/components/Page/Title";
-
+import { getCookie } from "@/utils/util.js";
 export default {
   components: { PageTitle },
   data() {
     return {
       form1: {},
       // value: undefined,
-     
     };
   },
   mounted() {},
   methods: {
-     makeSure() {
-       console.log(this.from1)
-       let RmsWarehouse = {
-         warehouseName:this.form1.warehouseName,
-         shipperId:this.form1.shipperId,
-       };
-       if(
-         RmsWarehouse.warehouseName==null ||
-         RmsWarehouse.shipperId==null
-       )this.$message.error("存在空值!");
-    //  console.log(this.RmsWarehouse)
-      this.axios
-        .post(
-          "/api/v1/rms/insertWarehouse", RmsWarehouse
-        )
-        .then((res) => {
-          if (res.data.code == 200) {
-            this.$message({
-              type: "success",
-              message: "新增成功!",
-            });
-            // this.$refs.table.refreshData();
-            this.$router.go(-1);
-          } else {
-            this.$message.error("新增失败,可能存在重复!");
-          }
-        //  this.$refs['table'].resetField();
-        });
+    makeSure() {
+      // console.log(this.from1);
+      let RmsWarehouse = {
+        warehouseName: this.form1.warehouseName,
+        shipperId: this.form1.shipperId,
+        userId: getCookie("userId"),
+      };
+      if (RmsWarehouse.warehouseName == null || RmsWarehouse.shipperId == null)
+        this.$message.error("存在空值!");
+      else
+        this.axios
+          .post("/api/v1/rms/insertWarehouse", RmsWarehouse)
+          .then((res) => {
+            if (res.data.code == 200) {
+              this.$message({
+                type: "success",
+                message: "新增成功!",
+              });
+              this.$router.go(-1);
+            } else {
+              this.$message({
+                type: "warning",
+                message: res.data.data,
+              });
+            }
+          });
     },
     // 取消
     cancel() {
@@ -62,28 +59,28 @@ export default {
   },
 };
 </script>
-<style lang='scss' >
- .button-box{
-    display: flex;
-    justify-content: center;
-    .el-button{
-      width: 80px;
-      margin-right: 10px;
-    }
+<style lang='scss'>
+.button-box {
+  display: flex;
+  justify-content: center;
+  .el-button {
+    width: 80px;
+    margin-right: 10px;
   }
-.form-box{
+}
+.form-box {
   display: flex;
   justify-content: center;
-  .el-form-item{
+  .el-form-item {
     display: flex;
     justify-content: center;
-    .el-form-item__label{
+    .el-form-item__label {
       display: flex;
       align-items: center;
     }
-    .el-form-item__content{
-      .el-input{
-        .el-input__inner{
+    .el-form-item__content {
+      .el-input {
+        .el-input__inner {
           width: 250px;
         }
       }

+ 180 - 101
src/views/RMS/components/capacity.vue

@@ -2,22 +2,25 @@
 <template>
   <div class="steel_inbound">
     <div class="sache">
-      <el-input
-        placeholder="请输入内容"
-        v-model="textInput"
-        clearable>
+      <el-input placeholder="请输入内容" v-model="textInput" clearable>
       </el-input>
-      <el-button type="primary" class="btn" @click="onclick" :loading="selectLoading">
+      <el-button
+        type="primary"
+        class="btn"
+        @click="onclick"
+        :loading="selectLoading"
+      >
         <i class="el-icon-search"></i>查询
       </el-button>
-       <el-button type="primary" class="btn" @click="toInsert">
+      <el-button type="primary" class="btn" @click="toInsert">
         <i class="el-icon-plus"></i>新增
       </el-button>
       <el-button type="primary" class="btn" @click="toInsert1">
         <i class="el-icon-plus"></i>新增特殊车牌
       </el-button>
-      <el-button type="primary" @click="exportData()"><i class="el-icon-download"></i>导出(Excel)</el-button>
-
+      <el-button type="primary" @click="exportData()"
+        ><i class="el-icon-download"></i>导出(Excel)</el-button
+      >
     </div>
     <div class="table">
       <dilTable
@@ -29,20 +32,29 @@
       >
         <el-table-column fixed="right" label="操作" width="100">
           <template slot-scope="scope">
-            <!-- <el-button
+            <el-button
               type="text"
               size="small"
-              @click="updateCapacity(scope.row.capacityId)"
+              @click="updateCapacity(scope.row.capacityCarrierId)"
             >
-              修改
-            </el-button> -->
+              修改备注
+            </el-button>
             <el-button
               type="text"
               size="small"
               @click="deleteCapacity(scope.row)"
-              v-if="show==true">
+              v-if="show == true"
+            >
               删除
             </el-button>
+            <el-button
+              type="text"
+              size="small"
+              @click="showCapacity(scope.row.capacityId)"
+              v-if="show == false"
+            >
+              查看详情
+            </el-button>
           </template>
         </el-table-column>
       </dilTable>
@@ -52,129 +64,196 @@
 <script>
 import { getCookie } from "@/utils/util.js";
 export default {
-  data(){
-    return{
-     selectLoading:false,
-     isKuang:false,
-     tableloading:false,
-     show:false,
-     name:"homeworkPath",
-     textInput:"",
-     restaurants: [],
-     ssoId:null,
-     options:{
+  data() {
+    return {
+      selectLoading: false,
+      isKuang: false,
+      tableloading: false,
+      show: false,
+      name: "homeworkPath",
+      textInput: "",
+      restaurants: [],
+      ssoId: null,
+      options: {
         // first请求数据的地址
-        requestUrl: "",
-      },
-    }
+        requestUrl: ""
+      }
+    };
   },
-  created(){
-    if(getCookie("orgCode") == "wuliuchuyunzhongxin" || getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "chengyunshang"){
-        this.show = true
+  created() {
+    if (
+      getCookie("orgCode") == "wuliuchuyunzhongxin" ||
+      getCookie("orgCode") == "dagangadmin" ||
+      getCookie("orgCode") == "zidonghuabu" ||
+      getCookie("orgCode") == "chengyunshang"
+    ) {
+      this.show = true;
+    }
+    if (getCookie("orgCode") == "chengyunshang") {
+      this.options.requestUrl =
+        "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId=" +
+        getCookie("userId");
+    } else if (getCookie("orgCode") == "baohua") {
+      this.options.requestUrl =
+        "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId=" +
+        getCookie("userId");
+    } else {
+      this.options.requestUrl =
+        "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId=" + null;
     }
-    if(getCookie("orgCode") == "chengyunshang"){
-      this.options.requestUrl = "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId="+ getCookie("userId");
-    }else if(getCookie("orgCode") == "baohua"){
-      this.options.requestUrl = "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId=" + getCookie("userId");
-     }else{
-      this.options.requestUrl = "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId=" + null;
-     } 
   },
-  methods:{
-    func(res){
-      if(this.tableloading){
+  methods: {
+    func(res) {
+      if (this.tableloading) {
         this.tableloading = false;
       }
-      if(this.isKuang){
+      if (this.isKuang) {
         this.isKuang = false;
       }
-      if(this.selectLoading){
+      if (this.selectLoading) {
         this.selectLoading = false;
       }
     },
-    onclick(){
+    onclick() {
       this.isKuang = true;
       this.tableloading = true;
       this.selectLoading = true;
-      if(this.textInput){
-        if(getCookie("orgCode") == "chengyunshang"){
-          this.options.requestUrl = "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId="+ getCookie("userId") +"&con=" +this.textInput + "&i=" + new Date();
-        }else if(getCookie("orgCode") == "baohua"){
-          this.options.requestUrl = "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId=" + getCookie("userId") + this.textInput + "&i=" + new Date();
-        }else{
-          this.options.requestUrl = "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId="+ null +"&con=" +this.textInput + "&i=" + new Date();
+      if (this.textInput) {
+        if (getCookie("orgCode") == "chengyunshang") {
+          this.options.requestUrl =
+            "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId=" +
+            getCookie("userId") +
+            "&con=" +
+            this.textInput +
+            "&i=" +
+            new Date();
+        } else if (getCookie("orgCode") == "baohua") {
+          this.options.requestUrl =
+            "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId=" +
+            getCookie("userId") +
+            this.textInput +
+            "&i=" +
+            new Date();
+        } else {
+          this.options.requestUrl =
+            "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId=" +
+            null +
+            "&con=" +
+            this.textInput +
+            "&i=" +
+            new Date();
         }
-      }else{
-        if(getCookie("orgCode") == "chengyunshang"){
-          this.options.requestUrl = "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId="+ getCookie("userId") + "&i=" + new Date();
-        }else if(getCookie("orgCode") == "baohua"){
-          this.options.requestUrl = "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId=" + getCookie("userId") + "&i=" + new Date();
-        }else{
-          this.options.requestUrl = "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId="+ null + "&i=" + new Date();
+      } else {
+        if (getCookie("orgCode") == "chengyunshang") {
+          this.options.requestUrl =
+            "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId=" +
+            getCookie("userId") +
+            "&i=" +
+            new Date();
+        } else if (getCookie("orgCode") == "baohua") {
+          this.options.requestUrl =
+            "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId=" +
+            getCookie("userId") +
+            "&i=" +
+            new Date();
+        } else {
+          this.options.requestUrl =
+            "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId=" +
+            null +
+            "&i=" +
+            new Date();
         }
       }
     },
-     toInsert() {
+    toInsert() {
       this.$router.push("/addCapacity");
     },
     toInsert1() {
       this.$router.push("/addOtherCapacity");
     },
-    updateCapacity(capacityId){
-      this.$router.push("/editCapacity/" + capacityId)
+    updateCapacity(capacityCarrierId) {
+      // console.log("capacityCarrierId" +capacityCarrierId);
+      this.$router.push("/editCapacity/" + capacityCarrierId);
     },
-    deleteUser(userId){
-      this.axios.delete("pass/v1/sysusers/" + userId) .then((res) => {
-      });
+    showCapacity(capacityId) {
+      this.$router.push("/showCapacity/" + capacityId);
     },
+    deleteUser(userId) {
+      this.axios.delete("pass/v1/sysusers/" + userId).then(res => {});
+    },
+
     deleteCapacity(row) {
-      console.log("row",row)
+      console.log("row", row);
+      console.log(row);
       let map = {
-        carrierSSOId : getCookie("userId"),
-        capacityId : row.capacityId
-      }
-        if(getCookie("orgCode") == "wuliuchuyunzhongxin" || getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "chengyunshang"){
-          this.$confirm('是否删除与车牌号('+row.capacityNumber+')的绑定关系?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning',
-        }).then(() => {
-          this.axios
-          .post("/api/v1/rms/deleteCapacityCarrier",map)
-          .then((res) => {
-            if(res.data.code=='0'){
-              this.$message.success("删除成功!")
-              if(getCookie("orgCode") == "chengyunshang"){
-                this.options.requestUrl = "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId="+ getCookie("userId") +"&i="+new Date();
-              }else if(getCookie("orgCode") == "baohua"){
-                this.options.requestUrl = "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId=" + getCookie("userId") +"&i="+new Date();
-              }else{
-                this.options.requestUrl = "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId=" + null +"&i="+new Date();
-              } 
-            }
+        capacityCarrierId: row.capacityCarrierId,
+        carrierSSOId: getCookie("userId"),
+        capacityId: row.capacityId
+      };
+      if (
+        getCookie("orgCode") == "wuliuchuyunzhongxin" ||
+        getCookie("orgCode") == "dagangadmin" ||
+        getCookie("orgCode") == "zidonghuabu" ||
+        getCookie("orgCode") == "chengyunshang"
+      ) {
+        this.$confirm(
+          "是否删除与车牌号(" + row.capacityNumber + ")的绑定关系?",
+          "提示",
+          {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }
+        )
+          .then(() => {
+            this.axios
+              .post("/api/v1/rms/deleteCapacityCarrier", map)
+              .then(res => {
+                if (res.data.code == "0") {
+                  this.$message.success("删除成功!");
+                  if (getCookie("orgCode") == "chengyunshang") {
+                    this.options.requestUrl =
+                      "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId=" +
+                      getCookie("userId") +
+                      "&i=" +
+                      new Date();
+                  } else if (getCookie("orgCode") == "baohua") {
+                    this.options.requestUrl =
+                      "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId=" +
+                      getCookie("userId") +
+                      "&i=" +
+                      new Date();
+                  } else {
+                    this.options.requestUrl =
+                      "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId=" +
+                      null +
+                      "&i=" +
+                      new Date();
+                  }
+                }
+              });
+          })
+          .catch(() => {
+            this.$message({
+              type: "info",
+              message: "已取消删除"
+            });
           });
-        }).catch(() => {
-          this.$message({
-            type: 'info',
-            message: '已取消删除'
-          });          
-        });
-        }else{
-          this.$message.error("权限不足,请联系管理员!")
-        }  
-      },
-    },
+      } else {
+        this.$message.error("权限不足,请联系管理员!");
+      }
+    }
   }
-
+};
 </script>
 <style lang="scss" scode>
-.steel_inbound{
-  .sache{
+.steel_inbound {
+  .sache {
     padding: 1.25rem 0.375rem;
     .el-input {
       width: 20%;
       margin-right: 1.25rem;
     }
   }
-  }
+}
 </style>

+ 107 - 0
src/views/RMS/components/cargoDep.vue

@@ -0,0 +1,107 @@
+//资源管理货权转移送达单位
+<template>
+  <div class="cargoDep">
+    <div class="sache">
+      <el-input placeholder="请输入内容" v-model="textInput" clearable>
+      </el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button type="primary" class="btn" @click="toInsert">
+        <i class="el-icon-plus"></i>新增
+      </el-button>
+    </div>
+    <div class="table">
+      <dilTable v-bind.sync="options">
+        <el-table-column fixed="right" label="操作" width="100">
+          <template slot-scope="scope">
+            <el-button type="text" size="small" @click="updateCargoDep(scope)">
+              修改
+            </el-button>
+            <el-button type="text" size="mini" @click="deleteCargoDep(scope)">
+              删除
+            </el-button>
+          </template>
+        </el-table-column>
+      </dilTable>
+    </div>
+  </div>
+</template>
+<script>
+import { getCookie } from "@/utils/util.js";
+export default {
+  name:"homeworkPath",
+  data(){
+    return{
+      textInput: "" ,
+      restaurants: [],
+      options:{
+        // first请求数据的地址
+        requestUrl: "/api/v1/rms/getCargoDep?apiId=487",
+      },
+    }
+  },
+  methods:{
+    onclick(){
+        this.options.requestUrl = "/api/v1/rms/getCargoDep?apiId=487&con=" +this.textInput;
+      },
+     toInsert() {
+      this.$router.push("/addCargoDep");
+
+    },
+    updateCargoDep (scope){
+      this.$router.push("/updateCargoDep/" +scope.row.cargoCarrierId)
+    },
+ 
+    deleteCargoDep(scope){
+         let map={
+         cargoCarrierId : scope.row.cargoCarrierId,
+         userId:getCookie("userId"),
+      };
+      this.$confirm("是否删除", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+        center: true,
+      })  
+        .then(() => {
+          this.axios
+            .post("/api/v1/rms/deleteCargoDep" , map)
+            .then((res) => {
+              if (res.data.code == 200) {
+                this.$message({
+                  type: "success",
+                  message: "删除成功!",
+                });     
+                this.$router.go(0);
+              } else {
+                this.$message({
+                  message: "删除失败",
+                  type: "warning",
+                });
+              }
+            });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "删除操作已取消!",
+          });
+        });
+    },
+    },
+  
+}
+
+</script>
+<style lang="scss" scode>
+.cargoDep {
+  .sache {
+    padding: 1.25rem 0.375rem;
+    .el-input {
+      width: 20%;
+      margin-right: 1.25rem;
+    }
+  }
+}
+</style>

+ 121 - 0
src/views/RMS/components/contractPrice.vue

@@ -0,0 +1,121 @@
+<template>
+    <!-- 合同单价 -->
+  <div class="contract_price">
+    <div class="sache">
+      <el-input placeholder="请输入合同号,暂不支持单价查询" v-model="inputText" clearable>
+      </el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button type="primary" class="btn" @click="toInsert">
+        <i class="el-icon-plus"></i>新增
+      </el-button>
+    </div>
+    <div class="table">
+      <dilTable v-bind.sync="options">
+        <el-table-column fixed="right" label="操作" width="180">
+          <template slot-scope="scope">
+            <el-button type="text" size="small" @click="add(scope)" style="margin:10px">
+              复制新增
+            </el-button>
+            <el-button type="text" size="small" @click="update(scope)" style="margin:10px">
+              修改
+            </el-button>
+            <el-button type="text" size="mini" @click="deleteOne(scope)" style="margin:10px">
+              删除
+            </el-button>
+          </template>
+        </el-table-column>
+      </dilTable>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      inputText: "",
+      options: {
+        // first请求数据的地址
+        requestUrl: "/api/v1/rms/selectbmsshipContractPriceList?apiId=500",
+      },
+    };
+  },
+  methods: {
+    //查询
+    onclick() {
+      this.options.requestUrl =
+        "/api/v1/rms/selectbmsshipContractPriceList?apiId=500&con=" + this.inputText;
+    },
+    //新增
+    toInsert() {
+      this.$router.push("/addContractPrice");
+    },
+    update(scope) {
+      console.log(scope.row.resultId);
+      this.$router.push("/editContractPrice/" + scope.row.resultId);
+    },
+    //复制新增
+    add(scope) {
+      console.log(scope.row);
+      this.$router.push("/addContractPrice?contractNo="+scope.row.contractNo
+      +"&portId="+scope.row.portId
+      +"&unitPrice="+scope.row.unitPrice
+      +"&startTime="+scope.row.startTime
+      +"&endTime="+scope.row.endTime);
+    },
+    showCarrier(scope) {
+      console.log(scope.row.resultId);
+      this.$router.push("/showContractPrice/" + scope.row.resultId);
+    },
+    deleteOne(scope) {
+      this.$confirm("是否删除", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+        center: true,
+      })
+        .then(() => {
+          let map={
+            resultId:scope.row.resultId
+          }
+          this.axios
+            .post("/api/v1/rms/deleteBmsshipContractPrice",map)
+            .then((res) => {
+              if (res.data.code == 200) {
+                this.$message({
+                  type: "success",
+                  message: "删除成功!",
+                });
+                this.$router.go(0);
+              } else {
+                this.$message({
+                  message: "删除失败",
+                  type: "warning",
+                });
+              }
+            });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "删除操作已取消!",
+          });
+        });
+    },
+  },
+};
+</script>
+
+<style lang="scss" scode>
+.contract_price{
+  .sache {
+    padding: 1.25rem 0.375rem;
+    .el-input {
+      width: 25%;
+      margin-right: 1.25rem;
+    }
+  }
+}
+</style>

+ 165 - 178
src/views/RMS/components/editCapacity.vue

@@ -1,16 +1,20 @@
 <template>
-  <!-- 修改运力信息 -->
-<div class="editCapacity">
-  <div id="contractDetails">
-    <page-title>编辑</page-title>
-    <div class="main">
-    </div>
-    <div class="contractTitle">
-      <div class="form_box" style="margin-right: 10rem">
-          <dil-form :formId="310" v-model="form1"></dil-form>
-      </div>
-    </div>
-<div class="elForm">
+   
+  <!-- 修改运力信息 -->
+  <div class="editCapacity">
+     
+    <div id="contractDetails">
+          <page-title>编辑</page-title>    
+      <div class="main">   </div>
+         
+      <div class="contractTitle">
+             
+        <div class="form_box" style="margin-right: 10rem">
+                    <dil-form :formId="380" v-model="form1"></dil-form>      
+        </div>
+           
+      </div>
+      <!-- <div class="elForm">
   <el-form
         :inline="true"
         class="demo-form-inline"
@@ -30,204 +34,187 @@
         </template>
         </el-autocomplete>
         </el-form-item>
-    </el-form>
-</div>
-    
-</div>
-    <div class="button_box">
-      <el-button type="primary" @click="onClickConfirm">确认</el-button>
-    </div>
-  </div>
-
+    </el-form> -->
+      <!-- </div> -->
+    </div>
+       
+    <div class="button_box">
+            <el-button type="primary" @click="onClickConfirm">确认</el-button>  
+       
+    </div>
+     
+  </div>
 </template>
 
 <script>
 import PageTitle from "@/components/Page/Title";
 import { getCookie } from "@/utils/util.js";
 export default {
-  components: { PageTitle },
-  data() {
-    return {
+  components: { PageTitle },
+  data() {
+    return {
       state: "",
-      userId:null,
+      userId: null,
       restaurants: [],
-      accessToken:null,
-      userCode:null,
-      carrierUserId:null,
-      carrierId:null,
-      carrierIds:null,
-      direction: 'rtl',
-      inputText:"",
-      form1: {},
-      carrierUserId:null,
-      carrierName:"",
-      options:{
-        requestUrl:"/api/v1/rms/getCarrierList?apiId=417",
-        selectionType:"radio",
-        mapList:[]
-      }
-    };
-  },
-  created(){
-      this.carrierUserId = getCookie("userId");
-      console.log(this.carrierUserId ,'carrierUserId')     
+      accessToken: null,
+      userCode: null,
+      carrierUserId: null,
+      carrierId: null,
+      capacityCarrierId:null,
+      carrierIds: null,
+      direction: "rtl",
+      inputText: "",
+      form1: {},
+      carrierUserId: null,
+      carrierName: "",
+      map:[],
+      options: {
+        requestUrl: "/api/v1/rms/getCarrierList?apiId=417",
+        selectionType: "radio",
+        mapList: [],
+      },
+    };
   },
+  // created(){
+  //     this.carrierUserId = getCookie("userId");
+  //     // console.log(this.carrierUserId ,'carrierUserId')
+  // },
   mounted() {
-   this.information();
-   this.axios.post(
-       "/api/v1/rms/getCarrierNameBySSOId?carrierSSOId=" + this.carrierUserId
-      )
-      .then((res) => {
-        if(res.data.code == "200"){
-        console.log(res.data.data)
-        this.state = res.data.data.carrierName
-        this.carrierIds = res.data.data.carrierId
-        }      
-  })},
-  methods: {
+    this.information();
+  },
+  //   mounted() {
+  //    this.information();
+  //    this.axios.post(
+  //        "/api/v1/rms/getCarrierNameBySSOId?carrierSSOId=" + this.carrierUserId
+  //       )
+  //       .then((res) => {
+  //         if(res.data.code == "200"){
+  //         console.log(res.data.data)
+  //         this.state = res.data.data.carrierName
+  //         this.carrierIds = res.data.data.carrierId
+  //         }
+  //   })},
+  methods: {
     //承运商弹出层
-    handleSelect(item){    
-      this.carrierIds = item.carrierId
-      item.carrierName = this.state
-    },
-    //以下是承运商边输边查搜索
-    querySearch(queryString, cb) {
-        this.axios.post('/api/v1/uc/getCarrierMesByLike?index='+queryString).then((res)=>{
-        if(res.data.code == "200"){
-          console.log(res.data.data)
-          var restaurants = res.data.data
-          console.log(restaurants,"restaurants");
-          var results = queryString ? restaurants.filter(this.createFilter(queryString)) :restaurants;
-           // 调用 callback 返回建议列表的数据
-          cb(results);
-        }
-        })     
-      },
-    createFilter(queryString) {
-        return (restaurants)  =>  {
-          return (restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) > -1);
-        };
-      },
-    //以上是承运商边输边查搜索
-    currentRadioChange(selection){
-      this.mapList=selection,
-      console.log(this.mapList)
-      this.carrierName=this.mapList.carrierName
-    },
-    onclick(){
-      this.options.requestUrl="/api/v1/rms/getCarrierList?apiId=417&con=" +this.inputText;
-    },
-    information() {
-      //编辑 
-    console.log(this.$route.params)            
-     
-      this.axios
-        .post(
-          "/api/v1/rms/getCapacityById/" +
-            this.$route.params.capacityId
-        )
-        .then((res) => {
-            console.log(res.data.data)
-          res.data.data.forEach((e) => {          
-            this.form1 = e;
-            console.log(e);
-            console.log(this.form1);
-            console.log( this.$route.params.capacityId);
-          }); 
-        this.axios
+    // handleSelect(item){
+    //   this.carrierIds = item.carrierId
+    //   item.carrierName = this.state
+    // },
+    // //以下是承运商边输边查搜索
+    // querySearch(queryString, cb) {
+    //     this.axios.post('/api/v1/uc/getCarrierMesByLike?index='+queryString).then((res)=>{
+    //     if(res.data.code == "200"){
+    //       console.log(res.data.data)
+    //       var restaurants = res.data.data
+    //       console.log(restaurants,"restaurants");
+    //       var results = queryString ? restaurants.filter(this.createFilter(queryString)) :restaurants;
+    //        // 调用 callback 返回建议列表的数据
+    //       cb(results);
+    //     }
+    //     })
+    //   },
+    // createFilter(queryString) {
+    //     return (restaurants)  =>  {
+    //       return (restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) > -1);
+    //     };
+    //   },
+    // //以上是承运商边输边查搜索
+    // currentRadioChange(selection){
+    //   this.mapList=selection,
+    //   // console.log(this.mapList)
+    //   this.carrierName=this.mapList.carrierName
+    // },
+    // onclick(){
+    //   this.options.requestUrl="/api/v1/rms/getCarrierList?apiId=417&con=" +this.inputText;
+    // },
+    information() {
+      //       //编辑
+      //     console.log(this.$route.params)
+      // console.log(this.$route.params)
+      this.axios
         .post(
-          "/api/v1/rms/getCarrierNameById/" +
-          this.$route.params.capacityId
+          "/api/v1/rms/getCapacityInfoById/" +
+            this.$route.params.capacityCarrierId
         )
         .then((res) => {
-          this.state=res.data.data.carrierName
-          console.log("carrierName",this.carrierName);
-        }); 
-        });
-    },
-    // 返回
-    onClickCancel() {
-      this.$router.go(-1);
-    },
-    // 确认
-    onClickConfirm() {
-      console.log(this.form1)
-       let RmsCapacity={
-         capacityId:this.form1.capacityId,
-         capacityTypeId:this.form1.capacityTypeId,
-         capacityNumber:this.form1.capacityNumber.toUpperCase(),
-         capacityCorlor:this.form1.capacityCorlor,
-         capacityOwneris:this.form1.capacityOwneris,
-         capacityVip:this.form1.capacityVip,
-         capacityBlacklist:this.form1.capacityBlacklist,
-         carrierId:this.carrierIds,
-       };if(
-         RmsCapacity.capacityNumber==null ||
-         RmsCapacity.capacityCorlor==null ||
-         RmsCapacity.capacityOwneris==null ||
-         RmsCapacity.capacityVip==null ||
-         RmsCapacity.capacityBlacklist==null 
-         //RmsCapacity.carrierId==null
-       )this.$message.error("存在空值!");  
-        console.log( this.$route.params.capacityId);
-        this.axios
-          .post(
-            "/api/v1/rms/updateCapacity",
-           RmsCapacity
-          )
-          .then((res) => {
-            if (res.data.code == "200") {
-              this.$message.success("修改成功")
-              this.$router.go(-1);           
-            }
-          });
-    },
-  },
+          console.log(res);
+          res.data.data.forEach((e) => {
+            console.log("from", this.form1);
+            this.form1 = e;
+          });
+        });
+    }, // 返回
+    onClickCancel() {
+      this.$router.go(-1);
+    }, // 确认
+    onClickConfirm() {
+      console.log(this.form1);
+      let map = {
+        remark: this.form1.remark,
+        userDep:this.form1.userDep,
+        capacityCarrierId:this.$route.params.capacityCarrierId 
+      };
+      if (
+        map.remark == null ||
+        map.userDep == null 
+      )
+        this.$message.error("不能存在空值");
+        else
+      this.axios.post("/api/v1/rms/updateCapacity", map).then((res) => {
+        if (res.data.code == "200") {
+          this.$message.success("修改成功");
+          this.$router.go(-1);
+        }else{
+          this.$message.success("修改失败");
+          this.$router.go(-1);
+        }
+      });
+    },
+  },
 };
 </script>
 <style lang='scss' scoped>
-.editCapacity{
-    .elForm{
-      margin-left: 40%;
-    }
-    .form_box {
+.editCapacity {
+  .elForm {
+    margin-left: 40%;
+  }
+  .form_box {
     width: 100%;
     margin-top: 30px;
     display: flex;
     justify-content: center;
-    .el-form-item{
+    .el-form-item {
       display: flex;
       justify-content: center;
-      .el-form-item__label{
+      .el-form-item__label {
         display: flex;
         align-items: center;
       }
-      .el-form-item__content{
-         .el-select{
-            width: 250px;
-          }
-          .el-input{
-            width: 250px;
-          }
+      .el-form-item__content {
+        .el-select {
+          width: 250px;
+        }
+        .el-input {
+          width: 250px;
+        }
       }
     }
- }
- .button_box{
+  }
+  .button_box {
     display: flex;
     justify-content: center;
-    .el-button{
+    .el-button {
       width: 80px;
       margin-right: 10px;
     }
- }
- .disableBox{
-  display: flex;
-  text-align: center;
-  align-items: center;
-  justify-content: center;
-  margin-top: 1.5rem;
-  margin-bottom: 1.25rem;
-}
+  }
+  .disableBox {
+    display: flex;
+    text-align: center;
+    align-items: center;
+    justify-content: center;
+    margin-top: 1.5rem;
+    margin-bottom: 1.25rem;
+  }
 }
- 
 </style>

+ 172 - 0
src/views/RMS/components/editContractPrice.vue

@@ -0,0 +1,172 @@
+<template>
+  <!-- 修改合同单价信息 -->
+  <div class="addWagonLoad">
+    <PageTitle>返回</PageTitle>
+    <div class="form-box">
+      <!-- <dil-form :formId="271" v-model="form1" ref="from1"></dil-form> -->
+      <el-form v-model="form">
+          <div class="preview-group">
+            <el-form-item label="合同号">
+                <el-input v-model="form.contractNo"></el-input>
+            </el-form-item>
+             <el-form-item label="单价">
+                <el-input v-model="form.unitPrice" type="number"></el-input>
+            </el-form-item>
+             <el-form-item label="起始日期">
+                 <el-date-picker
+                    v-model="form.startTime"
+                    type="datetime"
+                    placeholder="选择日期">
+                </el-date-picker>
+            </el-form-item>
+             <el-form-item label="截止日期">
+                 <el-date-picker
+                    v-model="form.endTime"
+                    type="datetime"
+                    placeholder="选择日期">
+                </el-date-picker>
+            </el-form-item>
+            <!-- <el-form-item label="港口:">
+                <el-select filterable  v-model="portId">
+                    <el-option v-for="item in ports" :value="item.portId" :key="item.portId" :label="item.portName"></el-option>
+                </el-select>
+            </el-form-item> -->
+          </div>
+     </el-form>
+    </div>
+    <div class="button-box">
+      <el-button @click="cancel">取消</el-button>
+      <el-button type="primary" @click="makeSure" :loading="isLoading">确定</el-button>
+    </div>
+  </div>
+</template>
+
+<script>
+import PageTitle from "@/components/Page/Title";
+import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+      form: {
+        contractNo:null,
+        unitPrice:null,
+        startTime:null,
+        endTime:null,
+        userId:getCookie("userId")
+      },
+      portId:null,
+      ports:[],
+      isLoading:false
+    };
+  },
+  mounted() {
+    //this.getPorts();
+    this.information();
+  },
+  methods: {
+    //渲染界面
+    information() {
+      console.log("resultId",this.$route.params.resultId);
+      this.axios
+        .post(
+          "/api/v1/rms/selectBmsshipPriceList/" +
+            this.$route.params.resultId
+        )
+        .then((res) => {
+            console.log(res)
+          res.data.data.forEach((e) => {
+            this.form = e;
+            console.log(e);
+          });
+        });
+    },
+    makeSure() {
+      this.isLoading=true;
+      console.log(this.form);
+      let map=this.form;
+      map={
+        resultId:this.form.resultId,
+        contractNo:this.form.contractNo,
+        unitPrice:this.form.unitPrice,
+        startTime: sjTime(this.form.startTime),
+        endTime:sjTime(this.form.endTime),
+        userId:getCookie("userId")
+      }
+      if (map.contractNo == null || 
+      map.contractNo =='' ||
+      map.unitPrice =='' ||
+      map.unitPrice == null ||
+      map.startTime == null || 
+      map.endTime == null){
+        this.$message.error("存在空值!");
+        this.isLoading=false;
+      }else if(map.startTime>=map.endTime){
+        this.$message.error("起始日期必须小于截止日期!");
+        this.isLoading=false;
+      }else{
+         this.axios.post("/api/v1/rms/updateBmsshipContractPrice",map).then(res => {
+          if (res.data.code == 200) {
+            this.$message({
+              type: "success",
+              message: "修改成功!"
+            });
+            this.cancel();
+            this.isLoading=false;
+          } else {
+            this.$message.error(res.data.data);
+            this.isLoading=false;
+          }
+        });
+      }
+       
+    },
+    // 取消
+    cancel() {
+      this.$router.go(-1);
+    },
+    //查询港口id
+    getPorts(){
+        this.axios.post("/api/v1/rms/getPortName?index=").then(res => {
+          if (res.data.code == 200) {
+            this.ports=res.data.data;
+            console.log(this.ports);
+          } else {
+            this.$message.error(res.data.data);
+          }
+        });
+    }
+  }
+};
+</script>
+<style lang="scss">
+.button-box {
+  display: flex;
+  justify-content: center;
+  margin: 20px;
+  .el-button {
+    width: 80px;
+    margin: 10px;
+  }
+}
+.form-box {
+  display: flex;
+  justify-content: center;
+  .el-form-item {
+    display: flex;
+    justify-content: center;
+    .el-form-item__label {
+      display: flex;
+      align-items: center;
+    }
+    .el-form-item__content {
+      .el-input {
+        .el-input__inner {
+          width: 250px;
+        }
+      }
+    }
+  }
+}
+</style>

+ 0 - 0
src/views/RMS/components/editInwardMaterial.vue


+ 96 - 55
src/views/RMS/components/editMaterial.vue

@@ -2,8 +2,7 @@
   <!-- 修改物资信息 -->
   <div id="contractDetails">
     <page-title>编辑</page-title>
-    <div class="main">
-    </div>
+    <div class="main"></div>
     <div class="contractTitle">
       <div class="form-box">
         <div class="form-one">
@@ -11,7 +10,34 @@
         </div>
       </div>
     </div>
-    
+    <div class="form-box f1">
+      <el-input v-model="materialTypeName" disabled> </el-input>
+      <el-button type="primary" @click="openDrawer">物资种类</el-button>
+    </div>
+    <div class="eldrawer">
+      <el-drawer
+        :visible.sync="drawer"
+        :direction="direction"
+        :before-close="handleClose"
+      >
+        <el-input
+          placeholder="请输入内容"
+          v-model="inputText"
+          clearable
+          style="width:250px"
+        >
+        </el-input>
+        <el-button type="primary" class="btn" @click="onclick">
+          <i class="el-icon-search"></i>查询
+        </el-button>
+        <div>
+          <dilTable
+            v-bind.sync="options"
+            @radio-change="currentRadioChange"
+          ></dilTable>
+        </div>
+      </el-drawer>
+    </div>
     <div class="button-box">
       <el-button @click="onClickCancel">返回</el-button>
       <el-button type="primary" @click="onClickConfirm">确认</el-button>
@@ -26,25 +52,41 @@ export default {
   components: { PageTitle },
   data() {
     return {
+      inputText: null,
+      materialTypeId: null,
+      drawer: false,
       form1: {},
+      mapList: {},
+      materialTypeName: null,
+      options: {
+        requestUrl: "",
+        selectionType: "radio"
+      }
     };
   },
- 
+
   mounted() {
-      console.log(this.$route)
     this.information();
   },
-  methods: {  
+  methods: {
+    openDrawer() {
+      this.drawer = true;
+      this.options.requestUrl =
+        "/api/v1/rms/getMaterialTypeList?apiId=376&i=" + new Date();
+      this.inputText = null;
+    },
+    currentRadioChange(selection) {
+      this.mapList = selection;
+      this.materialTypeId = this.mapList.materialTypeId;
+      this.materialTypeName = this.mapList.materialTypeName;
+    },
     information() {
       //编辑
       this.axios
-        .post(
-          "/api/v1/rms/getMaterialById/" +
-            this.$route.params.materialId
-        )
-        .then((res) => {
-            console.log(res)
-          res.data.data.forEach((e) => {
+        .post("/api/v1/rms/getMaterialById/" + this.$route.params.materialId)
+        .then(res => {
+          console.log(res);
+          res.data.data.forEach(e => {
             this.form1 = e;
             console.log(e);
             console.log(this.form1);
@@ -56,54 +98,53 @@ export default {
     onClickCancel() {
       this.$router.go(-1);
     },
+    onclick() {
+      this.options.requestUrl =
+        "/api/v1/rms/getMaterialTypeList?apiId=376&con=" + this.inputText;
+    },
     // 确认
     onClickConfirm() {
-      console.log(this.form1)
+      console.log(this.form1);
       let RmsMaterial = {
-        materialId:this.form1.materialId,
-        materialCode:this.form1.materialCode,
-        materialName:this.form1.materialName,
-        materialSpecification:this.form1.materialSpecification,
-        materialModel:this.form1.materialModel,
-        materialTypeId:this.form1.materialTypeId,
-        unitOfMeasureId:this.form1.unitOfMeasureId,
-        materialTheoreticalWeight:this.form1.materialTheoreticalWeight,
+        materialId: this.form1.materialId,
+        materialCode: this.form1.materialCode,
+        materialName: this.form1.materialName,
+        materialSpecification: this.form1.materialSpecification,
+        materialModel: this.form1.materialModel,
+        materialTypeId: this.materialTypeId,
+        unitOfMeasureId: this.form1.unitOfMeasureId,
+        materialTheoreticalWeight: this.form1.materialTheoreticalWeight
       };
-         if(
-        RmsMaterial.materialCode==null ||
-        RmsMaterial.materialName==null ||
-        RmsMaterial.materialSpecification==null ||
-        RmsMaterial.materialModel==null ||
-        RmsMaterial.materialTypeId==null ||
-        RmsMaterial.unitOfMeasureId==null ||
-        RmsMaterial.materialTheoreticalWeight==null 
-      )this.$message.error("存在空值!");
-        this.axios
-          .post(
-            "/api/v1/rms/updateMaterial",
-            RmsMaterial
-          )
-          .then((res) => {
-            if (res.data.code == "200") {
-              this.$router.go(-1);
-            }
-          });
-    },
+      this.axios.post("/api/v1/rms/updateMaterial", RmsMaterial).then(res => {
+        if (res.data.code == "200") {
+          this.$router.go(-1);
+        }
+      });
+    }
   },
-    // 取消
-    cancel() {
-      this.$router.go(-1);
-    },
+  // 取消
+  cancel() {
+    this.$router.go(-1);
+  }
 };
 </script>
-<style lang='scss' scoped>
+<style lang="scss" scoped>
 .form-box,
- .button-box{
-    display: flex;
-    justify-content: center;
-    .el-button{
-      width: 80px;
-      margin-right: 10px;
-    }
+.button-box {
+  display: flex;
+  justify-content: center;
+  .el-button {
+    width: 80px;
+    margin-right: 10px;
+  }
+}
+.f1 {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  margin-top: 20px;
+  .el-input {
+    width: 250px;
   }
-</style>
+}
+</style>

+ 2 - 4
src/views/RMS/components/editRmsShipper.vue

@@ -46,12 +46,10 @@ export default {
             this.$route.params.shipperId
         )
         .then((res) => {
-            console.log(res)
+        
           res.data.data.forEach((e) => {
             this.form1 = e;
-            console.log(e);
-            console.log(this.form1);
-            console.log(this.$route.params.resultId);
+      
           });
         });
     },

+ 43 - 0
src/views/RMS/components/inwardContractMaterial.vue

@@ -0,0 +1,43 @@
+<template>
+  <div class="inwardContractMaterial">
+    <div class="top">
+      <el-input placeholder="请输入物资名称" clearable></el-input>
+      <el-button type="primary" @click="onclick">查询</el-button>
+      <el-button type="primary" @click="onInsert">新增</el-button>
+    </div>
+    <div class="table">
+      <dilTable v-bind.sync="option" ref="table"> </dilTable>
+    </div>
+  </div>
+</template>
+<script>
+export default {
+  data() {
+    return {
+      option: {
+        requestUrl: "/api/v1/rms/getInwardContractMaterial?apiId=482"
+      }
+    };
+  },
+  methods: {
+    onInsert() {
+      this.$router.push("/addInwardContractMaterial");
+    }
+  }
+};
+</script>
+<style lang="scss" scoped>
+.inwardContractMaterial {
+  .top {
+    .el-input {
+      margin-top: 30px;
+      margin-left: 30px;
+      width: 250px;
+    }
+  }
+  .table {
+    margin-left: 30px;
+    margin-top: 30px;
+  }
+}
+</style>

+ 31 - 43
src/views/RMS/components/rawWarehouse.vue

@@ -2,15 +2,12 @@
 <template>
   <div class="steel_inbound">
     <div class="sache">
-      <el-input
-        placeholder="请输入内容"
-        v-model="inputText"
-        clearable>
+      <el-input placeholder="请输入内容" v-model="inputText" clearable>
       </el-input>
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
-       <el-button type="primary" class="btn" @click="toInsert">
+      <el-button type="primary" class="btn" @click="toInsert">
         <i class="el-icon-plus"></i>新增
       </el-button>
     </div>
@@ -18,18 +15,10 @@
       <dilTable v-bind.sync="options">
         <el-table-column fixed="right" label="操作" width="100">
           <template slot-scope="scope">
-            <el-button
-              type="text"
-              size="small"
-              @click="updateWarehouse(scope)"
-            >
+            <el-button type="text" size="small" @click="updateWarehouse(scope)">
               修改
             </el-button>
-            <el-button
-              type="text"
-              size="mini"
-              @click="deleteWarehouse(scope)"
-            >
+            <el-button type="text" size="mini" @click="deleteWarehouse(scope)">
               删除
             </el-button>
           </template>
@@ -41,48 +30,48 @@
 
 <script>
 export default {
-  data(){
-    return{
-      inputText:"",
-      options:{
+  data() {
+    return {
+      inputText: null,
+      options: {
         // first请求数据的地址
-        requestUrl: "/api/v1/rms/getWarehouseList?apiId=415",
-      },
-    }
+        requestUrl: "/api/v1/rms/getWarehouseList?apiId=415"
+      }
+    };
   },
-  methods:{
-    onclick(){
-      this.options.requestUrl="/api/v1/rms/getWarehouseList?apiId=415&con="+this.inputText;
+  methods: {
+    onclick() {
+      this.options.requestUrl =
+        "/api/v1/rms/getWarehouseList?apiId=415&con=" + this.inputText;
     },
-     toInsert() {
+    toInsert() {
       this.$router.push("/addRawWarehouse");
-
     },
-    updateWarehouse(scope){
-       console.log(scope.row.warehouseId)
-      this.$router.push("/editRawWarehouse/" +scope.row.warehouseId)
+    updateWarehouse(scope) {
+      console.log(scope.row.warehouseId);
+      this.$router.push("/editRawWarehouse/" + scope.row.warehouseId);
     },
-    deleteWarehouse(scope){
+    deleteWarehouse(scope) {
       this.$confirm("是否删除", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true,
+        center: true
       })
         .then(() => {
           this.axios
             .post("/api/v1/rms/deleteWarehouse/" + scope.row.warehouseId)
-            .then((res) => {
+            .then(res => {
               if (res.data.code == 200) {
                 this.$message({
                   type: "success",
-                  message: "删除成功!",
-                });     
+                  message: "删除成功!"
+                });
                 this.$router.go(0);
               } else {
                 this.$message({
                   message: "删除失败",
-                  type: "warning",
+                  type: "warning"
                 });
               }
             });
@@ -90,23 +79,22 @@ export default {
         .catch(() => {
           this.$message({
             type: "info",
-            message: "删除操作已取消!",
+            message: "删除操作已取消!"
           });
         });
-    },
-    },
+    }
   }
-
+};
 </script>
 
 <style lang="scss" scode>
-.steel_inbound{
-  .sache{
+.steel_inbound {
+  .sache {
     padding: 1.25rem 0.375rem;
     .el-input {
       width: 20%;
       margin-right: 1.25rem;
     }
   }
-  }
+}
 </style>

+ 252 - 0
src/views/RMS/components/showCapacity.vue

@@ -0,0 +1,252 @@
+<template>
+  <!-- 修改运力信息 -->
+<div class="editCapacity">
+  <div id="contractDetails">
+    <page-title>编辑</page-title>
+    <div class="contractimage">
+      <el-image  class="imageStyle"
+            :src="src" 
+            :preview-src-list="srcList" >
+      </el-image>
+    </div>
+    <div class="contractTitle">
+      <div class="form_box" style="margin-right: 10rem">
+          <dil-form :formId="310" v-model="form1"></dil-form>
+      </div>
+    </div>
+<div class="elForm">
+  <el-form
+        :inline="true"
+        class="demo-form-inline"
+        label-width="80px"
+      >
+        <el-form-item label="选择承运商">
+         <el-autocomplete
+          class="inline-input"
+          v-model="state"
+          :fetch-suggestions="querySearch"
+          placeholder="请输入承运商名称"
+          :trigger-on-focus="false"
+          @select="handleSelect"
+        >
+        <template slot-scope="{ item }">
+          <div class="name">{{ item.carrierName }}</div>
+        </template>
+        </el-autocomplete>
+        </el-form-item>
+    </el-form>
+</div>
+    
+</div>
+    <div class="button_box">
+      <el-button type="primary" @click="onClickConfirm">确认</el-button>
+    </div>
+  </div>
+
+</template>
+
+<script>
+import PageTitle from "@/components/Page/Title";
+import { getCookie } from "@/utils/util.js";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+      srcList:[],
+      src:"",
+      state: "",
+      userId:null,
+      restaurants: [],
+      accessToken:null,
+      userCode:null,
+      carrierUserId:null,
+      carrierId:null,
+      carrierIds:null,
+      direction: 'rtl',
+      inputText:"",
+      form1: {},
+      carrierUserId:null,
+      carrierName:"",
+      options:{
+        requestUrl:"/api/v1/rms/getCarrierList?apiId=417",
+        selectionType:"radio",
+        mapList:[]
+      }
+    };
+  },
+  created(){
+      this.carrierUserId = getCookie("userId");
+      console.log(this.carrierUserId ,'carrierUserId')     
+  },
+  mounted() {
+   this.information();
+   this.axios.post(
+       "/api/v1/rms/getCarrierNameBySSOId?carrierSSOId=" + this.carrierUserId
+      )
+      .then((res) => {
+        if(res.data.code == "200"){
+        console.log(res.data.data)
+        this.state = res.data.data.carrierName
+        this.carrierIds = res.data.data.carrierId
+        }      
+  })},
+  methods: {
+    //承运商弹出层
+    handleSelect(item){    
+      this.carrierIds = item.carrierId
+      item.carrierName = this.state
+    },
+    //以下是承运商边输边查搜索
+    querySearch(queryString, cb) {
+        this.axios.post('/api/v1/uc/getCarrierMesByLike?index='+queryString).then((res)=>{
+        if(res.data.code == "200"){
+          console.log(res.data.data)
+          var restaurants = res.data.data
+          console.log(restaurants,"restaurants");
+          var results = queryString ? restaurants.filter(this.createFilter(queryString)) :restaurants;
+           // 调用 callback 返回建议列表的数据
+          cb(results);
+        }
+        })     
+      },
+    createFilter(queryString) {
+        return (restaurants)  =>  {
+          return (restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) > -1);
+        };
+      },
+    //以上是承运商边输边查搜索
+    currentRadioChange(selection){
+      this.mapList=selection,
+      console.log(this.mapList)
+      this.carrierName=this.mapList.carrierName
+    },
+    onclick(){
+      this.options.requestUrl="/api/v1/rms/getCarrierList?apiId=417&con=" +this.inputText;
+    },
+    information() {
+      //编辑 
+    console.log(this.$route.params)            
+     
+      this.axios
+        .post(
+          "/api/v1/rms/getCapacityById/" +
+            this.$route.params.capacityId
+        )
+        .then((res) => {
+            console.log(res.data.data)
+          res.data.data.forEach((e) => {          
+            this.form1 = e;
+            console.log(e);
+            console.log(this.form1);
+            console.log( this.$route.params.capacityId);
+            this.srcList=[];
+            this.isShow=true;
+            this.src=e.driverLicenceUrl;
+            this.srcList.push(e.driverLicenceUrl)
+          }); 
+        this.axios
+        .post(
+          "/api/v1/rms/getCarrierNameById/" +
+          this.$route.params.capacityId
+        )
+        .then((res) => {
+          this.state=res.data.data.carrierName
+          console.log("carrierName",this.carrierName);
+        }); 
+        });
+    },
+    // 返回
+    onClickCancel() {
+      this.$router.go(-1);
+    },
+    // 确认
+    onClickConfirm() {
+      console.log(this.form1)
+       let RmsCapacity={
+         capacityId:this.form1.capacityId,
+         capacityTypeId:this.form1.capacityTypeId,
+         capacityNumber:this.form1.capacityNumber.toUpperCase(),
+         capacityCorlor:this.form1.capacityCorlor,
+         capacityOwneris:this.form1.capacityOwneris,
+         capacityVip:this.form1.capacityVip,
+         capacityBlacklist:this.form1.capacityBlacklist,
+         carrierId:this.carrierIds,
+       };if(
+         RmsCapacity.capacityNumber==null ||
+         RmsCapacity.capacityCorlor==null ||
+         RmsCapacity.capacityOwneris==null ||
+         RmsCapacity.capacityVip==null ||
+         RmsCapacity.capacityBlacklist==null 
+         //RmsCapacity.carrierId==null
+       )this.$message.error("存在空值!");  
+        console.log( this.$route.params.capacityId);
+        this.axios
+          .post(
+            "/api/v1/rms/updateCapacity",
+           RmsCapacity
+          )
+          .then((res) => {
+            if (res.data.code == "200") {
+              this.$message.success("修改成功")
+              this.$router.go(-1);           
+            }
+          });
+    },
+  },
+};
+</script>
+<style lang='scss' scoped>
+  .contractimage{
+    text-align: center;
+    position: relative;
+    left: 35px;
+  }
+.editCapacity{
+    .elForm{
+      margin-left: 40%;
+    }
+    .form_box {
+    width: 100%;
+    margin-top: 30px;
+    display: flex;
+    justify-content: center;
+    .el-form-item{
+      display: flex;
+      justify-content: center;
+      .el-form-item__label{
+        display: flex;
+        align-items: center;
+      }
+      .el-form-item__content{
+         .el-select{
+            width: 250px;
+          }
+          .el-input{
+            width: 250px;
+          }
+      }
+    }
+ }
+ .imageStyle{
+    height:150px;
+    text-align:center
+ }
+ .button_box{
+    display: flex;
+    justify-content: center;
+    .el-button{
+      width: 80px;
+      margin-right: 10px;
+    }
+ }
+ .disableBox{
+  display: flex;
+  text-align: center;
+  align-items: center;
+  justify-content: center;
+  margin-top: 1.5rem;
+  margin-bottom: 1.25rem;
+}
+}
+ 
+</style>

+ 10 - 7
src/views/RMS/components/showCarrier.vue

@@ -5,18 +5,17 @@
     <div class="main">
     </div>
     <div class="contractimage">
-      <el-image 
-            style=" height:150px;text-align:center"
+      <el-image  class="imageStyle"
             :src="src" 
             :preview-src-list="srcList">
-          </el-image>
-          <el-image 
-            style=" height:150px;text-align:center"
+      </el-image>
+          
+          <el-image   class="imageStyle"
             :src="src1" 
             :preview-src-list="srcList1">
-          </el-image>
+            </el-image>
           <el-image 
-            style=" height:150px;text-align:center"
+            class="imageStyle"
             :src="src2" 
             :preview-src-list="srcList2">
           </el-image>
@@ -185,6 +184,10 @@ export default {
 </script>
 <style lang='scss'>
 
+.imageStyle{
+    height:150px;
+    text-align:center
+ }
   .contractimage{
     text-align: center;
     position: relative;

+ 105 - 0
src/views/RMS/components/updateCargoDep.vue

@@ -0,0 +1,105 @@
+<template>
+  <!-- 修改原料仓库信息 -->
+  <div id="contractDetails">
+    <page-title>返回</page-title>
+    <div class="main">
+    </div>
+    <div class="contractTitle">
+      <div class="form-box">
+          <dil-form :formId="383" v-model="form1"></dil-form>   
+      </div>
+    </div>
+        
+    <div class="button-box">
+      <el-button @click="onClickCancel">返回</el-button>
+      <el-button type="primary" @click="onClickConfirm">确认</el-button>
+    </div>
+  </div>
+</template>
+
+<script>
+import PageTitle from "@/components/Page/Title";
+import { getCookie } from "@/utils/util.js";
+import { get } from "http";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+    form1: {},
+    warehouseName : '',
+    shipperName: '',
+    options: [{
+          value: '',
+          label: ''
+        }],
+    };
+  },
+  mounted() {
+    this.information();
+  },
+  methods: {
+    information() {
+      //编辑
+    //   console.log("warehouseId",this.$route.params.warehouseId);
+      this.axios
+        .post(
+          "/api/v1/rms/getCargoDepById/" +
+            this.$route.params.cargoCarrierId
+        )
+        .then((res) => {
+            res.data.data.forEach((e) => {
+            this.form1 = e;
+          });
+            
+        });
+    },
+    //单选下拉框
+
+    // 返回
+    onClickCancel() {
+      this.$router.go(-1);
+    },
+    // 确认
+    onClickConfirm() {
+       let RmsCargoDep={
+      cargoCarrierId:  this.$route.params.cargoCarrierId,
+      cargoName:this.form1.cargoName,
+      cargoType:this.form1.cargoType,
+      userId:getCookie("userId"),
+    };
+    console.log("rms",RmsCargoDep);
+        this.axios
+          .post(
+            "/api/v1/rms/updateCargoDep",
+          RmsCargoDep 
+          )
+          .then((res) => {
+            if (res.data.code == "200") {
+              this.$router.go(-1);
+            }
+          });
+    },
+  },
+};
+</script>
+<style lang='scss' scoped>
+.form-box,
+ .button-box{
+    display: flex;
+    justify-content: center;
+    margin-top: 2rem;
+    .el-button{
+      width: 80px;
+      margin-right: 10px;
+    }
+  }
+  .shipperName{
+    display: flex;
+    justify-content: center;
+  }
+  .point{
+    display: flex;
+    justify-content: center;
+    margin-top: 1rem;
+  }
+</style>

+ 26 - 5
src/views/RMS/router/index.js

@@ -52,11 +52,22 @@ import rawMaterialManufacturer from '../components/rawMaterialManufacturer.vue'
 import rawWarehouse from '../components/rawWarehouse.vue'
 import rmsShipper from '../components/rmsShipper.vue'
 import supplier from '../components/supplier.vue'
-import transitRoute from '../components/transitRoute.vue'
+import transitRoute from '../components/transitRoute.vue'  
 import showCarrier from '../components/showCarrier.vue'
+import showCapacity from '../components/showCapacity.vue'
 import transitRouteAdd from '../components/transitRouteAdd.vue'
 import truckCalculate from '../components/truckCalculate.vue'
 import consignee from '../components/consignee.vue'
+import inwardContractMaterial from '../components/inwardContractMaterial'
+import addInwardContractMaterial from '../components/addInwardContractMaterial.vue'
+import editInwardMaterial from '../components/editInwardMaterial.vue'
+import cargoDep from '../components/cargoDep.vue'
+import addCargoDep from '../components/addCargoDep.vue'
+import updateCargoDep from '../components/updateCargoDep.vue'
+import contractPrice from '../components/contractPrice.vue'
+import addContractPrice from '../components/addContractPrice.vue'
+import editContractPrice from '../components/editContractPrice.vue'
+
 Vue.use(Router)
 const constantRouterMap = [
 	{
@@ -85,11 +96,12 @@ const constantRouterMap = [
 		{path: 'addOtherCapacity', name: 'addOtherCapacity', meta: {code: 'xtpzgl-yhgl'}, component: addOtherCapacity},
 		{path: 'capacity', name: 'capacity', meta: {code: 'xtpzgl-yhgl'}, component: capacity},
 		{path: 'carDriver', name: 'carDriver', meta: {code: 'xtpzgl-yhgl'}, component: carDriver},
-		{path: 'carrier', name: 'carrier', meta: {code: 'xtpzgl-yhgl'}, component: carrier},
-		{path: 'editCapacity/:capacityId', name: 'editCapacity', meta: {code: 'xtpzgl-yhgl'}, component: editCapacity},
+		{path: 'carrier', name: 'carrier', meta: {code: 'xtpzgl-yhgl'}, component: carrier},  
+		{path: 'editCapacity/:capacityCarrierId', name: 'editCapacity', meta: {code: 'xtpzgl-yhgl'}, component: editCapacity},
 		{path: 'editCarDriver/:driverId', name: 'editCarDriver', meta: {code: 'xtpzgl-yhgl'}, component: editCarDriver},
 		{path: 'editCarrier/:carrierId', name: 'editCarrier', meta: {code: 'xtpzgl-yhgl'}, component: editCarrier},
 		{path: 'showCarrier/:carrierId', name: 'showCarrier', meta: {code: 'xtpzgl-yhgl'}, component: showCarrier},
+		{path: 'showCapacity/:capacityId', name: 'showCapacity', meta: {code: 'xtpzgl-yhgl'}, component: showCapacity},
 		{path: 'editConsignee/:consigneeId',name: 'editConsignee',meta:{code: 'xtpzgl-yhgl'},component: editConsignee},
 		{path: 'editGatepost/:gatepostId', name: 'editGatepost', meta: {code: 'xtpzgl-yhgl'}, component: editGatepost},
 		{path: 'editMaterial/:materialId', name: 'editMaterial', meta: {code: 'xtpzgl-yhgl'}, component: editMaterial},
@@ -116,8 +128,17 @@ const constantRouterMap = [
 		{path: 'transitRoute', name: 'transitRoute', meta: {code: 'xtpzgl-yhgl'}, component: transitRoute},
 		{path: 'transitRouteAdd/:addup', name: 'transitRouteAdd', meta: {code: 'xtpzgl-yhgl'}, component: transitRouteAdd},
 		{path: 'truckCalculate', name: 'truckCalculate', meta: {code: 'xtpzgl-yhgl'}, component: truckCalculate},
-		{path: 'consignee', name: 'consignee', meta: {code: 'xtpzgl-yhgl'}, component: consignee}
-	  ]
+		{path: 'consignee', name: 'consignee', meta: {code: 'xtpzgl-yhgl'}, component: consignee},
+		{path: 'inwardContractMaterial', name: 'inwardContractMaterial', meta: {code: 'xtpzgl-yhgl'}, component: inwardContractMaterial},
+		{path: 'addInwardContractMaterial', name: 'addInwardContractMaterial', meta: {code: 'xtpzgl-yhgl'}, component: addInwardContractMaterial},
+		{path: 'editInwardMaterial/:materialTypeId', name: 'editInwardMaterial', meta: {code: 'xtpzgl-yhgl'}, component: editInwardMaterial},	
+		{path: 'cargoDep', name: 'cargoDep', meta: {code: 'xtpzgl-yhgl'}, component: cargoDep},	
+		{path: 'addCargoDep', name: 'addCargoDep', meta: {code: 'xtpzgl-yhgl'}, component: addCargoDep},	
+		{path: 'updateCargoDep/:cargoCarrierId', name: 'updateCargoDep', meta: {code: 'xtpzgl-yhgl'}, component: updateCargoDep},	
+		{path: 'contractPrice', name: 'contractPrice', meta: {code: 'xtpzgl-yhgl'}, component: contractPrice},
+		{path: 'addContractPrice', name: 'addContractPrice', meta: {code: 'xtpzgl-yhgl'}, component: addContractPrice},
+		{path: 'editContractPrice/:resultId', name: 'editContractPrice', meta: {code: 'xtpzgl-yhgl'}, component: editContractPrice},
+	]
 	}
   ];
   

+ 538 - 508
src/views/SporadicManage/components/oldAreaSporadic/transportAppoint/addSporadicTransportAppoint.vue

@@ -4,125 +4,100 @@
   <div class="addSporadic">
     <page-title>运输预约</page-title>
     <div class="form-box">
-        <el-form
-        :inline="true"
-        class="demo-form-inline"
-        label-width="80px"
-        >
+      <el-form :inline="true" class="demo-form-inline" label-width="80px">
         <el-form-item label="发货单位">
-         <el-autocomplete
-          class="inline-input"
-          v-model="stateSupplier"
-          :fetch-suggestions="querySearchSupplier"
-          placeholder="请输入发货单位名称"
-          :trigger-on-focus="false"
-          @select="handleSelectSupplier"
-        >
-        <template slot-scope="{ item }">
-          <div class="name">{{ item.supplierName }}</div>
-        </template>
-        </el-autocomplete>
+          <el-autocomplete
+            class="inline-input"
+            v-model="stateSupplier"
+            :fetch-suggestions="querySearchSupplier"
+            placeholder="请输入发货单位名称"
+            :trigger-on-focus="false"
+            @select="handleSelectSupplier"
+          >
+            <template slot-scope="{ item }">
+              <div class="name">{{ item.supplierName }}</div>
+            </template>
+          </el-autocomplete>
         </el-form-item>
-        </el-form>
-        <el-form
-        :inline="true"
-        class="demo-form-inline"
-        label-width="80px"
-        >
+      </el-form>
+      <el-form :inline="true" class="demo-form-inline" label-width="80px">
         <el-form-item label="收货单位">
-         <el-autocomplete
-          class="inline-input"
-          v-model="stateConsignee"
-          :fetch-suggestions="querySearchConsignee"
-          placeholder="请输入收货单位名称"
-          :trigger-on-focus="false"
-          @select="handleSelectConsignee"
-        >
-        <template slot-scope="{ item }">
-          <div class="name">{{ item.consigneeCompanyName }}</div>
-        </template>
-        </el-autocomplete>
+          <el-autocomplete
+            class="inline-input"
+            v-model="stateConsignee"
+            :fetch-suggestions="querySearchConsignee"
+            placeholder="请输入收货单位名称"
+            :trigger-on-focus="false"
+            @select="handleSelectConsignee"
+          >
+            <template slot-scope="{ item }">
+              <div class="name">{{ item.consigneeCompanyName }}</div>
+            </template>
+          </el-autocomplete>
         </el-form-item>
-        </el-form>
-        <el-form
-        :inline="true"
-        class="demo-form-inline"
-        label-width="80px"
-      >
+      </el-form>
+      <el-form :inline="true" class="demo-form-inline" label-width="80px">
         <el-form-item label="流向">
-        <el-select v-model="orderType" placeholder="请选择" @change="flowChange">
-        <el-option
-          v-for="item in orderTypeList"
-          :key="item.value"
-          :label="item.label" 
-          :value="item.value"
-        >
-        </el-option>
-      </el-select>
-      </el-form-item>
-        </el-form>
-        <el-form
-        :inline="true"
-        class="demo-form-inline"
-        label-width="80px"
-      >
+          <el-select
+            v-model="orderType"
+            placeholder="请选择"
+            @change="flowChange"
+          >
+            <el-option
+              v-for="item in orderTypeList"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <el-form :inline="true" class="demo-form-inline" label-width="80px">
         <el-form-item label="选择路线">
-          <el-input v-model="lineName" placeholder="必填" disabled>
-          </el-input>
+          <el-input v-model="lineName" placeholder="必填" disabled> </el-input>
         </el-form-item>
         <el-form-item>
           <el-button type="primary" @click="ondrawer(5)">浏览</el-button>
         </el-form-item>
-        </el-form>
-         <el-form
-        :inline="true"
-        class="demo-form-inline"
-        label-width="80px"
-      >
+      </el-form>
+      <el-form :inline="true" class="demo-form-inline" label-width="80px">
         <el-form-item label="选择承运商">
-         <el-autocomplete
-          class="inline-input"
-          v-model="stateCarrier"
-          :fetch-suggestions="querySearchCarrier"
-          placeholder="请输入承运商名称"
-          :trigger-on-focus="false"
-          @select="handleSelectCarrier"
-        >
-        <template slot-scope="{ item }">
-          <div class="name">{{ item.carrierName }}</div>
-        </template>
-        </el-autocomplete>
+          <el-autocomplete
+            class="inline-input"
+            v-model="stateCarrier"
+            :fetch-suggestions="querySearchCarrier"
+            placeholder="请输入承运商名称"
+            :trigger-on-focus="false"
+            @select="handleSelectCarrier"
+          >
+            <template slot-scope="{ item }">
+              <div class="name">{{ item.carrierName }}</div>
+            </template>
+          </el-autocomplete>
         </el-form-item>
-        </el-form>
-        <el-form
-        :inline="true"
-        class="demo-form-inline"
-        label-width="80px"
-      >
+      </el-form>
+      <el-form :inline="true" class="demo-form-inline" label-width="80px">
         <el-form-item label="趟次">
-         <el-input
-          class="inline-input"
-          v-model="materialTimes"
-          placeholder="趟次-非必填"
-          :trigger-on-focus="false"
-          @input="onInputTimes()"
-          @blur="onblur()"
-        >
-        </el-input>
-        </el-form-item>
-        </el-form>
-        <el-form
-        :inline="true"
-        class="demo-form-inline"
-        label-width="80px"
-      >
-        <el-form-item label="选择物资">      
+          <el-input
+            class="inline-input"
+            v-model="materialTimes"
+            placeholder="趟次-非必填"
+            :trigger-on-focus="false"
+            @input="onInputTimes()"
+            @blur="onblur()"
+          >
+          </el-input>
         </el-form-item>
-        <el-form-item > 
+      </el-form>
+      <el-form :inline="true" class="demo-form-inline" label-width="80px">
+        <el-form-item label="选择物资"> </el-form-item>
+        <el-form-item>
           <el-button type="primary" @click="drawTable" class="truckBtn"
-          >浏览</el-button>
+            >浏览</el-button
+          >
         </el-form-item>
-        </el-form>
+      </el-form>
     </div>
     <div class="lineId from">
       <span class="text">该批车辆是否一车多趟:</span>
@@ -130,183 +105,200 @@
       </el-switch>
     </div>
     <div class="swtichTop">
-    <span class="titile">点击浏览选择物资之前请选择物资单位!</span>
-    <div class="switch" v-if="tableData.length > 0">
-      <el-tooltip placement="top">
-        <div slot="content">下面表格已有数据,不能进行更改!!!</div>
-        <el-switch
-          v-model="value"
-          active-text="件数"
-          inactive-text="重量"
-          disabled
-        >
-        </el-switch>
-      </el-tooltip>
-    </div>
-    <div class="switch" v-else>
-      <el-tooltip placement="top">
-        <div slot="content">当下面表格有数据之后,将不能进行更改!!!</div>
-        <el-switch v-model="value" active-text="件数" inactive-text="重量">
-        </el-switch>
-      </el-tooltip>
-    </div>
+      <span class="titile">点击浏览选择物资之前请选择物资单位!</span>
+      <div class="switch" v-if="tableData.length > 0">
+        <el-tooltip placement="top">
+          <div slot="content">下面表格已有数据,不能进行更改!!!</div>
+          <el-switch
+            v-model="value"
+            active-text="件数"
+            inactive-text="重量"
+            disabled
+          >
+          </el-switch>
+        </el-tooltip>
+      </div>
+      <div class="switch" v-else>
+        <el-tooltip placement="top">
+          <div slot="content">当下面表格有数据之后,将不能进行更改!!!</div>
+          <el-switch v-model="value" active-text="件数" inactive-text="重量">
+          </el-switch>
+        </el-tooltip>
+      </div>
     </div>
     <!-- 物资表格 -->
     <div class="truckListTable">
-    <div class="selectionTable">
-      <el-table
-        :data="tableData"
-        border
-        style="width: 100%"
-        highlight-current-row
-      >
-        <el-table-column
-          v-for="(item, i) in tableTop"
-          :key="i"
-          :prop="item.prop"
-          :label="item.label"
-          align="center"
-          show-overflow-tooltip
+      <div class="selectionTable">
+        <el-table
+          :data="tableData"
+          border
+          style="width: 100%"
+          highlight-current-row
         >
-          <template slot="scope" v-if="item.label !== '件数'">
-            <span>{{ item.label }}</span>
-          </template>
-          <!-- 插入输入框 -->
-          <template slot-scope="scope">
-            <template v-if="item.slot">
+          <el-table-column
+            v-for="(item, i) in tableTop"
+            :key="i"
+            :prop="item.prop"
+            :label="item.label"
+            align="center"
+            show-overflow-tooltip
+          >
+            <template slot="scope" v-if="item.label !== '件数'">
+              <span>{{ item.label }}</span>
+            </template>
+            <!-- 插入输入框 -->
+            <template slot-scope="scope">
+              <template v-if="item.slot">
                 <!-- 装卸货优先级 -->
-               <template v-if="item.prop == 'materialPriority'">
-                <el-input
-                  class="textinput"
-                  v-model.number="scope.row.materialPriority"
-                  @input="onInputPriority(scope.row.materialPriority)"
-                ></el-input>
+                <template v-if="item.prop == 'materialPriority'">
+                  <el-input
+                    class="textinput"
+                    v-model.number="scope.row.materialPriority"
+                    @input="onInputPriority(scope.row.materialPriority)"
+                  ></el-input>
+                </template>
+                <!-- 物资件数 -->
+                <template v-if="item.prop == 'orderMaterialNumber'">
+                  <el-input
+                    class="textinput"
+                    v-model.number="scope.row.orderMaterialNumber"
+                    @input="onInputNumber(scope.row.orderMaterialNumber)"
+                  ></el-input>
+                </template>
+                <!-- 物资重量 -->
+                <template v-if="item.prop == 'orderMaterialWeight'">
+                  <el-input
+                    v-model.number="scope.row.orderMaterialWeight"
+                    @input="onInputWeight(scope.row.orderMaterialWeight)"
+                  ></el-input>
+                </template>
               </template>
-              <!-- 物资件数 -->
-              <template v-if="item.prop == 'orderMaterialNumber'">
-                <el-input
-                  class="textinput"
-                  v-model.number="scope.row.orderMaterialNumber"
-                  @input="onInputNumber(scope.row.orderMaterialNumber)"
-                ></el-input>
+              <template v-else>
+                <span>{{ scope.row[item.prop] }}</span>
               </template>
-              <!-- 物资重量 -->
-               <template v-if="item.prop == 'orderMaterialWeight'">
-                <el-input
-                  v-model.number="scope.row.orderMaterialWeight"
-                  @input="onInputWeight(scope.row.orderMaterialWeight)"
-                ></el-input>
-              </template>           
             </template>
-            <template v-else>
-              <span>{{ scope.row[item.prop] }}</span>
+          </el-table-column>
+          <!-- 操作列 -->
+          <el-table-column fixed="right" label="操作" width="100">
+            <template slot-scope="scope">
+              <el-button
+                @click.native.prevent="deleteRow(scope.$index, tableData)"
+                type="text"
+                icon="el-icon-close"
+                size="big"
+              ></el-button>
             </template>
-          </template>
-        </el-table-column>
-        <!-- 操作列 -->
-        <el-table-column fixed="right" label="操作" width="100">
-          <template slot-scope="scope">
-            <el-button
-              @click.native.prevent="deleteRow(scope.$index, tableData)"
-              type="text"
-              icon="el-icon-close"
-              size="big"
-            ></el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-    </div>
+          </el-table-column>
+        </el-table>
+      </div>
     </div>
     <!-- 物资模态框 -->
     <div class="drawSty">
       <el-drawer
-      title="选择物资信息"
-      :visible.sync="table"
-      direction="rtl"
-      size="40%"
-      :show-close="false"
-    >
-      <el-input placeholder="请输入内容" v-model="inputMaterial" clearable > </el-input
-      ><el-button type="primary" class="btn" @click="onclickMaterial">
-        <i class="el-icon-search"></i>查询
-      </el-button>
-      <!-- <el-button @click="open">取消</el-button> -->
-      <el-button type="primary" @click="makeSure1">确定</el-button>
-      <div class="tablecls">
-        <!-- 查询所有的物资 -->
-        <dilTable ref="materialTable" v-bind.sync="materialOptions" @selection-change="selectionChange" :drawer="aaadrawer">
-        </dilTable>
-      </div>
-    </el-drawer>
-    <!-- 模态窗口 -->
-    <el-drawer :visible.sync="drawer" :direction="direction" size="30%" :before-close="handleClose">
-      <el-input
-        placeholder="请输入内容"
-        v-model="input"
-        style="margin-top: 20px"
-        clearable
-      ></el-input>
-      <el-button
-        type="primary"
-        class="btn"
-        @click="onclick(a)"
-        style="margin-bottom: 0.9375rem"
+        title="选择物资信息"
+        :visible.sync="table"
+        direction="rtl"
+        size="40%"
+        :show-close="false"
       >
-        <i class="el-icon-search"></i>查询
-      </el-button>
-      <div v-show="a == 5">
-        <dilTable
-          v-bind.sync="line"
-          @radio-change="currentRadioChange5"
-        ></dilTable>
-      </div>
-    </el-drawer>
-    </div>  
+        <el-input placeholder="请输入内容" v-model="inputMaterial" clearable>
+        </el-input
+        ><el-button type="primary" class="btn" @click="onclickMaterial">
+          <i class="el-icon-search"></i>查询
+        </el-button>
+        <!-- <el-button @click="open">取消</el-button> -->
+        <el-button type="primary" @click="makeSure1">确定</el-button>
+        <div class="tablecls">
+          <!-- 查询所有的物资 -->
+          <dilTable
+            ref="materialTable"
+            v-bind.sync="materialOptions"
+            @selection-change="selectionChange"
+            :drawer="aaadrawer"
+          >
+          </dilTable>
+        </div>
+      </el-drawer>
+      <!-- 模态窗口 -->
+      <el-drawer
+        :visible.sync="drawer"
+        :direction="direction"
+        size="30%"
+        :before-close="handleClose"
+      >
+        <el-input
+          placeholder="请输入内容"
+          v-model="input"
+          style="margin-top: 20px"
+          clearable
+        ></el-input>
+        <el-button
+          type="primary"
+          class="btn"
+          @click="onclick(a)"
+          style="margin-bottom: 0.9375rem"
+        >
+          <i class="el-icon-search"></i>查询
+        </el-button>
+        <div v-show="a == 5">
+          <dilTable
+            ref="dilTabRef"
+            v-bind.sync="line"
+            @radio-change="currentRadioChange5"
+            :isKuang="isKuang"
+          ></dilTable>
+        </div>
+      </el-drawer>
+    </div>
     <div class="button-box">
       <el-button @click="onClickCancel">返回</el-button>
-      <el-button type="primary" @click="makeSure" :disabled = "disabled">确认</el-button>
+      <el-button type="primary" @click="makeSure" :disabled="disabled"
+        >确认</el-button
+      >
     </div>
   </div>
 </template>
 <script>
 import PageTitle from "@/components/Page/Title";
-import { sjTime,isNumber } from "@/utils/sharedJsFile";
+import { sjTime, isNumber } from "@/utils/sharedJsFile";
 import { getCookie } from "@/utils/util.js";
 export default {
   components: { PageTitle },
   data() {
     return {
-      inputLine:null,
-      aaadrawer:false,
-      disabled:false,
-      materialTimes:null,
+      isKuang: false,
+      inputLine: null,
+      aaadrawer: false,
+      disabled: false,
+      materialTimes: null,
       options: [],
-      value: '',
-      receiveName:'',
-      stateCarrier:null,
-      stateSupplier:null,
-      stateConsignee:null,
-      restaurantsConsignee:null,
-      restaurantsSupplier:null,
-      orderTypeList:[
+      value: "",
+      receiveName: "",
+      stateCarrier: null,
+      stateSupplier: null,
+      stateConsignee: null,
+      restaurantsConsignee: null,
+      restaurantsSupplier: null,
+      orderTypeList: [
+        {
+          value: 12,
+          label: "进厂"
+        },
         {
-          value:12,
-          label:'进厂'
-        },{
-          value:13,
-          label:'出厂'
+          value: 13,
+          label: "出厂"
         },
         {
-          value:14,
-          label:'中转'
+          value: 14,
+          label: "中转"
         },
         {
-          value:19,
-          label:'退货'
+          value: 19,
+          label: "退货"
         }
       ],
-      orderType:null,
-      restaurantsCarrier:null,
+      orderType: null,
+      restaurantsCarrier: null,
       // 线路名称
       lineName: "",
       //线路id
@@ -322,37 +314,37 @@ export default {
         {
           prop: "materialCode",
           label: "物资编码",
-          width: "160",
+          width: "160"
         },
         {
           prop: "materialName",
           label: "物资名称",
-          width: "140",
+          width: "140"
         },
         {
           prop: "materialSpecification",
           label: "规格型号",
-          width: "140",
+          width: "140"
         },
         {
           prop: "materialPriority",
           label: "装卸货优先级",
-          slot: true,
+          slot: true
         },
         {
           prop: "orderMaterialWeight",
           label: "重量",
-          slot: true,
-        },
+          slot: true
+        }
       ],
       // 收货单位ID
-      receiveId:null,
+      receiveId: null,
       //承运商ID
-      carrierId:null,
+      carrierId: null,
       //物资表格数据
       tableData: [],
       selectionList1: [],
-      newsArr:[],
+      newsArr: [],
       //物资名称
       materialName: "",
       //发货单位名称
@@ -362,177 +354,207 @@ export default {
       //物资id
       materialId: null,
       //承运商id
-      carrierId:null,
+      carrierId: null,
       //是否需要打开模态窗口
       drawer: false,
       a: 1,
       direction: "rtl",
-      inputMaterial:null,
-      input:null,
+      inputMaterial: null,
+      input: null,
       //物资模态框
-      materialOptions:{
-          requestUrl:"",
-          selectionType: "select",
+      materialOptions: {
+        requestUrl: "",
+        selectionType: "select"
       },
       line: {
         requestUrl: "",
-        selectionType: "radio",
+        selectionType: "radio"
       },
-      row: {},
+      row: {}
     };
   },
   watch: {
     value() {
       if (this.value) {
-        console.log(this.value)
-        console.log(this.tableTop.length)
+        console.log(this.value);
+        console.log(this.tableTop.length);
         this.tableTop.splice(this.tableTop.length - 1, 1);
         this.tableTop.push({
           prop: "orderMaterialNumber",
           label: "件数",
-          slot: true,
+          slot: true
         });
       } else {
         this.tableTop.splice(this.tableTop.length - 1, 1);
         this.tableTop.push({
           prop: "orderMaterialWeight",
           label: "重量",
-          slot: true,
+          slot: true
         });
       }
-    },
+    }
   },
   methods: {
     //关闭运输线路
-    handleClose(done){
-        done()
-        this.line.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3"
+    handleClose(done) {
+      done();
+      this.line.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3";
     },
-    onclickMaterial(){
-        if(this.inputMaterial != null){
-          this.materialOptions.requestUrl = "/api/v1/uc/selectAllMaterialName?apiId=395&index=" + this.inputMaterial
-        }
-        else{
-          this.materialOptions.requestUrl = "/api/v1/uc/selectAllMaterialName?apiId=395"
-        }
+    onclickMaterial() {
+      if (this.inputMaterial != null) {
+        this.materialOptions.requestUrl =
+          "/api/v1/uc/selectAllMaterialName?apiId=395&index=" +
+          this.inputMaterial;
+      } else {
+        this.materialOptions.requestUrl =
+          "/api/v1/uc/selectAllMaterialName?apiId=395";
+      }
     },
-    onInputTimes(){
-      if(!isNumber(this.materialTimes)){
-        this.$message.warning('趟次请输入数字')
+    onInputTimes() {
+      if (!isNumber(this.materialTimes)) {
+        this.$message.warning("趟次请输入数字");
       }
     },
-    onblur(){
-      this.isMoreTrips = false
-      if(this.materaialTimes <= 0){
-        this.$message.warning('趟次必须大于0')
-        this.materialTimes = null
+    onblur() {
+      this.isMoreTrips = false;
+      if (this.materaialTimes <= 0) {
+        this.$message.warning("趟次必须大于0");
+        this.materialTimes = null;
       }
-      if(this.materialTimes > 1 ){
-        this.isMoreTrips = true
+      if (this.materialTimes > 1) {
+        this.isMoreTrips = true;
       }
     },
-    onInputPriority(scope){
-      if(!isNumber(scope)){
-        this.$message.warning('装卸货次序请输入数字')
+    onInputPriority(scope) {
+      if (!isNumber(scope)) {
+        this.$message.warning("装卸货次序请输入数字");
       }
     },
-    onInputWeight(scope){
-      if(!isNumber(scope)){
-        this.$message.warning('重量请输入数字')
+    onInputWeight(scope) {
+      if (!isNumber(scope)) {
+        this.$message.warning("重量请输入数字");
       }
     },
-    onInputNumber(scope){
-      if(!isNumber(scope)){
-        this.$message.warning('件数请输入数字')
+    onInputNumber(scope) {
+      if (!isNumber(scope)) {
+        this.$message.warning("件数请输入数字");
       }
     },
     //流向选择框变动后
-    flowChange(){
-      if(this.orderType == 12){
-        this.inputLine = "零星进厂"
+    flowChange() {
+      if (this.orderType == 12) {
+        this.inputLine = "零星进厂";
       }
-      if(this.orderType == 13){
-        this.inputLine = "零星出厂"
+      if (this.orderType == 13) {
+        this.inputLine = "零星出厂";
       }
-      if(this.orderType == 14){
-        this.inputLine = "零星中转"
+      if (this.orderType == 14) {
+        this.inputLine = "零星中转";
       }
-      if(this.orderType == 19){
-        this.inputLine = "退货"
+      if (this.orderType == 19) {
+        this.inputLine = "退货";
       }
     },
-    drawTable(){
-      this.materialOptions.requestUrl = "/api/v1/uc/selectAllMaterialName?apiId=395" +"&test=" + new Date()
-      this.selectionList1 = []
-      this.table = true
+    drawTable() {
+      this.materialOptions.requestUrl =
+        "/api/v1/uc/selectAllMaterialName?apiId=395" + "&test=" + new Date();
+      this.selectionList1 = [];
+      this.table = true;
     },
     //收货单位弹出层
-    handleSelectConsignee(item){   
-      this.consigneeId = item.consigneeId
-      item.consigneeCompanyName = this.consigneeCompanyName
-  
+    handleSelectConsignee(item) {
+      this.consigneeId = item.consigneeId;
+      item.consigneeCompanyName = this.consigneeCompanyName;
     },
     //以下是发货单位边输边查搜索
     querySearchConsignee(queryString, cb) {
-      this.axios.post('/api/v1/uc/getConsigneeByLike?index='+queryString).then((res)=>{
-        if(res.data.code == "200"){
-          console.log(res)
-          var restaurantsConsignee = res.data.data
-          var results = queryString ? restaurantsConsignee.filter(this.createFilterConsignee(queryString)) :restaurantsConsignee;
+      this.axios
+        .post("/api/v1/uc/getConsigneeByLike?index=" + queryString)
+        .then(res => {
+          if (res.data.code == "200") {
+            console.log(res);
+            var restaurantsConsignee = res.data.data;
+            var results = queryString
+              ? restaurantsConsignee.filter(
+                  this.createFilterConsignee(queryString)
+                )
+              : restaurantsConsignee;
             // 调用 callback 返回建议列表的数据
-          cb(results);
-        }
-      })    
-      },
+            cb(results);
+          }
+        });
+    },
     createFilterConsignee(queryString) {
-        return (restaurantsConsignee) => {
-          return (restaurantsConsignee.value.toLowerCase().indexOf(queryString.toLowerCase()) > -1);
-        };
-      },
-      //以上是返回单位边输边查搜索
-     //发货单位弹出层
-    handleSelectSupplier(item){
-      this.supplierId = item.supplierId
-      item.supplierName = this.supplierName
+      return restaurantsConsignee => {
+        return (
+          restaurantsConsignee.value
+            .toLowerCase()
+            .indexOf(queryString.toLowerCase()) > -1
+        );
+      };
+    },
+    //以上是返回单位边输边查搜索
+    //发货单位弹出层
+    handleSelectSupplier(item) {
+      this.supplierId = item.supplierId;
+      item.supplierName = this.supplierName;
     },
     //以下是发货单位边输边查搜索
     querySearchSupplier(queryString, cb) {
-        this.axios.post('/api/v1/uc/getSupplierMesByLike?index='+this.stateSupplier).then((res)=>{
-        if(res.data.code == "200"){    
-          var restaurantsSupplier = res.data.data
-          var results = queryString ? restaurantsSupplier.filter(this.createFilterSupplier(queryString)) :restaurantsSupplier;
-          // 调用 callback 返回建议列表的数据
-          cb(results);
-        }
-      })  
-      },
+      this.axios
+        .post("/api/v1/uc/getSupplierMesByLike?index=" + this.stateSupplier)
+        .then(res => {
+          if (res.data.code == "200") {
+            var restaurantsSupplier = res.data.data;
+            var results = queryString
+              ? restaurantsSupplier.filter(
+                  this.createFilterSupplier(queryString)
+                )
+              : restaurantsSupplier;
+            // 调用 callback 返回建议列表的数据
+            cb(results);
+          }
+        });
+    },
     createFilterSupplier(queryString) {
-        return (restaurantsSupplier) => {
-          return (restaurantsSupplier.value.toLowerCase().indexOf(queryString.toLowerCase()) > -1);
-        };
-      },
+      return restaurantsSupplier => {
+        return (
+          restaurantsSupplier.value
+            .toLowerCase()
+            .indexOf(queryString.toLowerCase()) > -1
+        );
+      };
+    },
     //承运商弹出层
-    handleSelectCarrier(item){    
-      this.carrierId = item.carrierId
-      item.carrierName = this.stateCarrier
+    handleSelectCarrier(item) {
+      this.carrierId = item.carrierId;
+      item.carrierName = this.stateCarrier;
     },
     //以下是承运商边输边查搜索
     querySearchCarrier(queryString, cb) {
-        this.axios.post('/api/v1/uc/getCarrierMesByLike?index='+queryString).then((res)=>{
-        if(res.data.code == "200"){
-          var restaurantsCarrier = res.data.data
-          console.log(restaurantsCarrier,"restaurantsCarrier");
-          var results = queryString ? restaurantsCarrier.filter(this.createFilterCarrier(queryString)) :restaurantsCarrier;
-           // 调用 callback 返回建议列表的数据
-          cb(results);
-        }
-        })     
-      },
+      this.axios
+        .post("/api/v1/uc/getCarrierMesByLike?index=" + queryString)
+        .then(res => {
+          if (res.data.code == "200") {
+            var restaurantsCarrier = res.data.data;
+            console.log(restaurantsCarrier, "restaurantsCarrier");
+            var results = queryString
+              ? restaurantsCarrier.filter(this.createFilterCarrier(queryString))
+              : restaurantsCarrier;
+            // 调用 callback 返回建议列表的数据
+            cb(results);
+          }
+        });
+    },
     createFilterCarrier(queryString) {
-        return (restaurantsCarrier)  =>  {
-          return (restaurantsCarrier.value.toLowerCase().indexOf(queryString.toLowerCase()) > -1);
-        };
-      },
+      return restaurantsCarrier => {
+        return (
+          restaurantsCarrier.value
+            .toLowerCase()
+            .indexOf(queryString.toLowerCase()) > -1
+        );
+      };
+    },
     //以上是承运商边输边查搜索
     //删除行
     deleteRow(index, rows) {
@@ -540,36 +562,36 @@ export default {
     },
     // 返回主界面
     makeSure1() {
-        var arr = []
-        for (let i = 0; i < this.newsArr.length; i++) {
-        if(arr.indexOf(this.newsArr[i]) === -1){
-            arr.push(this.newsArr[i]);
+      var arr = [];
+      for (let i = 0; i < this.newsArr.length; i++) {
+        if (arr.indexOf(this.newsArr[i]) === -1) {
+          arr.push(this.newsArr[i]);
         }
-        }
-        arr.forEach( (e) => {
-          let addmap = {
-            materialSpecification:e.materialSpecification,
-            materialName:e.materialName,
-            materialCode:e.materialCode,
-            materialId:e.materialId,
-            materialPriority:1
-          }
-          this.tableData.push(addmap)
-        })
-        this.newsArr = []
-        this.table = false
+      }
+      arr.forEach(e => {
+        let addmap = {
+          materialSpecification: e.materialSpecification,
+          materialName: e.materialName,
+          materialCode: e.materialCode,
+          materialId: e.materialId,
+          materialPriority: 1
+        };
+        this.tableData.push(addmap);
+      });
+      this.newsArr = [];
+      this.table = false;
     },
-      // 返回选中的物资信息
+    // 返回选中的物资信息
     selectionChange(selection) {
-      console.log(selection)
-      this.selectionList1 = []
-      this.selectionList1 = selection
-      this.newsArr = []
+      console.log(selection);
+      this.selectionList1 = [];
+      this.selectionList1 = selection;
+      this.newsArr = [];
       for (let i = 0; i < this.selectionList1.length; i++) {
-        if(this.newsArr.indexOf(this.selectionList1[i]) === -1){
-        this.newsArr.push(this.selectionList1[i]);
-        }
+        if (this.newsArr.indexOf(this.selectionList1[i]) === -1) {
+          this.newsArr.push(this.selectionList1[i]);
         }
+      }
     },
     onclick(a) {
       if (a == 5) {
@@ -579,7 +601,11 @@ export default {
     },
     ondrawer(num) {
       this.line.requestUrl =
-          "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3" + "&t=" + new Date() + "&con=" + this.inputLine;
+        "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3" +
+        "&t=" +
+        new Date() +
+        "&con=" +
+        this.inputLine;
       this.drawer = true;
       this.a = num;
     },
@@ -588,139 +614,143 @@ export default {
       this.$router.push("/oldSporadicAppoint");
     },
     currentRadioChange5(selection) {
-      if(selection.lineName == null &&selection.lineDesk == null){
-          this.lineName = ''
-      }else{
-          this.lineName = selection.lineName+'  '+selection.lineDesk 
-          this.lineId = selection.lineId;
-      }    
+      if (selection.lineName == null && selection.lineDesk == null) {
+        this.lineName = "";
+      } else {
+        this.lineName = selection.lineName + "  " + selection.lineDesk;
+        this.lineId = selection.lineId;
+      }
     },
     // 确认
     makeSure() {
-        if(this.isMoreTrips == false){
-          this.materialTimes = 1
-        }
-        if(Number(this.materialTimes) != 0){
-          this.isMoreTrips = true
-        }
-        this.disabled = true
-        if(this.supplierId==null||this.lineId==null||this.consigneeId==null||this.carrierId==null){
-          this.disabled = false
-          this.$message.warning("存在值未填写")
-          return
-        }else if(this.tableData.length == 0){
-          this.disabled = false
-          this.$message.warning("请点击浏览勾选物资")
-          return
-        }
-        var i = 0;
-        var j = 0;
-        this.tableData.forEach((e) => {
-          if(e.materialPriority == null){
-            i++
-          }else if(e.orderMaterialWeight == null){            
-            j++
-          }            
-        })
-        if(i != 0){
-           this.$message.warning("装卸货优先级未填写")
-           this.disabled = false
-           return
-        }else if(j != 0){
-           this.$message.warning("物资重量未填写")
-           this.disabled = false
-           return
+      if (this.isMoreTrips == false) {
+        this.materialTimes = 1;
+      }
+      if (Number(this.materialTimes) != 0) {
+        this.isMoreTrips = true;
+      }
+      this.disabled = true;
+      if (
+        this.supplierId == null ||
+        this.lineId == null ||
+        this.consigneeId == null ||
+        this.carrierId == null
+      ) {
+        this.disabled = false;
+        this.$message.warning("存在值未填写");
+        return;
+      } else if (this.tableData.length == 0) {
+        this.disabled = false;
+        this.$message.warning("请点击浏览勾选物资");
+        return;
+      }
+      var i = 0;
+      var j = 0;
+      this.tableData.forEach(e => {
+        if (e.materialPriority == null) {
+          i++;
+        } else if (e.orderMaterialWeight == null) {
+          j++;
         }
-        let amsOrder = {
-          supplierId:this.supplierId,
-          lineId:this.lineId,
-          carrierId: this.carrierId,
-          orderType:this.orderType,
-          receiveId: this.consigneeId,
-          userId:getCookie("orgCode"),
-          orderTime:this.materialTimes,
-          mapList: this.tableData,
-          isMoreTrips:Number(this.isMoreTrips)
-          
-        };
-        console.log(amsOrder)
-        debugger
-        this.axios.post("/api/v1/ams/addSporadicOrders", amsOrder).then((res) => {
-          if (res.data.code == "200") {
-            this.onClickCancel()
-            this.disabled = false
-          }else{
-            this.disabled = false
-          }
-        });
+      });
+      if (i != 0) {
+        this.$message.warning("装卸货优先级未填写");
+        this.disabled = false;
+        return;
+      } else if (j != 0) {
+        this.$message.warning("物资重量未填写");
+        this.disabled = false;
+        return;
       }
-    },
+      let amsOrder = {
+        supplierId: this.supplierId,
+        lineId: this.lineId,
+        carrierId: this.carrierId,
+        orderType: this.orderType,
+        receiveId: this.consigneeId,
+        userId: getCookie("orgCode"),
+        orderTime: this.materialTimes,
+        mapList: this.tableData,
+        isMoreTrips: Number(this.isMoreTrips)
+      };
+      console.log(amsOrder);
+      debugger;
+      this.axios.post("/api/v1/ams/addSporadicOrders", amsOrder).then(res => {
+        if (res.data.code == "200") {
+          this.onClickCancel();
+          this.disabled = false;
+        } else {
+          this.disabled = false;
+        }
+      });
+    }
+  }
 };
 </script>
 <style lang="scss" scoped>
-.addSporadic{
+.addSporadic {
   .contractDetails {
-  width: 100%;
-}
-.drawSty{
-  .el-input{
-    width: 240px;
+    width: 100%;
   }
-}
-.lineId {
-  display: flex;
-  justify-content: center;
-  .text {
-    display: inline-block;
-    width: 190px;
-    text-align: right;
-    font-size: 16px;
+  .drawSty {
+    .el-input {
+      width: 240px;
+    }
   }
-  .input {
-    width: 250px;
-    margin-right: 20px;
+  .lineId {
+    display: flex;
+    justify-content: center;
+    .text {
+      display: inline-block;
+      width: 190px;
+      text-align: right;
+      font-size: 16px;
+    }
+    .input {
+      width: 250px;
+      margin-right: 20px;
+    }
+    .span {
+      display: inline-block;
+      width: 70px;
+      height: 1px;
+    }
   }
-  .span {
-    display: inline-block;
-    width: 70px;
-    height: 1px;
+  .swtichTop {
+    display: flex;
+    height: 40px;
+    align-content: center;
+    justify-content: center;
+    padding-right: 20px;
+    .titile {
+      color: red;
+      font-size: 14px;
+    }
+    .switch {
+      margin-right: -60px;
+    }
   }
-}
-.swtichTop{
-  display: flex;
-  height: 40px;
-  align-content: center;
-  justify-content: center;
-  padding-right:20px ;
-  .titile{
-    color: red;
-    font-size: 14px;
-  }
-  .switch{
-    margin-right: -60px
+  .form-box {
+    display: inline-block !important;
+    margin-left: 488px;
+    .el-input {
+      width: 320px;
+    }
+    .el-select {
+      width: 320px;
+    }
+    .el-autocomplete {
+      width: 320px;
+    }
+    .el-form {
+      padding: 10px;
+    }
+    .truckBtn {
+      width: 320px;
+    }
   }
-}
-.form-box {
-  display: inline-block !important;
-  margin-left: 488px;
-  .el-input {
-    width: 320px;
+  .button-box {
+    margin-left: 45%;
   }
-  .el-select{
-    width: 320px;
-  }
-  .el-autocomplete{
-    width: 320px;
-  }
-  .el-form {
-    padding: 10px;
-  }
-  .truckBtn{
-    width: 320px;
-  }
-}
-.button-box {
-  margin-left: 45% ;
-}
 }
-</style>
+</style>

+ 343 - 226
src/views/SporadicManage/components/oldAreaSporadic/transportAppoint/transportAppoint.vue

@@ -3,9 +3,33 @@
   <!-- 零星物资运输预约 -->
   <div class="homeworkPath">
     <div class="top">
-      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
+      <span class="text" v-if="activeName != 'first'">订单时间:</span>
+      <el-date-picker
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
+        style="width:200px"
+        v-if="activeName != 'first'"
+      >
+      </el-date-picker>
+      <span class="text" v-if="activeName != 'first'">至</span>
+      <el-date-picker
+        v-model="endTime"
+        type="datetime"
+        placeholder="选择日期"
+        style="width:200px"
+        v-if="activeName != 'first'"
+      >
+      </el-date-picker>
+      <el-input
+        placeholder="请输入内容"
+        v-model="input"
+        clearable
+        style="width:200px"
+      >
+      </el-input>
       <el-button type="primary" class="btn" @click="onclick">
-        <i class="el-icon-search"></i>查询
+        <i class="el-icon-search"></i>
       </el-button>
       <el-button type="primary" @click="insertClick">
         <i class="el-icon-plus"></i>新增
@@ -18,155 +42,173 @@
         <i class="el-icon-bottom"></i>下发
       </el-button>
     </div>
-    <el-tabs v-model="activeName" @tab-click="handleClick">
-      <!-- 未下发 -->
-      <el-tab-pane label="未下发" name="first">
-        <dilTable
-          v-bind.sync="option1"
-          ref="table"
-          @selection-change="selectionChange"
-        >
-          <el-table-column
-            fixed="right"
-            label="操作"
-            width="120"
-          >
-            <template slot-scope="scope">
-              <el-button @click="deleteClick(scope)" type="text" size="small">
-                删除
-              </el-button>
-              <el-button @click="getMatrialDetails1(scope.row)" type="text" size="small">
-                物资详情
-              </el-button>
-            </template>
-          </el-table-column>
-          //物资详情抽屉
-          <el-table-column type="expand" width="1">
-          <template slot-scope="props">
-            <el-form label-position="center" inline class="demo-table-expand">
-              <div v-if="false">{{ props }}</div>
-              <div>
-                <el-table :data="tableData" border >
-                  <el-table-column
-                    v-for="(item, i) in tableHead"
-                    :key="i"
-                    :prop="item.prop"
-                    :label="item.label"
-                    :width="item.width"
-                  ></el-table-column>
-                </el-table>
-              </div>
-            </el-form>
-          </template>
-        </el-table-column>
-        </dilTable>
-      </el-tab-pane>
-      <!-- 已下发 -->
-      <el-tab-pane label="已下发" name="second">
-        <dilTable v-bind.sync="option2" ref="table1">
-          <el-table-column
-            fixed="right"
-            label="操作"
-            width="100"
+    <div class="table">
+      <el-tabs v-model="activeName" @tab-click="handleClick">
+        <!-- 未下发 -->
+        <el-tab-pane label="未下发" name="first">
+          <dilTable
+            v-bind.sync="option1"
+            ref="table"
+            @selection-change="selectionChange"
           >
-            <template slot-scope="scope">
-              <el-button @click="getMatrialDetails2(scope.row)" type="text" size="small">
-                物资详情
-              </el-button>
-              <el-button @click="stopSpoOrder(scope)" type="text" size="small">
-                停止
-              </el-button>
-            </template>
-          </el-table-column>
-          //物资详情抽屉
-          <el-table-column type="expand" width="1">
-          <template slot-scope="props">
-            <el-form label-position="center" inline class="demo-table-expand">
-              <div v-if="false">{{ props }}</div>
-              <div>
-                <el-table :data="tableData1" border >
-                  <el-table-column
-                    v-for="(item, i) in tableHead"
-                    :key="i"
-                    :prop="item.prop"
-                    :label="item.label"
-                    :width="item.width"
-                  ></el-table-column>
-                </el-table>
-              </div>
-            </el-form>
-          </template>
-        </el-table-column>
-        </dilTable>
-      </el-tab-pane>
-       <!-- 已接单 -->
-      <el-tab-pane label="已接单" name="third">
-        <dilTable v-bind.sync="option3" ref="table2">
-           <el-table-column
-            fixed="right"
-            label="操作"
-            width="100"
-          >
-            <template slot-scope="scope">
-              <el-button @click="getMatrialDetails3(scope.row)" type="text" size="small">
-                物资详情
-              </el-button>
-            </template>
-          </el-table-column>
-          //物资详情抽屉
-          <el-table-column type="expand" width="1">
-          <template slot-scope="props">
-            <el-form label-position="center" inline class="demo-table-expand">
-              <div v-if="false">{{ props }}</div>
-              <div>
-                <el-table :data="tableData1" border >
-                  <el-table-column
-                    v-for="(item, i) in tableHead"
-                    :key="i"
-                    :prop="item.prop"
-                    :label="item.label"
-                    :width="item.width"
-                  ></el-table-column>
-                </el-table>
-              </div>
-            </el-form>
-          </template>
-        </el-table-column>
-        </dilTable>
-      </el-tab-pane>
-    </el-tabs>
+            <el-table-column fixed="right" label="操作" width="120">
+              <template slot-scope="scope">
+                <el-button @click="deleteClick(scope)" type="text" size="small">
+                  删除
+                </el-button>
+                <el-button
+                  @click="getMatrialDetails1(scope.row)"
+                  type="text"
+                  size="small"
+                >
+                  物资详情
+                </el-button>
+              </template>
+            </el-table-column>
+            //物资详情抽屉
+            <el-table-column type="expand" width="1">
+              <template slot-scope="props">
+                <el-form
+                  label-position="center"
+                  inline
+                  class="demo-table-expand"
+                >
+                  <div v-if="false">{{ props }}</div>
+                  <div>
+                    <el-table :data="tableData" border>
+                      <el-table-column
+                        v-for="(item, i) in tableHead"
+                        :key="i"
+                        :prop="item.prop"
+                        :label="item.label"
+                        :width="item.width"
+                      ></el-table-column>
+                    </el-table>
+                  </div>
+                </el-form>
+              </template>
+            </el-table-column>
+          </dilTable>
+        </el-tab-pane>
+        <!-- 已下发 -->
+        <el-tab-pane label="已下发" name="second">
+          <dilTable v-bind.sync="option2" ref="table1">
+            <el-table-column fixed="right" label="操作" width="100">
+              <template slot-scope="scope">
+                <el-button
+                  @click="getMatrialDetails2(scope.row)"
+                  type="text"
+                  size="small"
+                >
+                  物资详情
+                </el-button>
+                <el-button
+                  @click="stopSpoOrder(scope)"
+                  type="text"
+                  size="small"
+                >
+                  停止
+                </el-button>
+              </template>
+            </el-table-column>
+            //物资详情抽屉
+            <el-table-column type="expand" width="1">
+              <template slot-scope="props">
+                <el-form
+                  label-position="center"
+                  inline
+                  class="demo-table-expand"
+                >
+                  <div v-if="false">{{ props }}</div>
+                  <div>
+                    <el-table :data="tableData1" border>
+                      <el-table-column
+                        v-for="(item, i) in tableHead"
+                        :key="i"
+                        :prop="item.prop"
+                        :label="item.label"
+                        :width="item.width"
+                      ></el-table-column>
+                    </el-table>
+                  </div>
+                </el-form>
+              </template>
+            </el-table-column>
+          </dilTable>
+        </el-tab-pane>
+        <!-- 已接单 -->
+        <el-tab-pane label="已接单" name="third">
+          <dilTable v-bind.sync="option3" ref="table2">
+            <el-table-column fixed="right" label="操作" width="100">
+              <template slot-scope="scope">
+                <el-button
+                  @click="getMatrialDetails3(scope.row)"
+                  type="text"
+                  size="small"
+                >
+                  物资详情
+                </el-button>
+              </template>
+            </el-table-column>
+            //物资详情抽屉
+            <el-table-column type="expand" width="1">
+              <template slot-scope="props">
+                <el-form
+                  label-position="center"
+                  inline
+                  class="demo-table-expand"
+                >
+                  <div v-if="false">{{ props }}</div>
+                  <div>
+                    <el-table :data="tableData1" border>
+                      <el-table-column
+                        v-for="(item, i) in tableHead"
+                        :key="i"
+                        :prop="item.prop"
+                        :label="item.label"
+                        :width="item.width"
+                      ></el-table-column>
+                    </el-table>
+                  </div>
+                </el-form>
+              </template>
+            </el-table-column>
+          </dilTable>
+        </el-tab-pane>
+      </el-tabs>
+    </div>
   </div>
 </template>
 
 <script>
 import { getCookie } from "@/utils/util.js";
+import { sjTime } from "@/utils/sharedJsFile";
 export default {
   name: "inplantTMS",
   data() {
     return {
+      startTime: null,
+      endTime: null,
       input: null,
       Time: "",
       activeName: "first",
       option1: {
         // 表格请求数据的地址
-        requestUrl:
-          "",
+        requestUrl: "",
         // 控制显示多选列
-        selectionType: "select",
+        selectionType: "select"
       },
       option2: {
         // 表格请求数据的地址
-        requestUrl:
-          "",
+        requestUrl: ""
       },
       option3: {
         // 表格请求数据的地址
-        requestUrl:
-          "",
+        requestUrl: ""
       },
       selection: [],
-      maplist:[],
-       //记录旧的row对象
+      maplist: [],
+      //记录旧的row对象
       oldRow: "",
       //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态
       oldRowCount: 1,
@@ -181,75 +223,108 @@ export default {
         {
           prop: "materialName",
           label: "物资名称",
-          width: 150,
+          width: 150
         },
         {
           prop: "specificationModel",
           label: "规格型号",
-          width: 150,
+          width: 150
         },
         {
           prop: "materialNumber",
           label: "物资件数",
-          width: 100,
+          width: 100
         },
         {
           prop: "materialWeight",
           label: "物资重量",
-          width: 100,
-        },
+          width: 100
+        }
       ],
       tableData: [],
-      tableData1:[],
-      tableData2:[]
+      tableData1: [],
+      tableData2: []
     };
   },
-  created(){
-      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
-            this.option1.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=0",
-            this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1",
-            this.option3.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&type1=1"       
-      }else{
-            this.option1.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=0&userId=" + getCookie("orgCode"),
-            this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1&userId=" + getCookie("orgCode"),
-            this.option3.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&type1=1&userId=" + getCookie("orgCode")
-      } 
+  created() {
+    if (
+      getCookie("orgCode") == "dagangadmin" ||
+      getCookie("orgCode") == "zidonghuabu"
+    ) {
+      this.option1.requestUrl =
+        "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=0";
+      this.option2.requestUrl =
+        "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1";
+      this.option3.requestUrl =
+        "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&type1=1";
+    } else {
+      this.option1.requestUrl =
+        "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=0&userId=" +
+        getCookie("orgCode");
+      this.option2.requestUrl =
+        "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1&userId=" +
+        getCookie("orgCode");
+      this.option3.requestUrl =
+        "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&type1=1&userId=" +
+        getCookie("orgCode");
+    }
   },
   methods: {
-    getRequestUrl(){
-      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
-            this.option1.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=0&test=" + new Date(),
-            this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1&test=" + new Date(),
-            this.option3.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&type1=1&test=" + new Date()
-      }else{
-            this.option1.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=0&userId=" + getCookie("orgCode") + "&test=" + new Date(),
-            this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1&userId=" + getCookie("orgCode") + "&test=" + new Date(),
-            this.option3.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&type1=1&userId=" + getCookie("orgCode") + "&test=" + new Date()
-     }
+    getRequestUrl() {
+      if (
+        getCookie("orgCode") == "dagangadmin" ||
+        getCookie("orgCode") == "zidonghuabu"
+      ) {
+        this.option1.requestUrl =
+          "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=0&test=" +
+          new Date();
+        this.option2.requestUrl =
+          "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1&test=" +
+          new Date();
+        this.option3.requestUrl =
+          "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&type1=1&test=" +
+          new Date();
+      } else {
+        this.option1.requestUrl =
+          "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=0&userId=" +
+          getCookie("orgCode") +
+          "&test=" +
+          new Date();
+        this.option2.requestUrl =
+          "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1&userId=" +
+          getCookie("orgCode") +
+          "&test=" +
+          new Date();
+        this.option3.requestUrl =
+          "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&type1=1&userId=" +
+          getCookie("orgCode") +
+          "&test=" +
+          new Date();
+      }
     },
-    stopSpoOrder(scope){
+    stopSpoOrder(scope) {
       this.$confirm("是否停止", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true,
+        center: true
       })
         .then(() => {
           this.axios
-            .post("/api/v1/ams/closeSporadicOrder" ,{
-              sporadicOrderId : scope.row.sporadicOrderId
+            .post("/api/v1/ams/closeSporadicOrder", {
+              sporadicOrderId: scope.row.sporadicOrderId
             })
-            .then((res) => {
+            .then(res => {
               if (res.data.code == 200) {
                 this.$message({
                   type: "success",
-                  message: "成功停止!",
+                  message: "成功停止!"
                 });
-              this.getRequestUrl()
+                this.getRequestUrl();
               } else {
                 this.$message({
                   message: "停止失败",
-                  type: "warning",
+                  type: "warning"
                 });
               }
             });
@@ -257,7 +332,7 @@ export default {
         .catch(() => {
           this.$message({
             type: "info",
-            message: "停止操作已取消!",
+            message: "停止操作已取消!"
           });
         });
     },
@@ -266,50 +341,85 @@ export default {
       this.maplist = selection;
     },
     onclick() {
-      if(this.input != null){
-        if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu")
-        {
-          if(this.activeName == "first"){
-            this.option1.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=0&orderType=12&dispatchStatus=0&con=" + this.input
-          }else if(this.activeName == "second"){
-            this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1&orderType=12&con=" + this.input
-          }else{
-            this.option3.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=11&con=" + this.input
-          }                
-        }else
-        {
-          if(this.activeName == "first"){
-            this.option1.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=0&orderType=12&dispatchStatus=0&userId=" + getCookie("orgCode") + "&con=" + this.input
-          }else if(this.activeName == "second"){
-            this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1&orderType=12&userId=" + getCookie("orgCode") + "&con=" + this.input
-          }else{
-            this.option3.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=11&userId=" + getCookie("orgCode") + "&con=" + this.input
-          }       
+      let startTime = null;
+      let endTime = null;
+      if (this.startTime && this.endTime) {
+        startTime = sjTime(this.startTime);
+        endTime = sjTime(this.endTime);
+      }
+      if (
+        getCookie("orgCode") == "dagangadmin" ||
+        getCookie("orgCode") == "zidonghuabu"
+      ) {
+        if (this.activeName == "second") {
+          this.option2.requestUrl =
+            "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1&orderType=12&con=" +
+            this.input +
+            "&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&i=" +
+            new Date();
+        } else {
+          this.option3.requestUrl =
+            "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&type1=1&con=" +
+            this.input +
+            "&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&i=" +
+            new Date();
         }
-        }else{
-        this.$message.warning("未输入查询条件")
+      } else {
+        if (this.activeName == "second") {
+          this.option2.requestUrl =
+            "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1&orderType=12&userId=" +
+            getCookie("orgCode") +
+            "&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&con=" +
+            this.input +
+            "&i=" +
+            new Date();
+        } else {
+          this.option3.requestUrl =
+            "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&type1=1&userId=" +
+            getCookie("orgCode") +
+            "&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&con=" +
+            this.input +
+            "&i=" +
+            new Date();
         }
+      }
     },
     handleClick(tab, event) {
-      this.getRequestUrl()
+      this.getRequestUrl();
     },
     // 下发
     sendClick() {
-      if(this.maplist.length == 0){
-        this.$message.warning('未选择零星订单')
-        return
+      if (this.maplist.length == 0) {
+        this.$message.warning("未选择零星订单");
+        return;
       }
       this.axios
         .post("/api/v1/ams/issueSporadicOrders", this.maplist)
-        .then((res) => {
+        .then(res => {
           if (res.data.code == "200") {
-            this.getRequestUrl()
+            this.getRequestUrl();
             // this.$router.go(0)
             this.$message({
               type: "success",
-              message: "下发成功!",
+              message: "下发成功!"
             });
-            this.maplist = []
+            this.maplist = [];
           }
         });
     },
@@ -319,25 +429,25 @@ export default {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true,
+        center: true
       })
         .then(() => {
           this.axios
-          .post(
-          "/api/v1/ams/deleteSporadicOrders?sporadicOrderId=" +
-            scope.row.sporadicOrderId
+            .post(
+              "/api/v1/ams/deleteSporadicOrders?sporadicOrderId=" +
+                scope.row.sporadicOrderId
             )
-            .then((res) => {
+            .then(res => {
               if (res.data.code == 200) {
                 this.$message({
                   type: "success",
-                  message: "成功删除!",
+                  message: "成功删除!"
                 });
-              this.getRequestUrl()
+                this.getRequestUrl();
               } else {
                 this.$message({
                   message: "删除失败",
-                  type: "warning",
+                  type: "warning"
                 });
               }
             });
@@ -345,7 +455,7 @@ export default {
         .catch(() => {
           this.$message({
             type: "info",
-            message: "删除操作已取消!",
+            message: "删除操作已取消!"
           });
         });
     },
@@ -354,8 +464,8 @@ export default {
       this.$router.push("addOldSporadicAppoint");
     },
     //获取物资详情--未下发
-    getMatrialDetails1(row){
-      console.log("wuzixq")
+    getMatrialDetails1(row) {
+      console.log("wuzixq");
       // 记录重复点击次数
       if (this.oldRow === row) {
         this.oldRowCount += 1;
@@ -377,15 +487,17 @@ export default {
       }
       // 重置上一个点击对象
       this.oldRow = row;
-      this.axios.post("/api/v1/ams/getSporadic?sporadicId=" + row.sporadicOrderId).then((res) =>{
-        console.log(res.data.data)
-        this.tableData = res.data.data
-      })
+      this.axios
+        .post("/api/v1/ams/getSporadic?sporadicId=" + row.sporadicOrderId)
+        .then(res => {
+          console.log(res.data.data);
+          this.tableData = res.data.data;
+        });
     },
     //获取物资详情--已下发
 
-    getMatrialDetails2(row){
-      console.log("wuzixq")
+    getMatrialDetails2(row) {
+      console.log("wuzixq");
       // 记录重复点击次数
       if (this.oldRow1 === row) {
         this.oldRowCount1 += 1;
@@ -407,12 +519,14 @@ export default {
       }
       // 重置上一个点击对象
       this.oldRow1 = row;
-      this.axios.post("/api/v1/ams/getSporadic?sporadicId=" + row.sporadicOrderId).then((res) =>{
-        console.log(res.data.data)
-        this.tableData1 = res.data.data
-      })
+      this.axios
+        .post("/api/v1/ams/getSporadic?sporadicId=" + row.sporadicOrderId)
+        .then(res => {
+          console.log(res.data.data);
+          this.tableData1 = res.data.data;
+        });
     },
-    getMatrialDetails3(row){
+    getMatrialDetails3(row) {
       // 记录重复点击次数
       if (this.oldRow2 === row) {
         this.oldRowCount2 += 1;
@@ -434,22 +548,25 @@ export default {
       }
       // 重置上一个点击对象
       this.oldRow2 = row;
-      this.axios.post("/api/v1/ams/getSporadic?sporadicId=" + row.sporadicOrderId).then((res) =>{
-        console.log(res.data.data)
-        this.tableData1 = res.data.data
-      })
+      this.axios
+        .post("/api/v1/ams/getSporadic?sporadicId=" + row.sporadicOrderId)
+        .then(res => {
+          console.log(res.data.data);
+          this.tableData1 = res.data.data;
+        });
     }
-  },
+  }
 };
 </script>
-<style lang='scss' scoped>
+<style lang="scss" scoped>
 .homeworkPath {
   .top {
-    padding: 40px;
-    .el-input {
-      width: 250px;
-      margin-right: 20px;
-    }
+    margin-left: 20px;
+    margin-top: 20px;
+  }
+  .table {
+    margin-left: 20px;
+    margin-top: 20px;
   }
 }
-</style>
+</style>

+ 159 - 128
src/views/SporadicManage/components/oldAreaSporadic/transportOrder/addTransportOrder.vue

@@ -1,5 +1,4 @@
-//新增运输派单
-//新增运输订单
+//新增运输派单 //新增运输订单
 <template>
   <div class="addSaleOrderSend">
     <page-title>新增运输订单派车</page-title>
@@ -10,24 +9,24 @@
         @radio-change="currentRadioChange"
         ref="table"
       >
-        <el-table-column
-            fixed="right"
-            label="操作"
-            width="100"
-          >
-            <template slot-scope="scope">
-              <el-button @click="getMatrialDetails1(scope.row)" type="text" size="small">
-                物资详情
-              </el-button>
-            </template>
-          </el-table-column>
-          //物资详情抽屉
-          <el-table-column type="expand" width="1">
+        <el-table-column fixed="right" label="操作" width="100">
+          <template slot-scope="scope">
+            <el-button
+              @click="getMatrialDetails1(scope.row)"
+              type="text"
+              size="small"
+            >
+              物资详情
+            </el-button>
+          </template>
+        </el-table-column>
+        //物资详情抽屉
+        <el-table-column type="expand" width="1">
           <template slot-scope="props">
             <el-form label-position="center" inline class="demo-table-expand">
               <div v-if="false">{{ props }}</div>
               <div>
-                <el-table :data="tableData" border >
+                <el-table :data="tableData" border>
                   <el-table-column
                     v-for="(item, i) in tableHead"
                     :key="i"
@@ -84,8 +83,8 @@
       </el-table>
     </div>
     <!-- 车辆模态框 -->
-    <el-drawer 
-      :visible.sync="truckDrawer" 
+    <el-drawer
+      :visible.sync="truckDrawer"
       :with-header="false"
       :destroy-on-close="false"
       direction="rtl"
@@ -94,7 +93,6 @@
       :wrapperClosable="false"
       modal
       close-on-press-escape
-    
     >
       <el-input
         placeholder="请输入内容"
@@ -129,56 +127,57 @@
     </el-drawer>
     <div class="button_box">
       <el-button @click="cancel">取消</el-button>
-      <el-button type="primary" @click="makeSure" :disabled = "disabled" >确定</el-button>
+      <el-button type="primary" @click="makeSure" :disabled="disabled"
+        >确定</el-button
+      >
     </div>
   </div>
 </template>
 <script>
 import PageTitle from "@/components/Page/Title";
 import { getCookie } from "@/utils/util.js";
-import { sjTime,isNumber } from "@/utils/sharedJsFile";
 export default {
   components: { PageTitle },
   data() {
     return {
-      disabled:false,
+      disabled: false,
       //零星订单ID
-      sporadicOrderId:null,
+      sporadicOrderId: null,
       //运输订单ID
-      orderId:null,
+      orderId: null,
       //线路名称
-      lineName:null,
+      lineName: null,
       //已经选择车辆物资信息
-      selectionList:[],
+      selectionList: [],
       //销售订单物资信息
       option: {
         // 表格请求数据的地址
-        requestUrl:"",
+        requestUrl: "",
         // 控制显示当选列
         selectionType: "radio",
-        isPagination: false,
+        isPagination: false
       },
       //当前选中的物资id
       materialId: null,
       //当前选中的物资名称
-      materialName: null,   
+      materialName: null,
       //是否打开选择车辆的模态框
-      truckDrawer:false,
+      truckDrawer: false,
       //车辆的表格
       truck: {
         requestUrl: "",
-        selectionType: "select",
+        selectionType: "select"
       },
       tableTop: [
         {
           prop: "capacityNumber",
-          label: "车牌号",
+          label: "车牌号"
         }
       ],
-      truckText:null,
+      truckText: null,
       //当前多选选中的车辆
-      selectTruck:[],
-       //记录旧的row对象
+      selectTruck: [],
+      //记录旧的row对象
       oldRow: "",
       //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态
       oldRowCount: 1,
@@ -186,25 +185,25 @@ export default {
         {
           prop: "materialName",
           label: "物资名称",
-          width: 150,
+          width: 150
         },
         {
           prop: "specificationModel",
           label: "规格型号",
-          width: 150,
+          width: 150
         },
         {
           prop: "materialNumber",
           label: "物资件数",
-          width: 100,
+          width: 100
         },
         {
           prop: "materialWeight",
           label: "物资重量",
-          width: 100,
-        },
+          width: 100
+        }
       ],
-      tableData: [],
+      tableData: []
     };
   },
   created() {
@@ -212,100 +211,121 @@ export default {
       this.truck.requestUrl =
         "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
         getCookie("userId");
-        this.option.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1&dispatchStatus=0&sporadicStatus=0&carrierSsoId=" + getCookie("userId");
-    } else if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "wuliuchuyunzhongxin"){
+      this.option.requestUrl =
+        "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1&dispatchStatus=0&sporadicStatus=0&carrierSsoId=" +
+        getCookie("userId");
+    } else if (
+      getCookie("orgCode") == "dagangadmin" ||
+      getCookie("orgCode") == "zidonghuabu" ||
+      getCookie("orgCode") == "wuliuchuyunzhongxin"
+    ) {
       this.truck.requestUrl =
         "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null;
-        this.option.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1&dispatchStatus=0&sporadicStatus=0";
-    }else{
-        this.truck.requestUrl =
+      this.option.requestUrl =
+        "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1&dispatchStatus=0&sporadicStatus=0";
+    } else {
+      this.truck.requestUrl =
         "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null;
-        this.option.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1&dispatchStatus=0&sporadicStatus=0&userId=" + getCookie("orgCode");
+      this.option.requestUrl =
+        "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1&dispatchStatus=0&sporadicStatus=0&userId=" +
+        getCookie("orgCode");
     }
   },
   methods: {
     //点击确定按钮的事件
-    makeSure(){
-       console.log(this.selectionList)
-        this.disabled = true
-        console.log(this.orderId)
-        if(this.orderId == null){
-          this.$message.error("未勾选零星订单")
-          this.disabled = false
-          return 
-        }else if(this.selectionList.length == 0){
-          this.$message.error("未选择车辆")
-          this.disabled = false
-          return
-        }
-        this.axios.post('/api/v1/ams/addSporadicOrderTimes',{
-          orderId:this.orderId,
-          sporadicOrderId:this.sporadicOrderId,
-          mapList:this.selectionList,
-        }).then((res)=>{
-          if(res.data.code == '200'){
-            this.$message.success('派车成功')
-            this.disabled = false
+    makeSure() {
+      console.log(this.selectionList);
+      this.disabled = true;
+      console.log(this.orderId);
+      if (this.orderId == null) {
+        this.$message.error("未勾选零星订单");
+        this.disabled = false;
+        return;
+      } else if (this.selectionList.length == 0) {
+        this.$message.error("未选择车辆");
+        this.disabled = false;
+        return;
+      }
+      this.axios
+        .post("/api/v1/ams/addSporadicOrderTimes", {
+          orderId: this.orderId,
+          sporadicOrderId: this.sporadicOrderId,
+          mapList: this.selectionList,
+          orgCode: getCookie("orgCode")
+        })
+        .then(res => {
+          if (res.data.code == "200") {
+            this.$message.success("派车成功");
+            this.disabled = false;
             this.cancel();
           }
-        })
+        });
     },
     //点击取消按钮的事件
-    cancel(){
-      this.$router.push('/oldSporadicOrder')
+    cancel() {
+      this.$router.push("/oldSporadicOrder");
     },
     //点击删除按钮删除当前点击的对象
-    deleteRow(index){
-      this.selectionList.splice(index,1)
+    deleteRow(index) {
+      this.selectionList.splice(index, 1);
     },
     //车辆模态框的确定事件
-    AddTruckClick(){
+    AddTruckClick() {
       this.selectTruck.forEach(e => {
         this.selectionList.push({
-          capacityId:e.capacityId,
-          capacityNumber:e.capacityNumber,
-        })
+          capacityId: e.capacityId,
+          capacityNumber: e.capacityNumber
+        });
       });
       this.truckDrawer = false;
     },
     //车辆模态框框计算
-    selectTruckClick(){
-      if(this.truckText != null){
+    selectTruckClick() {
+      if (this.truckText != null) {
         if (getCookie("orgCode") == "chengyunshang") {
-        this.truck.requestUrl =
-          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
-          getCookie("userId") + "&index="+this.truckText;
-      }else {
-        this.truck.requestUrl =
-          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null + "&index="+this.truckText;
-      }
-        this.truckText = null
-      }else{
-         if (getCookie("orgCode") == "chengyunshang") {
-        this.truck.requestUrl =
-          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
-          getCookie("userId") + "&i=" + new Date()
-      }else {
-        this.truck.requestUrl =
-          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null + "&i=" + new Date()
-      }
+          this.truck.requestUrl =
+            "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+            getCookie("userId") +
+            "&index=" +
+            this.truckText;
+        } else {
+          this.truck.requestUrl =
+            "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+            null +
+            "&index=" +
+            this.truckText;
+        }
+        this.truckText = null;
+      } else {
+        if (getCookie("orgCode") == "chengyunshang") {
+          this.truck.requestUrl =
+            "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+            getCookie("userId") +
+            "&i=" +
+            new Date();
+        } else {
+          this.truck.requestUrl =
+            "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+            null +
+            "&i=" +
+            new Date();
+        }
       }
-    
     },
     //车辆表格
-    currentRadioChange1(select){
+    currentRadioChange1(select) {
       this.selectTruck = [];
       this.selectTruck = select;
     },
     //主界面表格单选
     currentRadioChange(row) {
-      console.log(row)
-      this.sporadicOrderId = row.sporadicOrderId
-      this.orderId = row.orderId
+      console.log(row);
+      this.sporadicOrderId = row.sporadicOrderId;
+      this.orderId = row.orderId;
     },
     //获取物资详情--未下发
-    getMatrialDetails1(row){
-      console.log("wuzixq")
+    getMatrialDetails1(row) {
+      console.log("wuzixq");
       // 记录重复点击次数
       if (this.oldRow === row) {
         this.oldRowCount += 1;
@@ -327,35 +347,46 @@ export default {
       }
       // 重置上一个点击对象
       this.oldRow = row;
-      this.axios.post("/api/v1/ams/getSporadic?sporadicId=" + row.sporadicOrderId).then((res) =>{
-        console.log(res.data.data)
-        this.tableData = res.data.data
-      })
+      this.axios
+        .post("/api/v1/ams/getSporadic?sporadicId=" + row.sporadicOrderId)
+        .then(res => {
+          console.log(res.data.data);
+          this.tableData = res.data.data;
+        });
     },
     onClick() {
-      if(getCookie("orgCode") == "chengyunshang") {
-      this.truck.requestUrl =
-        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
-        getCookie("userId") + "&t=" + new Date();
-    }else if(getCookie("orgCode") == "biemeierchejian") {
-      this.truck.requestUrl =
-        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null + "&con=" + "铁专线精煤" + "&t=" + new Date();
+      if (getCookie("orgCode") == "chengyunshang") {
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+          getCookie("userId") +
+          "&t=" +
+          new Date();
+      } else if (getCookie("orgCode") == "biemeierchejian") {
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+          null +
+          "&con=" +
+          "铁专线精煤" +
+          "&t=" +
+          new Date();
+      } else {
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+          null +
+          "&t=" +
+          new Date();
+      }
+      this.truckDrawer = true;
     }
-     else {
-      this.truck.requestUrl =
-        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null  + "&t=" + new Date();
-    } 
-      this.truckDrawer = true
-    },
-  },
+  }
 };
 </script>
-<style lang='scss'>
+<style lang="scss">
 .addSaleOrderSend {
   .el-drawer__body {
-   overflow: auto;
+    overflow: auto;
   }
-  .el-drawer__container ::-webkit-scrollbar{
+  .el-drawer__container ::-webkit-scrollbar {
     display: none;
   }
   .from {
@@ -385,17 +416,17 @@ export default {
       }
     }
   }
-  .tablecls{
+  .tablecls {
     margin-top: 20px;
   }
-  .button_box{
+  .button_box {
     display: flex;
     justify-content: center;
     margin: 20px;
-    .el-button{
+    .el-button {
       width: 100px;
       margin-left: 20px;
     }
   }
 }
-</style>
+</style>

File diff suppressed because it is too large
+ 603 - 277
src/views/SporadicManage/components/oldAreaSporadic/transportOrder/transportOrder.vue


+ 435 - 136
src/views/SporadicManage/router/index.js

@@ -1,190 +1,489 @@
-import Vue from 'vue'
-import Router from 'vue-router'
+import Vue from "vue";
+import Router from "vue-router";
 
-import routerBefore from '@/config/routerBefore.js'
+import routerBefore from "@/config/routerBefore.js";
 
 // 主要
-import main from '@/components/main.vue'
+import main from "@/components/main.vue";
 // 系统配置管理
 //零星物资运输预约
-import sporadicTransportAppoint from '../components/sporadicMaterial/transportAppoint/transportAppoint.vue'
-import addSporadicTransportAppoint from '../components/sporadicMaterial/transportAppoint/addSporadicTransportAppoint.vue'
-import editSporadicTransportAppoint from '../components/sporadicMaterial/transportAppoint/editTransportAppoint.vue'
+import sporadicTransportAppoint from "../components/sporadicMaterial/transportAppoint/transportAppoint.vue";
+import addSporadicTransportAppoint from "../components/sporadicMaterial/transportAppoint/addSporadicTransportAppoint.vue";
+import editSporadicTransportAppoint from "../components/sporadicMaterial/transportAppoint/editTransportAppoint.vue";
 //内转零星运输计划
-import addSporadicTransportPlan from '../components/sporadicMaterial/transportPlan/addTransportPlan.vue'
-import sporadicTransportPlan from '../components/sporadicMaterial/transportPlan/transportPlan.vue'
+import addSporadicTransportPlan from "../components/sporadicMaterial/transportPlan/addTransportPlan.vue";
+import sporadicTransportPlan from "../components/sporadicMaterial/transportPlan/transportPlan.vue";
 //零星物资运输派单
-import sporadicTransportOrder from '../components/sporadicMaterial/transportOrder/transportOrder.vue'
-import addSporadicTransportOrder from '../components/sporadicMaterial/transportOrder/addTransportOrder.vue'
-import editSporadicTransportOrder from '../components/sporadicMaterial/transportOrder/editTransportOrder.vue'
+import sporadicTransportOrder from "../components/sporadicMaterial/transportOrder/transportOrder.vue";
+import addSporadicTransportOrder from "../components/sporadicMaterial/transportOrder/addTransportOrder.vue";
+import editSporadicTransportOrder from "../components/sporadicMaterial/transportOrder/editTransportOrder.vue";
 //零星物资进厂
-import sporadicENenfactory from '../components/sporadicMaterial/sporadicEnfactory/enFactory.vue'
-import sporadicENgrossWeight from '../components/sporadicMaterial/sporadicEnfactory/grossWeight.vue'
-import sporadicENoutFactory from '../components/sporadicMaterial/sporadicEnfactory/outFactory.vue'
-import sporadicENtareWeight from '../components/sporadicMaterial/sporadicEnfactory/tareWeight.vue'
-import sporadicENunload from '../components/sporadicMaterial/sporadicEnfactory/unload.vue'
+import sporadicENenfactory from "../components/sporadicMaterial/sporadicEnfactory/enFactory.vue";
+import sporadicENgrossWeight from "../components/sporadicMaterial/sporadicEnfactory/grossWeight.vue";
+import sporadicENoutFactory from "../components/sporadicMaterial/sporadicEnfactory/outFactory.vue";
+import sporadicENtareWeight from "../components/sporadicMaterial/sporadicEnfactory/tareWeight.vue";
+import sporadicENunload from "../components/sporadicMaterial/sporadicEnfactory/unload.vue";
 //零星物资出厂
-import sporadicOUTenfactory from '../components/sporadicMaterial/sporadicOutfactory/enFactory.vue'
-import sporadicOUTgrossWeight from '../components/sporadicMaterial/sporadicOutfactory/grossWeight.vue'
-import sporadicOUToutFactory from '../components/sporadicMaterial/sporadicOutfactory/outFactory.vue'
-import sporadicOUTtareWeight from '../components/sporadicMaterial/sporadicOutfactory/tareWeight.vue'
-import sporadicOUTload from '../components/sporadicMaterial/sporadicOutfactory/load.vue'
+import sporadicOUTenfactory from "../components/sporadicMaterial/sporadicOutfactory/enFactory.vue";
+import sporadicOUTgrossWeight from "../components/sporadicMaterial/sporadicOutfactory/grossWeight.vue";
+import sporadicOUToutFactory from "../components/sporadicMaterial/sporadicOutfactory/outFactory.vue";
+import sporadicOUTtareWeight from "../components/sporadicMaterial/sporadicOutfactory/tareWeight.vue";
+import sporadicOUTload from "../components/sporadicMaterial/sporadicOutfactory/load.vue";
 
 //老区零星进出厂
 //老厂零星物资运输预约
-import oldSporadicAppoint from '../components/oldAreaSporadic/transportAppoint/transportAppoint.vue'
-import addOldSporadicAppoint from '../components/oldAreaSporadic/transportAppoint/addSporadicTransportAppoint.vue'
-import editOldSporadicAppoint from '../components/oldAreaSporadic/transportAppoint/editTransportAppoint.vue'
+import oldSporadicAppoint from "../components/oldAreaSporadic/transportAppoint/transportAppoint.vue";
+import addOldSporadicAppoint from "../components/oldAreaSporadic/transportAppoint/addSporadicTransportAppoint.vue";
 //老厂零星物资运输派单
-import oldSporadicOrder from '../components/oldAreaSporadic/transportOrder/transportOrder.vue'
-import addOldSporadicOrder from '../components/oldAreaSporadic/transportOrder/addTransportOrder.vue'
+import oldSporadicOrder from "../components/oldAreaSporadic/transportOrder/transportOrder.vue";
+import addOldSporadicOrder from "../components/oldAreaSporadic/transportOrder/addTransportOrder.vue";
 
 //老厂零星物资中转
-import oldSporadicInwardTenfactory from '../components/oldAreaSporadic/inwardSporadicFactory/enFactory.vue'
-import oldSporadicInwardGrossWeight from '../components/oldAreaSporadic/inwardSporadicFactory/grossWeight.vue'
-import oldSporadicInwardoutFactory from '../components/oldAreaSporadic/inwardSporadicFactory/LeaveFactory.vue'
-import oldSporadicInwardtareWeight from '../components/oldAreaSporadic/inwardSporadicFactory/tareWeight.vue'
-import oldSporadicInwardload from '../components/oldAreaSporadic/inwardSporadicFactory/Load.vue'
-import oldSporadicInwardUnload from '../components/oldAreaSporadic/inwardSporadicFactory/unload.vue'
+import oldSporadicInwardTenfactory from "../components/oldAreaSporadic/inwardSporadicFactory/enFactory.vue";
+import oldSporadicInwardGrossWeight from "../components/oldAreaSporadic/inwardSporadicFactory/grossWeight.vue";
+import oldSporadicInwardoutFactory from "../components/oldAreaSporadic/inwardSporadicFactory/LeaveFactory.vue";
+import oldSporadicInwardtareWeight from "../components/oldAreaSporadic/inwardSporadicFactory/tareWeight.vue";
+import oldSporadicInwardload from "../components/oldAreaSporadic/inwardSporadicFactory/Load.vue";
+import oldSporadicInwardUnload from "../components/oldAreaSporadic/inwardSporadicFactory/unload.vue";
 
 //钢材退货运输预约
-import steelReturnTransportAppoint from '../components/steelReturn/transportAppoint/transportAppoint.vue'
-import addSteelReturnTransportAppoint from '../components/steelReturn/transportAppoint/addSteelReturnTransportAppoint'
-import editSteelReturnTransportAppoint from '../components/steelReturn/transportAppoint/editTransportAppoint.vue'
+import steelReturnTransportAppoint from "../components/steelReturn/transportAppoint/transportAppoint.vue";
+import addSteelReturnTransportAppoint from "../components/steelReturn/transportAppoint/addSteelReturnTransportAppoint";
+import editSteelReturnTransportAppoint from "../components/steelReturn/transportAppoint/editTransportAppoint.vue";
 //钢材退货运输派单
-import steelReturnTransportOrder from '../components/steelReturn/transportOrder/transportOrder.vue'
-import addSteelReturnTransportOrder from '../components/steelReturn/transportOrder/addTransportOrder.vue'
-import editSteelReturnTransportOrder from '../components/steelReturn/transportOrder/editTransportOrder.vue'
+import steelReturnTransportOrder from "../components/steelReturn/transportOrder/transportOrder.vue";
+import addSteelReturnTransportOrder from "../components/steelReturn/transportOrder/addTransportOrder.vue";
+import editSteelReturnTransportOrder from "../components/steelReturn/transportOrder/editTransportOrder.vue";
 //钢材退货运输执行
-import steelReturnEnfactory from '../components/steelReturn/transportExcute/enFactory.vue'
-import steelReturnGrossWeight from '../components/steelReturn/transportExcute/grossWeight.vue'
-import steelReturnOutFactory from '../components/steelReturn/transportExcute/outFactory.vue'
-import steelReturnTareWeight from '../components/steelReturn/transportExcute/tareWeight.vue'
-import steelReturnUnload from '../components/steelReturn/transportExcute/unload.vue'
+import steelReturnEnfactory from "../components/steelReturn/transportExcute/enFactory.vue";
+import steelReturnGrossWeight from "../components/steelReturn/transportExcute/grossWeight.vue";
+import steelReturnOutFactory from "../components/steelReturn/transportExcute/outFactory.vue";
+import steelReturnTareWeight from "../components/steelReturn/transportExcute/tareWeight.vue";
+import steelReturnUnload from "../components/steelReturn/transportExcute/unload.vue";
 
 //一车多趟运输预约
-import mornThanTransportAppoint from '../components/moreThanMaterialTruck/transportAppoint/transportAppoint.vue'
-import addMornThanTransportAppoint from '../components/moreThanMaterialTruck/transportAppoint/addSporadicTransportAppoint.vue'
+import mornThanTransportAppoint from "../components/moreThanMaterialTruck/transportAppoint/transportAppoint.vue";
+import addMornThanTransportAppoint from "../components/moreThanMaterialTruck/transportAppoint/addSporadicTransportAppoint.vue";
 //一车多趟运输派单
-import mornThanTransportOrder from '../components/moreThanMaterialTruck/transportOrder/transportOrder.vue'
-import addMornThanTransportOrder from '../components/moreThanMaterialTruck/transportOrder/addTransportOrder.vue'
+import mornThanTransportOrder from "../components/moreThanMaterialTruck/transportOrder/transportOrder.vue";
+import addMornThanTransportOrder from "../components/moreThanMaterialTruck/transportOrder/addTransportOrder.vue";
 //一车多趟运输执行进厂
-import mornThanENenfactory from '../components/moreThanMaterialTruck/sporadicEnfactory/enFactory.vue'
-import mornThanENgrossWeight from '../components/moreThanMaterialTruck/sporadicEnfactory/grossWeight.vue'
-import mornThanENoutFactory from '../components/moreThanMaterialTruck/sporadicEnfactory/outFactory.vue'
-import mornThanENtareWeight from '../components/moreThanMaterialTruck/sporadicEnfactory/tareWeight.vue'
-import mornThanENunload from '../components/moreThanMaterialTruck/sporadicEnfactory/unload.vue'
+import mornThanENenfactory from "../components/moreThanMaterialTruck/sporadicEnfactory/enFactory.vue";
+import mornThanENgrossWeight from "../components/moreThanMaterialTruck/sporadicEnfactory/grossWeight.vue";
+import mornThanENoutFactory from "../components/moreThanMaterialTruck/sporadicEnfactory/outFactory.vue";
+import mornThanENtareWeight from "../components/moreThanMaterialTruck/sporadicEnfactory/tareWeight.vue";
+import mornThanENunload from "../components/moreThanMaterialTruck/sporadicEnfactory/unload.vue";
 //一车多趟运输执行出厂
-import mornThanOUTenfactory from '../components/moreThanMaterialTruck/sporadicOutfactory/enFactory.vue'
-import mornThanOUTgrossWeight from '../components/moreThanMaterialTruck/sporadicOutfactory/grossWeight.vue'
-import mornThanOUToutFactory from '../components/moreThanMaterialTruck/sporadicOutfactory/outFactory.vue'
-import mornThanOUTtareWeight from '../components/moreThanMaterialTruck/sporadicOutfactory/tareWeight.vue'
-import mornThanOUTload from '../components/moreThanMaterialTruck/sporadicOutfactory/load.vue'
+import mornThanOUTenfactory from "../components/moreThanMaterialTruck/sporadicOutfactory/enFactory.vue";
+import mornThanOUTgrossWeight from "../components/moreThanMaterialTruck/sporadicOutfactory/grossWeight.vue";
+import mornThanOUToutFactory from "../components/moreThanMaterialTruck/sporadicOutfactory/outFactory.vue";
+import mornThanOUTtareWeight from "../components/moreThanMaterialTruck/sporadicOutfactory/tareWeight.vue";
+import mornThanOUTload from "../components/moreThanMaterialTruck/sporadicOutfactory/load.vue";
 
 // 内转零星内转进厂展示界面
-import sporadicEnfactoryInward from '../components/sporadicMaterial/inwardSporadicFactory/enFactory.vue'
-import sporadicgrossWeightInward from '../components/sporadicMaterial/inwardSporadicFactory/grossWeight.vue'
-import sporadicLeavefactoryInward from '../components/sporadicMaterial/inwardSporadicFactory/LeaveFactory.vue'
-import sporadicLoadInward from '../components/sporadicMaterial/inwardSporadicFactory/Load.vue'
-import sporadicTareWeightInward from '../components/sporadicMaterial/inwardSporadicFactory/tareWeight.vue'
-import sporadicUnloadInward from '../components/sporadicMaterial/inwardSporadicFactory/unload.vue'
+import sporadicEnfactoryInward from "../components/sporadicMaterial/inwardSporadicFactory/enFactory.vue";
+import sporadicgrossWeightInward from "../components/sporadicMaterial/inwardSporadicFactory/grossWeight.vue";
+import sporadicLeavefactoryInward from "../components/sporadicMaterial/inwardSporadicFactory/LeaveFactory.vue";
+import sporadicLoadInward from "../components/sporadicMaterial/inwardSporadicFactory/Load.vue";
+import sporadicTareWeightInward from "../components/sporadicMaterial/inwardSporadicFactory/tareWeight.vue";
+import sporadicUnloadInward from "../components/sporadicMaterial/inwardSporadicFactory/unload.vue";
 
-Vue.use(Router)
+Vue.use(Router);
 const constantRouterMap = [
   {
-    path: '/',
-    name: 'main',
-    meta: {title: '首页', code: 'xtpzgl'},
+    path: "/",
+    name: "main",
+    meta: { title: "首页", code: "xtpzgl" },
     component: main,
-    redirect: {name: 'addSporadicTransportAppoint'},
+    redirect: { name: "addSporadicTransportAppoint" },
     children: [
       //零星物资运输预约
-      {path:'addSporadicTransportAppoint',name:'addSporadicTransportAppoint',meta:{code:'xtpzgl-jggl'},component:addSporadicTransportAppoint},
-      {path:'sporadicTransportAppoint',name:'sporadicTransportAppoint',meta:{code:'xtpzgl-yhgl'},component:sporadicTransportAppoint},
-      {path: 'editSporadicTransportAppoint', name: 'editSporadicTransportAppoint', meta: {code: 'xtpzgl-yhgl'}, component: editSporadicTransportAppoint},
+      {
+        path: "addSporadicTransportAppoint",
+        name: "addSporadicTransportAppoint",
+        meta: { code: "xtpzgl-jggl" },
+        component: addSporadicTransportAppoint
+      },
+      {
+        path: "sporadicTransportAppoint",
+        name: "sporadicTransportAppoint",
+        meta: { code: "xtpzgl-yhgl" },
+        component: sporadicTransportAppoint
+      },
+      {
+        path: "editSporadicTransportAppoint",
+        name: "editSporadicTransportAppoint",
+        meta: { code: "xtpzgl-yhgl" },
+        component: editSporadicTransportAppoint
+      },
       //内转零星运输计划
-      {path:'addSporadicTransportPlan',name:'addSporadicTransportPlan',meta:{code:'xtpzgl-jggl'},component:addSporadicTransportPlan},
-      {path:'sporadicTransportPlan',name:'sporadicTransportPlan',meta:{code:'xtpzgl-yhgl'},component:sporadicTransportPlan},
+      {
+        path: "addSporadicTransportPlan",
+        name: "addSporadicTransportPlan",
+        meta: { code: "xtpzgl-jggl" },
+        component: addSporadicTransportPlan
+      },
+      {
+        path: "sporadicTransportPlan",
+        name: "sporadicTransportPlan",
+        meta: { code: "xtpzgl-yhgl" },
+        component: sporadicTransportPlan
+      },
       //零星物资运输订单
-      {path:'addSporadicTransportOrder',name:'addSporadicTransportOrder',meta:{code:'xtpzgl-jggl'},component:addSporadicTransportOrder},
-      {path:'sporadicTransportOrder',name:'sporadicTransportOrder',meta:{code:'xtpzgl-yhgl'},component:sporadicTransportOrder},
-      {path: 'editSporadicTransportOrder', name: 'editSporadicTransportOrder', meta: {code: 'xtpzgl-yhgl'}, component: editSporadicTransportOrder},
+      {
+        path: "addSporadicTransportOrder",
+        name: "addSporadicTransportOrder",
+        meta: { code: "xtpzgl-jggl" },
+        component: addSporadicTransportOrder
+      },
+      {
+        path: "sporadicTransportOrder",
+        name: "sporadicTransportOrder",
+        meta: { code: "xtpzgl-yhgl" },
+        component: sporadicTransportOrder
+      },
+      {
+        path: "editSporadicTransportOrder",
+        name: "editSporadicTransportOrder",
+        meta: { code: "xtpzgl-yhgl" },
+        component: editSporadicTransportOrder
+      },
       //零星物资进厂
-      {path:'sporadicENenfactory',name:'sporadicENenfactory',meta:{code:'xtpzgl-yhgl'},component:sporadicENenfactory},
-      {path:'sporadicENgrossWeight',name:'sporadicENgrossWeight',meta:{code:'xtpzgl-yhgl'},component:sporadicENgrossWeight},
-      {path:'sporadicENoutFactory',name:'sporadicENoutFactory',meta:{code:'xtpzgl-yhgl'},component:sporadicENoutFactory},
-      {path:'sporadicENtareWeight',name:'sporadicENtareWeight',meta:{code:'xtpzgl-yhgl'},component:sporadicENtareWeight},
-      {path:'sporadicENunload',name:'sporadicENunload',meta:{code:'xtpzgl-yhgl'},component:sporadicENunload},
+      {
+        path: "sporadicENenfactory",
+        name: "sporadicENenfactory",
+        meta: { code: "xtpzgl-yhgl" },
+        component: sporadicENenfactory
+      },
+      {
+        path: "sporadicENgrossWeight",
+        name: "sporadicENgrossWeight",
+        meta: { code: "xtpzgl-yhgl" },
+        component: sporadicENgrossWeight
+      },
+      {
+        path: "sporadicENoutFactory",
+        name: "sporadicENoutFactory",
+        meta: { code: "xtpzgl-yhgl" },
+        component: sporadicENoutFactory
+      },
+      {
+        path: "sporadicENtareWeight",
+        name: "sporadicENtareWeight",
+        meta: { code: "xtpzgl-yhgl" },
+        component: sporadicENtareWeight
+      },
+      {
+        path: "sporadicENunload",
+        name: "sporadicENunload",
+        meta: { code: "xtpzgl-yhgl" },
+        component: sporadicENunload
+      },
       //零星物资出厂
-      {path:'sporadicOUTenfactory',name:'sporadicOUTenfactory',meta:{code:'xtpzgl-yhgl'},component:sporadicOUTenfactory},
-      {path:'sporadicOUTgrossWeight',name:'sporadicOUTgrossWeight',meta:{code:'xtpzgl-yhgl'},component:sporadicOUTgrossWeight},
-      {path:'sporadicOUToutFactory',name:'sporadicOUToutFactory',meta:{code:'xtpzgl-yhgl'},component:sporadicOUToutFactory},
-      {path:'sporadicOUTtareWeight',name:'sporadicOUTtareWeight',meta:{code:'xtpzgl-yhgl'},component:sporadicOUTtareWeight},
-      {path:'sporadicOUTload',name:'sporadicOUTload',meta:{code:'xtpzgl-yhgl'},component:sporadicOUTload},
+      {
+        path: "sporadicOUTenfactory",
+        name: "sporadicOUTenfactory",
+        meta: { code: "xtpzgl-yhgl" },
+        component: sporadicOUTenfactory
+      },
+      {
+        path: "sporadicOUTgrossWeight",
+        name: "sporadicOUTgrossWeight",
+        meta: { code: "xtpzgl-yhgl" },
+        component: sporadicOUTgrossWeight
+      },
+      {
+        path: "sporadicOUToutFactory",
+        name: "sporadicOUToutFactory",
+        meta: { code: "xtpzgl-yhgl" },
+        component: sporadicOUToutFactory
+      },
+      {
+        path: "sporadicOUTtareWeight",
+        name: "sporadicOUTtareWeight",
+        meta: { code: "xtpzgl-yhgl" },
+        component: sporadicOUTtareWeight
+      },
+      {
+        path: "sporadicOUTload",
+        name: "sporadicOUTload",
+        meta: { code: "xtpzgl-yhgl" },
+        component: sporadicOUTload
+      },
 
       //钢材退货运输预约
-      {path:'addSteelReturnTransportAppoint',name:'addSteelReturnTransportAppoint',meta:{code:'xtpzgl-yhgl'},component:addSteelReturnTransportAppoint},
-      {path:'steelReturnTransportAppoint',name:'steelReturnTransportAppoint',meta:{code:'xtpzgl-yhgl'},component:steelReturnTransportAppoint},
-      {path: 'editSteelReturnTransportAppoint', name: 'editSteelReturnTransportAppoint', meta: {code: 'xtpzgl-yhgl'}, component: editSteelReturnTransportAppoint},
+      {
+        path: "addSteelReturnTransportAppoint",
+        name: "addSteelReturnTransportAppoint",
+        meta: { code: "xtpzgl-yhgl" },
+        component: addSteelReturnTransportAppoint
+      },
+      {
+        path: "steelReturnTransportAppoint",
+        name: "steelReturnTransportAppoint",
+        meta: { code: "xtpzgl-yhgl" },
+        component: steelReturnTransportAppoint
+      },
+      {
+        path: "editSteelReturnTransportAppoint",
+        name: "editSteelReturnTransportAppoint",
+        meta: { code: "xtpzgl-yhgl" },
+        component: editSteelReturnTransportAppoint
+      },
       //钢材退货运输订单
-      {path:'addSteelReturnTransportOrder',name:'addSteelReturnTransportOrder',meta:{code:'xtpzgl-jggl'},component:addSteelReturnTransportOrder},
-      {path:'steelReturnTransportOrder',name:'steelReturnTransportOrder',meta:{code:'xtpzgl-yhgl'},component:steelReturnTransportOrder},
-      {path: 'editSteelReturnTransportOrder', name: 'editSteelReturnTransportOrder', meta: {code: 'xtpzgl-yhgl'}, component: editSteelReturnTransportOrder},
+      {
+        path: "addSteelReturnTransportOrder",
+        name: "addSteelReturnTransportOrder",
+        meta: { code: "xtpzgl-jggl" },
+        component: addSteelReturnTransportOrder
+      },
+      {
+        path: "steelReturnTransportOrder",
+        name: "steelReturnTransportOrder",
+        meta: { code: "xtpzgl-yhgl" },
+        component: steelReturnTransportOrder
+      },
+      {
+        path: "editSteelReturnTransportOrder",
+        name: "editSteelReturnTransportOrder",
+        meta: { code: "xtpzgl-yhgl" },
+        component: editSteelReturnTransportOrder
+      },
       //钢材退货进厂
-      {path:'steelReturnEnfactory',name:'steelReturnEnfactory',meta:{code:'xtpzgl-yhgl'},component:steelReturnEnfactory},
-      {path:'steelReturnGrossWeight',name:'steelReturnGrossWeight',meta:{code:'xtpzgl-yhgl'},component:steelReturnGrossWeight},
-      {path:'steelReturnOutFactory',name:'steelReturnOutFactory',meta:{code:'xtpzgl-yhgl'},component:steelReturnOutFactory},
-      {path:'steelReturnTareWeight',name:'steelReturnTareWeight',meta:{code:'xtpzgl-yhgl'},component:steelReturnTareWeight},
-      {path:'steelReturnUnload',name:'steelReturnUnload',meta:{code:'xtpzgl-yhgl'},component:steelReturnUnload},
+      {
+        path: "steelReturnEnfactory",
+        name: "steelReturnEnfactory",
+        meta: { code: "xtpzgl-yhgl" },
+        component: steelReturnEnfactory
+      },
+      {
+        path: "steelReturnGrossWeight",
+        name: "steelReturnGrossWeight",
+        meta: { code: "xtpzgl-yhgl" },
+        component: steelReturnGrossWeight
+      },
+      {
+        path: "steelReturnOutFactory",
+        name: "steelReturnOutFactory",
+        meta: { code: "xtpzgl-yhgl" },
+        component: steelReturnOutFactory
+      },
+      {
+        path: "steelReturnTareWeight",
+        name: "steelReturnTareWeight",
+        meta: { code: "xtpzgl-yhgl" },
+        component: steelReturnTareWeight
+      },
+      {
+        path: "steelReturnUnload",
+        name: "steelReturnUnload",
+        meta: { code: "xtpzgl-yhgl" },
+        component: steelReturnUnload
+      },
 
-       //一车多趟运输预约
-       {path:'addMornThanTransportAppoint',name:'addMornThanTransportAppoint',meta:{code:'xtpzgl-jggl'},component:addMornThanTransportAppoint},
-       {path:'mornThanTransportAppoint',name:'mornThanTransportAppoint',meta:{code:'xtpzgl-yhgl'},component:mornThanTransportAppoint},
-       //一车多趟运输订单
-       {path:'addMornThanTransportOrder',name:'addMornThanTransportOrder',meta:{code:'xtpzgl-jggl'},component:addMornThanTransportOrder},
-       {path:'mornThanTransportOrder',name:'mornThanTransportOrder',meta:{code:'xtpzgl-yhgl'},component:mornThanTransportOrder},
-       //一车多趟进厂
-       {path:'mornThanENenfactory',name:'mornThanENenfactory',meta:{code:'xtpzgl-yhgl'},component:mornThanENenfactory},
-       {path:'mornThanENgrossWeight',name:'mornThanENgrossWeight',meta:{code:'xtpzgl-yhgl'},component:mornThanENgrossWeight},
-       {path:'mornThanENoutFactory',name:'mornThanENoutFactory',meta:{code:'xtpzgl-yhgl'},component:mornThanENoutFactory},
-       {path:'mornThanENtareWeight',name:'mornThanENtareWeight',meta:{code:'xtpzgl-yhgl'},component:mornThanENtareWeight},
-       {path:'mornThanENunload',name:'mornThanENunload',meta:{code:'xtpzgl-yhgl'},component:mornThanENunload},
-       //一车多趟出厂
-       {path:'mornThanOUTenfactory',name:'mornThanOUTenfactory',meta:{code:'xtpzgl-yhgl'},component:mornThanOUTenfactory},
-       {path:'mornThanOUTgrossWeight',name:'mornThanOUTgrossWeight',meta:{code:'xtpzgl-yhgl'},component:mornThanOUTgrossWeight},
-       {path:'mornThanOUToutFactory',name:'sporadicOUToutFactory',meta:{code:'xtpzgl-yhgl'},component:mornThanOUToutFactory},
-       {path:'mornThanOUTtareWeight',name:'sporadicOUTtareWeight',meta:{code:'xtpzgl-yhgl'},component:mornThanOUTtareWeight},
-       {path:'mornThanOUTload',name:'mornThanOUTload',meta:{code:'xtpzgl-yhgl'},component:mornThanOUTload},
+      //一车多趟运输预约
+      {
+        path: "addMornThanTransportAppoint",
+        name: "addMornThanTransportAppoint",
+        meta: { code: "xtpzgl-jggl" },
+        component: addMornThanTransportAppoint
+      },
+      {
+        path: "mornThanTransportAppoint",
+        name: "mornThanTransportAppoint",
+        meta: { code: "xtpzgl-yhgl" },
+        component: mornThanTransportAppoint
+      },
+      //一车多趟运输订单
+      {
+        path: "addMornThanTransportOrder",
+        name: "addMornThanTransportOrder",
+        meta: { code: "xtpzgl-jggl" },
+        component: addMornThanTransportOrder
+      },
+      {
+        path: "mornThanTransportOrder",
+        name: "mornThanTransportOrder",
+        meta: { code: "xtpzgl-yhgl" },
+        component: mornThanTransportOrder
+      },
+      //一车多趟进厂
+      {
+        path: "mornThanENenfactory",
+        name: "mornThanENenfactory",
+        meta: { code: "xtpzgl-yhgl" },
+        component: mornThanENenfactory
+      },
+      {
+        path: "mornThanENgrossWeight",
+        name: "mornThanENgrossWeight",
+        meta: { code: "xtpzgl-yhgl" },
+        component: mornThanENgrossWeight
+      },
+      {
+        path: "mornThanENoutFactory",
+        name: "mornThanENoutFactory",
+        meta: { code: "xtpzgl-yhgl" },
+        component: mornThanENoutFactory
+      },
+      {
+        path: "mornThanENtareWeight",
+        name: "mornThanENtareWeight",
+        meta: { code: "xtpzgl-yhgl" },
+        component: mornThanENtareWeight
+      },
+      {
+        path: "mornThanENunload",
+        name: "mornThanENunload",
+        meta: { code: "xtpzgl-yhgl" },
+        component: mornThanENunload
+      },
+      //一车多趟出厂
+      {
+        path: "mornThanOUTenfactory",
+        name: "mornThanOUTenfactory",
+        meta: { code: "xtpzgl-yhgl" },
+        component: mornThanOUTenfactory
+      },
+      {
+        path: "mornThanOUTgrossWeight",
+        name: "mornThanOUTgrossWeight",
+        meta: { code: "xtpzgl-yhgl" },
+        component: mornThanOUTgrossWeight
+      },
+      {
+        path: "mornThanOUToutFactory",
+        name: "sporadicOUToutFactory",
+        meta: { code: "xtpzgl-yhgl" },
+        component: mornThanOUToutFactory
+      },
+      {
+        path: "mornThanOUTtareWeight",
+        name: "sporadicOUTtareWeight",
+        meta: { code: "xtpzgl-yhgl" },
+        component: mornThanOUTtareWeight
+      },
+      {
+        path: "mornThanOUTload",
+        name: "mornThanOUTload",
+        meta: { code: "xtpzgl-yhgl" },
+        component: mornThanOUTload
+      },
 
-       //内转零星内转
-       {path:'sporadicEnfactoryInward',name:'sporadicEnfactoryInward',meta:{code:'xtpzgl-yhgl'},component:sporadicEnfactoryInward},
-       {path:'sporadicgrossWeightInward',name:'sporadicgrossWeightInward',meta:{code:'xtpzgl-yhgl'},component:sporadicgrossWeightInward},
-       {path:'sporadicLeavefactoryInward',name:'sporadicLeavefactoryInward',meta:{code:'xtpzgl-yhgl'},component:sporadicLeavefactoryInward},
-       {path:'sporadicLoadInward',name:'sporadicLoadInward',meta:{code:'xtpzgl-yhgl'},component:sporadicLoadInward},
-       {path:'sporadicTareWeightInward',name:'sporadicTareWeightInward',meta:{code:'xtpzgl-yhgl'},component:sporadicTareWeightInward},
-       {path:'sporadicUnloadInward',name:'sporadicUnloadInward',meta:{code:'xtpzgl-yhgl'},component:sporadicUnloadInward},
+      //内转零星内转
+      {
+        path: "sporadicEnfactoryInward",
+        name: "sporadicEnfactoryInward",
+        meta: { code: "xtpzgl-yhgl" },
+        component: sporadicEnfactoryInward
+      },
+      {
+        path: "sporadicgrossWeightInward",
+        name: "sporadicgrossWeightInward",
+        meta: { code: "xtpzgl-yhgl" },
+        component: sporadicgrossWeightInward
+      },
+      {
+        path: "sporadicLeavefactoryInward",
+        name: "sporadicLeavefactoryInward",
+        meta: { code: "xtpzgl-yhgl" },
+        component: sporadicLeavefactoryInward
+      },
+      {
+        path: "sporadicLoadInward",
+        name: "sporadicLoadInward",
+        meta: { code: "xtpzgl-yhgl" },
+        component: sporadicLoadInward
+      },
+      {
+        path: "sporadicTareWeightInward",
+        name: "sporadicTareWeightInward",
+        meta: { code: "xtpzgl-yhgl" },
+        component: sporadicTareWeightInward
+      },
+      {
+        path: "sporadicUnloadInward",
+        name: "sporadicUnloadInward",
+        meta: { code: "xtpzgl-yhgl" },
+        component: sporadicUnloadInward
+      },
 
       //老厂零星物资运输预约
-      {path:'addOldSporadicAppoint',name:'addOldSporadicAppoint',meta:{code:'xtpzgl-jggl'},component:addOldSporadicAppoint},
-      {path:'oldSporadicAppoint',name:'oldSporadicAppoint',meta:{code:'xtpzgl-yhgl'},component:oldSporadicAppoint},
-      {path: 'editSporadicTransportAppoint', name: 'editSporadicTransportAppoint', meta: {code: 'xtpzgl-yhgl'}, component: editSporadicTransportAppoint},
+      {
+        path: "addOldSporadicAppoint",
+        name: "addOldSporadicAppoint",
+        meta: { code: "xtpzgl-jggl" },
+        component: addOldSporadicAppoint
+      },
+      {
+        path: "oldSporadicAppoint",
+        name: "oldSporadicAppoint",
+        meta: { code: "xtpzgl-yhgl" },
+        component: oldSporadicAppoint
+      },
+      {
+        path: "editSporadicTransportAppoint",
+        name: "editSporadicTransportAppoint",
+        meta: { code: "xtpzgl-yhgl" },
+        component: editSporadicTransportAppoint
+      },
       //零星物资运输订单
-      {path:'addOldSporadicOrder',name:'addOldSporadicOrder',meta:{code:'xtpzgl-jggl'},component:addOldSporadicOrder},
-      {path:'oldSporadicOrder',name:'oldSporadicOrder',meta:{code:'xtpzgl-yhgl'},component:oldSporadicOrder},
+      {
+        path: "addOldSporadicOrder",
+        name: "addOldSporadicOrder",
+        meta: { code: "xtpzgl-jggl" },
+        component: addOldSporadicOrder
+      },
+      {
+        path: "oldSporadicOrder",
+        name: "oldSporadicOrder",
+        meta: { code: "xtpzgl-yhgl" },
+        component: oldSporadicOrder
+      },
       //零星物资运输执行
-      {path:'oldSporadicInwardTenfactory',name:'oldSporadicInwardTenfactory',meta:{code:'xtpzgl-yhgl'},component:oldSporadicInwardTenfactory},
-      {path:'oldSporadicInwardGrossWeight',name:'oldSporadicInwardGrossWeight',meta:{code:'xtpzgl-yhgl'},component:oldSporadicInwardGrossWeight},
-      {path:'oldSporadicInwardoutFactory',name:'oldSporadicInwardoutFactory',meta:{code:'xtpzgl-yhgl'},component:oldSporadicInwardoutFactory},
-      {path:'oldSporadicInwardtareWeight',name:'oldSporadicInwardtareWeight',meta:{code:'xtpzgl-yhgl'},component:oldSporadicInwardtareWeight},
-      {path:'oldSporadicInwardUnload',name:'oldSporadicInwardUnload',meta:{code:'xtpzgl-yhgl'},component:oldSporadicInwardUnload},
-      {path:'oldSporadicInwardload',name:'oldSporadicInwardload',meta:{code:'xtpzgl-yhgl'},component:oldSporadicInwardload},
-    ]    
+      {
+        path: "oldSporadicInwardTenfactory",
+        name: "oldSporadicInwardTenfactory",
+        meta: { code: "xtpzgl-yhgl" },
+        component: oldSporadicInwardTenfactory
+      },
+      {
+        path: "oldSporadicInwardGrossWeight",
+        name: "oldSporadicInwardGrossWeight",
+        meta: { code: "xtpzgl-yhgl" },
+        component: oldSporadicInwardGrossWeight
+      },
+      {
+        path: "oldSporadicInwardoutFactory",
+        name: "oldSporadicInwardoutFactory",
+        meta: { code: "xtpzgl-yhgl" },
+        component: oldSporadicInwardoutFactory
+      },
+      {
+        path: "oldSporadicInwardtareWeight",
+        name: "oldSporadicInwardtareWeight",
+        meta: { code: "xtpzgl-yhgl" },
+        component: oldSporadicInwardtareWeight
+      },
+      {
+        path: "oldSporadicInwardUnload",
+        name: "oldSporadicInwardUnload",
+        meta: { code: "xtpzgl-yhgl" },
+        component: oldSporadicInwardUnload
+      },
+      {
+        path: "oldSporadicInwardload",
+        name: "oldSporadicInwardload",
+        meta: { code: "xtpzgl-yhgl" },
+        component: oldSporadicInwardload
+      }
+    ]
   }
 ];
 
 const router = new Router({
   routes: constantRouterMap
-})
+});
 //  before
 routerBefore(router, constantRouterMap);
 

+ 12 - 0
src/views/TMS/app.js

@@ -16,14 +16,26 @@ import VueApollo from 'vue-apollo'
 import apollo from '@/config/apolloConfig.js'
 
 
+
+import VXETable from "vxe-table";
+import "vxe-table/lib/style.css";
+Vue.use(VXETable);
+Vue.prototype.$XModal = VXETable.modal;
 // 关闭生产模式下给出的提示
 Vue.config.productionTip = false;
 
 // 注册表格的全局组件
 import DilCommonUI from "@/components/DilCommonUI";
+
 Vue.use(DilCommonUI);
 
 Vue.use(VueApollo)
+import htmlToPdf from "@/components/exportPdf/exportPdf";
+Vue.use(htmlToPdf);
+
+// 导出Excel全局组件
+import tableToExcel from "@/components/exportExcel/exportExcel";
+Vue.use(tableToExcel);
 
 const apolloProvider = new VueApollo({
     defaultClient: apollo

+ 26 - 9
src/views/TMS/components/bmsport/addHandlingFee.vue

@@ -1,18 +1,14 @@
 <template>
   <!-- 船只信息页面 -->
-  <div class="homeworkPath">
+  <div class="handingFee">
     <page-title>港口装卸费</page-title>
-    <div class="main">
-      <span class="text">港口装卸费新增</span>
-      <span class="a"></span>
-    </div>
     <div>
-      <div class="form-box" style="margin-left: 5rem">
-        <el-form ><dil-form :formId="222" v-model="form"></dil-form></el-form>
+      <div class="form-box">
+        <dil-form :formId="222" v-model="form"></dil-form>
       </div>
     </div>
-    <div class="button-ins">
-      <el-button type="primary" @click="makeSure">新增港口装卸费</el-button>
+    <div class="button-box">
+      <el-button type="primary" @click="makeSure">新增</el-button>
     </div>
     <dilTable v-bind.sync="option" @radio-change="currentRadioChange">
     </dilTable>
@@ -87,4 +83,25 @@ export default {
 };
 </script>
 <style lang='scss' scoped>
+    .handingFee {
+      .form-box {
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        .el-form-item {
+          display: flex;
+          .el-form-item__label {
+            width: 170px !important;
+          }
+          .el-input {
+            width: 210px !important;
+          }
+    }
+      }
+      .button-box {
+        display: flex;
+        justify-content: center;
+        align-items: center;
+      }
+    }
 </style>

+ 5 - 5
src/views/TMS/components/bmsport/handlingFee.vue

@@ -3,9 +3,6 @@
   <div class="homeworkPath">
     <div class="top">
       <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
-      <el-button type="primary" class="btn" @click="onclick">
-        <i class="el-icon-search"></i>查询
-      </el-button>
       <el-button type="primary" class="btn" @click="addclick">
         新增
       </el-button>
@@ -13,9 +10,9 @@
     <dilTable v-bind.sync="option">
       <el-table-column fixed="right" label="操作" align="center" width="100">
         <template slot-scope="scope">
-          <el-button @click="click(scope.row.feeId)" type="text" size="small"
+          <!-- <el-button @click="click(scope.row.feeId)" type="text" size="small"
             >编辑</el-button
-          >
+          > -->
           <el-button
             type="text"
             size="small"
@@ -92,6 +89,9 @@ export default {
 .homeworkPath {
   .top {
     padding: 1.25rem 1.875rem;
+    .el-input {
+      width: 250px;
+    }
   }
 }
 </style>

+ 14 - 8
src/views/TMS/components/bmsport/updateHandlingFee.vue

@@ -2,18 +2,11 @@
   <!-- 修改港口装卸费 -->
   <div id="contractDetails">
     <page-title>编辑</page-title>
-    <div class="main">
-      <span class="text">港口装卸费</span>
-      <span class="a"></span>
-    </div>
     <div class="contractTitle">
       <div class="form-box">
-        <div class="form-one">
           <dil-form :formId="223" v-model="form1"></dil-form>
-        </div>
       </div>
     </div>
-
     <div class="button-box">
       <el-button type="primary" @click="onClickConfirm">确认</el-button>
       <el-button @click="onClickCancel">返回</el-button>
@@ -91,5 +84,18 @@ export default {
 };
 </script>
 <style lang="scss" scoped>
-// @import "@/styles/appoint/contract/ContractInsert.scss";
+  .form-box {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    .el-form-item {
+          display: flex;
+          .el-form-item__label {
+            width: 170px !important;
+          }
+          .el-input {
+            width: 210px !important;
+          }
+    }
+  }
 </style>

+ 333 - 0
src/views/TMS/components/bmsship/addMoistureDetection.vue

@@ -0,0 +1,333 @@
+<template>
+  <!-- 添加二程船水运费1-->
+  <div class="addWagonLoad">
+    <PageTitle>返回</PageTitle>
+    <div class="form-box">
+      <!-- <dil-form :formId="271" v-model="form1" ref="from1"></dil-form> -->
+      <el-form v-model="form">
+        <div class="searchSelect">
+          <span class="text">江船</span>
+          <el-input class="input" v-model="batchName" disabled> </el-input>
+          <el-button class="button" type="primary" @click="ondrawer(5)"
+            >浏览</el-button
+          >
+        </div>
+        <div class="switch">
+          <el-switch v-model="value1" active-text="拼装" inactive-text="不拼装">
+          </el-switch>
+        </div>
+        <div class="searchSelect">
+          <span class="text">单价</span>
+          <el-input
+            class="input"
+            v-model="form.unitPrice"
+            disabled
+            @change="calculate"
+          >
+          </el-input>
+          <el-button class="button" type="primary" @click="ondrawer(6)"
+            >浏览</el-button
+          >
+        </div>
+        <div class="preview-group">
+          <el-form-item label="港口数" v-if="spell == 'true'">
+            <el-input v-model="form.portNum" type="number"></el-input>
+          </el-form-item>
+          <el-form-item label="船数" v-if="noSpell == 'false'">
+            <el-input v-model="form.shipNum" type="number"></el-input>
+          </el-form-item>
+          <el-form-item label="开票日期">
+            <el-date-picker
+              v-model="form.makeTime"
+              type="datetime"
+              placeholder="选择日期"
+            >
+            </el-date-picker>
+          </el-form-item>
+        </div>
+      </el-form>
+    </div>
+    <!-- 模态框 -->
+    <el-drawer
+      :visible.sync="drawer"
+      :direction="direction"
+      :before-close="handleClose"
+      size="50%"
+    >
+      <el-input
+        placeholder="请输入内容"
+        v-model="input"
+        style="margin-top: 10px; margin-left: 20px; width: 250px"
+        clearable
+      >
+      </el-input>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="onclick(a)"
+        style="margin-bottom: 15px"
+      >
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <div v-show="a == 5">
+        <dilTable
+          v-bind.sync="batchOption"
+          @radio-change="batchChange"
+          :isKuang="isKuang"
+        ></dilTable>
+      </div>
+      <div v-show="a == 6">
+        <dilTable
+          v-bind.sync="contractPriceOption"
+          @radio-change="priceChange"
+          :isKuang="isKuang"
+        ></dilTable>
+      </div>
+    </el-drawer>
+    <!-- 底部按钮 -->
+    <div class="button-box">
+      <el-button @click="cancel">取消</el-button>
+      <el-button type="primary" @click="makeSure" :loading="isLoading"
+        >确定</el-button
+      >
+    </div>
+  </div>
+</template>
+
+<script>
+import PageTitle from "@/components/Page/Title";
+import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
+import { BigNumber } from "bignumber.js";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+      isKuang: false,
+
+      spell: false,
+      noSpell: "false",
+      value1: false,
+      form: {},
+      portId: null,
+      ports: [],
+      isLoading: false,
+      drawer: false,
+      direction: "rtl",
+      a: 0,
+      input: null,
+      batchId: null,
+      purchaseOrderId: null,
+      batchName: null,
+      cargoPictureUrl: "",
+      batchOption: {
+        requestUrl: "/api/v1/bms/getShipResult?apiId=112",
+        selectionType: "radio",
+        map: []
+      },
+      contractPriceOption: {
+        requestUrl: "/api/v1/rms/selectbmsshipContractPriceList?apiId=500",
+        selectionType: "radio",
+        map: []
+      }
+    };
+  },
+  mounted() {
+    //this.getPorts();
+  },
+  computed: {
+    portNum() {
+      return this.form.portNum;
+    }
+  },
+  watch: {
+    portNum() {
+      console.log(this.form.portNum);
+    },
+    value1() {
+      if (this.value1) {
+        this.spell = "true";
+        this.noSpell = "true";
+      } else {
+        this.spell = "false";
+        this.noSpell = "false";
+      }
+    }
+  },
+  methods: {
+    //右侧选中框
+    ondrawer(num) {
+      this.drawer = true;
+      this.isKuang = true;
+      this.a = num;
+      if (num == 5) {
+        this.batchOption.requestUrl =
+          "/api/v1/bms/getShipResult?apiId=112" + "&i=" + new Date();
+      } else if (num == 6) {
+        this.contractPriceOption.requestUrl =
+          "/api/v1/rms/selectbmsshipContractPriceList?apiId=500" +
+          "&i=" +
+          new Date();
+      }
+      // 清空当前输入框中的数据
+      this.input = "";
+    },
+    handleClose(done) {
+      done();
+    },
+    onclick(a) {
+      if (a == 5) {
+        this.batchOption.requestUrl =
+          "/api/v1/bms/getShipResult?apiId=112&index=" + this.input;
+      } else if (a == 6) {
+        this.contractPriceOption.requestUrl =
+          "/api/v1/rms/selectbmsshipContractPriceList?apiId=500&con=" +
+          this.input;
+      }
+    },
+    //修改选中
+    batchChange(selection) {
+      console.log(selection);
+      this.batchId = selection.batchId;
+      this.purchaseOrderId = selection.purchaseOrderId;
+      this.batchName = selection.materialName + selection.resultForeignShipName;
+    },
+    priceChange(selection) {
+      this.form.unitPriceId = selection.resultId;
+      this.form.unitPrice = selection.unitPrice;
+      this.calculate();
+    },
+    //计算水运费
+    calculate() {
+      console.log(
+        "能否计算水运费:",
+        this.form.realTonnage && this.form.unitPrice
+      );
+      if (this.form.realTonnage && this.form.unitPrice) {
+        let fee = new BigNumber(this.form.realTonnage);
+        this.$set(
+          this.form,
+          "fee",
+          fee.multipliedBy(this.form.unitPrice).toNumber()
+        );
+        console.log(this.form.fee);
+      }
+    },
+    makeSure() {
+      this.isLoading=true;
+      let map = {
+        batchId: this.batchId,
+
+        purchaseOrderId: this.purchaseOrderId,
+        unitPrice: this.form.unitPrice,
+        unitPriceId: this.form.unitPriceId,
+        shipNum: this.form.shipNum,
+        portNum: this.form.portNum,
+        makeTime: sjTime(this.form.makeTime),
+        feeType: 5,
+        userId: getCookie("userId")
+      };
+      console.log(map);
+      if (
+        map.batchId == null ||
+        map.purchaseOrderId == null ||
+        map.unitPrice == null ||
+        map.unitPriceId == null ||
+        map.makeTime == null
+      ) {
+        this.$message.error("存在空值!");
+        this.isLoading = false;
+      } else {
+        this.axios
+          .post("/api/v1/bms/addwaterStatement", map)
+          .then(res => {
+            if (res.data.code == 200) {
+              this.$message({
+                type: "success",
+                message: "新增成功!"
+              });
+              this.cancel();
+            } else {
+              this.$message.error(res.data.data);
+              this.isLoading = false;
+            }
+          })
+          .then(() => {
+            this.isLoading = false;
+          });
+      }
+    },
+    // 取消
+    cancel() {
+      this.$router.go(-1);
+    },
+    //查询港口id
+    getPorts() {
+      this.axios.post("/api/v1/rms/getPortName?index=").then(res => {
+        if (res.data.code == 200) {
+          this.ports = res.data.data;
+          console.log(this.ports);
+        } else {
+          this.$message.error(res.data.data);
+        }
+      });
+    },
+
+    upCLick(val) {
+      this.num = val;
+    }
+  }
+};
+</script>
+<style lang="scss">
+.searchSelect {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  margin: 5px;
+  .text {
+    width: 40px;
+  }
+  .input {
+    width: 200px;
+  }
+  .button {
+    margin-left: 6px;
+  }
+}
+.switch {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  margin-top: 20px;
+  margin-bottom: 20px;
+}
+.button-box {
+  display: flex;
+  justify-content: center;
+  margin: 20px;
+  .el-button {
+    width: 80px;
+    margin: 10px;
+  }
+}
+.form-box {
+  display: flex;
+  justify-content: center;
+  .el-form-item {
+    display: flex;
+    justify-content: center;
+    .el-form-item__label {
+      display: flex;
+      align-items: center;
+    }
+    .el-form-item__content {
+      .el-input {
+        .el-input__inner {
+          width: 250px;
+        }
+      }
+    }
+  }
+}
+</style>

+ 510 - 0
src/views/TMS/components/bmsship/addThreeSectionFee.vue

@@ -0,0 +1,510 @@
+<template>
+  <!-- 添加二程船水运费1-->
+  <div class="addWagonLoad">
+    <PageTitle>返回</PageTitle>
+    <div class="form-box">
+      <!-- <dil-form :formId="271" v-model="form1" ref="from1"></dil-form> -->
+      <el-form v-model="form">
+        <div class="searchSelect">
+          <span class="text">批次</span>
+          <el-input class="input" v-model="batchName" disabled> </el-input>
+          <el-button class="button" type="primary" @click="ondrawer(5)"
+            >浏览</el-button
+          >
+        </div>
+         <div class="searchSelect">
+          <span class="text">发运港</span>
+          <el-input class="input" v-model="form.portName" disabled> </el-input>
+          <el-button class="button" type="primary" @click="ondrawer(7)"
+            >浏览</el-button
+          >
+        </div>
+         <div class="searchSelect">
+            <span class="text">单价</span>
+            <el-input class="input" v-model="form.unitPrice" disabled  @change="calculate"> </el-input>
+            <el-button class="button" type="primary" @click="ondrawer(6)">浏览</el-button>
+        </div>
+        <div class="preview-group">
+           <el-form-item label="装船时间">
+              <el-input
+                v-model="form.resultLoadShipDate"
+                placeholder="装船时间"
+                disabled
+              ></el-input>
+            </el-form-item>
+            <el-form-item label="离港时间">
+              <el-input
+                v-model="form.resultOutPortTime"
+                placeholder="离港时间"
+                disabled
+              ></el-input>
+            </el-form-item>
+            <el-form-item label="吨位">
+              <el-input
+                v-model="form.realTonnage"
+                placeholder="吨位"
+                disabled
+              ></el-input>
+            </el-form-item>
+            <el-form-item label="水运费用">
+                <el-input v-model="form.fee" type="number" disabled></el-input>
+            </el-form-item>
+            <el-form-item label="预开吨位">
+              <el-input
+                v-model="form.previewTonnage"
+                placeholder="预开吨位"
+                @change="calculate"
+              ></el-input>
+            </el-form-item>
+            <el-form-item label="预开金额">
+                <el-input v-model="form.previewFee" type="number" disabled></el-input>
+            </el-form-item>
+            <el-form-item label="装船含水吨位">
+              <el-input
+                v-model="form.loadWater"
+                placeholder="装船含水吨位"
+              ></el-input>
+            </el-form-item>
+            <el-form-item label="进厂含水吨位">
+              <el-input
+                v-model="form.enFacotoryWater"
+                placeholder="进厂含水吨位"
+              ></el-input>
+            </el-form-item>
+        <el-form-item label="开票吨位">
+              <el-input
+                v-model="form.makeTonnage"
+                placeholder="开票吨位"
+                @change="calculate"
+              ></el-input>
+            </el-form-item>
+            <el-form-item label="开票金额">
+                <el-input v-model="form.makeFee" type="number"></el-input>
+            </el-form-item>
+          <el-form-item label="开票日期">
+            <el-date-picker
+              v-model="form.makeTime"
+              type="datetime"
+              placeholder="选择日期"
+            >
+            </el-date-picker>
+          </el-form-item>
+          <el-form-item label="上传水运单图片">
+            <el-upload
+              class="upload-demo"
+              style="width: 270px"
+              ref="upload1"
+              accept=".pdf , .jpg, .png, .jpeg, .tif, .gif, .pcx, .tga, .exif, .fpx, .svg , .bmp"
+              action="/api/v1/bms/uploadBmsshipOrder"
+              :before-upload="beforeUpload"
+              :multiple="false"
+              list-type="picture"
+              :show-file-list="false"
+              :on-success="handleAvatarSuccess"
+              :on-error="onError(1)"
+            >
+              <el-input
+                class="shippingCertificate"
+                style="width: 270px; display: flex"
+                placeholder="上传水运单图片(必填项)"
+                v-model="form.image"
+                disabled
+              >
+              </el-input>
+              <el-button
+                size="small"
+                type="primary"
+                style="
+                      width: 115px;
+                      height: 35px;
+                      margin-left: 275px;
+                      margin-top: -35px;
+                      display: flex;
+                      "
+                @click="upCLick(1)"
+              >
+                点击上传附件</el-button
+              >
+            </el-upload>
+          </el-form-item>
+        </div>
+      </el-form>
+    </div>
+    <!-- 模态框 -->
+    <el-drawer
+      :visible.sync="drawer"
+      :direction="direction"
+      :before-close="handleClose"
+      size="50%"
+    >
+      <el-input
+        placeholder="请输入内容"
+        v-model="input"
+        style="margin-top: 10px; margin-left: 20px; width: 250px"
+        clearable
+      >
+      </el-input>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="onclick(a)"
+        style="margin-bottom: 15px"
+      >
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <div v-show="a == 5">
+        <dilTable
+          v-bind.sync="batchOption"
+          @radio-change="batchChange"
+        ></dilTable>
+      </div>
+      <div v-show="a == 6">
+        <dilTable
+          v-bind.sync="contractPriceOption"
+          @radio-change="priceChange"
+        ></dilTable>
+      </div>
+      <div v-show="a == 7">
+        <dilTable
+          v-bind.sync="loadShipOption"
+          @radio-change="loadShipChange"
+        ></dilTable>
+      </div>
+    </el-drawer>
+    <!-- 底部按钮 -->
+    <div class="button-box">
+      <el-button @click="cancel">取消</el-button>
+      <el-button type="primary" @click="makeSure" :loading="isLoading"
+        >确定</el-button
+      >
+    </div>
+  </div>
+</template>
+
+<script>
+import PageTitle from "@/components/Page/Title";
+import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
+import { BigNumber } from "bignumber.js";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+      indexNum: null,
+      form: {},
+      portId: null,
+      ports: [],
+      isLoading: false,
+      loadShips:null,
+      totalResultId:null,
+      drawer: false,
+      direction: "rtl",
+      a: 0,
+      input: null,
+      batchId: null,
+      purchaseOrderId: null,
+      batchName: null,
+      cargoPictureUrl: "",
+      resultLoadShipDate:null,
+      resultOutDate:null,
+      resultActualInstallations:null,
+      batchOption: {
+        requestUrl: "/api/v1/uc/findBatchHavingLoad?apiId=502",
+        selectionType: "radio",
+        map: []
+      },
+      contractPriceOption: {
+        requestUrl: "/api/v1/rms/selectbmsshipContractPriceList?apiId=500",
+        selectionType: "radio",
+        map: []
+      },
+      loadShipOption: {
+        requestUrl: "/api/v1/bms/findLoadByBatch?apiId=505",
+        selectionType: "radio",
+        map: []
+      }
+    };
+  },
+  mounted() {
+    //this.getPorts();
+  },
+  computed: {
+    batch() {
+      return this.batchId;
+    }
+  },
+  watch: {
+    batch() {
+      console.log("无变化l");
+      this.findLoadByBatch();
+    }
+  },
+  methods: {
+    findLoadByBatch() {
+      if (this.batchId != null) {
+        this.loadShipOption.requestUrl="/api/v1/bms/findLoadByBatch?apiId=505&batchId="+this.batchId+
+        "&i="+new Date();
+      }
+    },
+    //右侧选中框
+    ondrawer(num, index) {
+      if (num == 5) {
+        this.batchOption.requestUrl =
+          "/api/v1/uc/findBatchHavingLoad?apiId=502" + "&i=" + new Date();
+      } else if (num == 6) {
+        this.contractPriceOption.requestUrl =
+          "/api/v1/rms/selectbmsshipContractPriceList?apiId=500" +
+          "&i=" +
+          new Date();
+      }
+      this.drawer = true;
+      this.indexNum = index;
+      this.a = num;
+      // 清空当前输入框中的数据
+      this.input = "";
+    },
+    handleClose(done) {
+      done();
+    },
+    onclick(a) {
+      if (a == 5) {
+        this.batchOption.requestUrl =
+          "/api/v1/uc/findBatchHavingLoad?apiId=502&index=" +
+          this.input +
+          "&i=" +
+          new Date();
+      } else if (a == 6) {
+        this.contractPriceOption.requestUrl =
+          "/api/v1/rms/selectbmsshipContractPriceList?apiId=500&con=" +
+          this.input;
+      }
+    },
+    //修改选中
+    batchChange(selection) {
+      console.log("SELECTION:",selection);
+      this.totalResultId=selection.totalResultId;
+      if (JSON.stringify(selection).length > 2) {
+        this.batchId = selection.batchId;
+        this.purchaseOrderId = selection.purchaseOrderId;
+        this.batchName =
+          selection.materialName + selection.resultForeignShipName;
+      } else {
+        this.batchId = null;
+        this.purchaseOrderId = null;
+        this.batchName = "";
+      }
+    },
+    priceChange(selection) {
+      this.form.Array[this.indexNum].unitPriceId = selection.resultId;
+      this.form.Array[this.indexNum].unitPrice = selection.unitPrice;
+      //   this.form.unitPriceId = selection.resultId;
+      //   this.form.unitPrice = selection.unitPrice;
+      this.calculate();
+    },
+    loadShipChange(selection){
+      console.log(selection);
+      this.form=selection;
+      this.calculate();
+    },
+    //计算水运费
+    calculate() {
+      if (this.form.realTonnage &&this.form.unitPrice) {
+        let fee = new BigNumber(
+          this.form.realTonnage
+        );
+        this.$set(
+          this.form,
+          "fee",
+          fee.multipliedBy(this.form.unitPrice).toNumber()
+        );
+      }
+      if (this.form.previewTonnage &&this.form.unitPrice) {
+        let previewFee = new BigNumber(
+          this.form.previewTonnage
+        );
+        this.$set(
+          this.form,
+          "previewFee",
+          previewFee.multipliedBy(this.form.unitPrice).toNumber()
+        );
+      }
+      if(this.form.makeTonnage &&this.form.unitPrice){
+         let makeFee = new BigNumber(
+            this.form.makeTonnage
+          );
+          this.$set(
+            this.form,
+            "makeFee",
+            makeFee.multipliedBy(this.form.unitPrice).toNumber()
+          );
+      }
+    },
+    makeSure() {
+      this.isLoading=true;
+      let map = {
+        batchId: this.form.batchId,
+        purchaseOrderId: this.purchaseOrderId,
+        unitPrice: this.form.unitPrice,
+        unitPriceId: this.form.unitPriceId,
+        realTonnage: this.form.realTonnage,
+        fee: this.form.fee,
+        previewTonnage:this.form.previewTonnage,
+        previewFee:this.form.previewFee,
+        makeTime: sjTime(this.form.makeTime),
+        image: this.form.image,
+        loadWater:this.form.loadWater,
+        enFacotoryWater:this.form.enFacotoryWater,
+        makeTonnage:this.form.makeTonnage,
+        makeFee:this.form.makeFee,
+        totalResultId:this.form.totalResultId,
+        feeType: 3,
+        portId:this.form.portId,
+        userId: getCookie("userId")
+      };
+      console.log(map);
+        if (
+          !map.batchId  ||
+          !map.purchaseOrderId  ||
+          !map.unitPrice ||
+          !map.unitPriceId  ||
+          !map.realTonnage ||
+          !map.fee  ||
+          !map.makeTime ||
+          !map.loadWater ||
+          !map.enFacotoryWater ||
+          !map.makeTonnage ||
+          !map.makeFee ||
+          !map.previewFee ||
+          !map.previewTonnage
+        ) {
+          this.$message.error("存在空值!");
+          this.isLoading = false;
+        } else {
+      this.axios
+        .post("/api/v1/bms/addPortHandlingFeeSecond", map)
+        .then(res => {
+          if (res.data.code == 200) {
+            this.$message({
+              type: "success",
+              message: "新增成功!"
+            });
+            this.cancel();
+          } else {
+            this.$message.error(res.data.data);
+          }
+        })
+        .then(() => {
+          this.isLoading = false;
+        });
+    }
+    },
+    // 取消
+    cancel() {
+      this.$router.go(-1);
+    },
+    //查询港口id
+    getPorts() {
+      this.axios.post("/api/v1/rms/getPortName?index=").then(res => {
+        if (res.data.code == 200) {
+          this.ports = res.data.data;
+          console.log(this.ports);
+        } else {
+          this.$message.error(res.data.data);
+        }
+      });
+    },
+    beforeUpload(file) {
+      this.upBool = true;
+      const isLt2M = file.size < 1024 * 1024 * 0.5;
+      if (!isLt2M) {
+        this.$message.error("上传文件大小不能超过500kb!");
+      } else {
+        let size = file.size / 1024;
+        let _URL = window.URL || window.webkitURL;
+        let img = new Image();
+        img.src = _URL.createObjectURL(file);
+      }
+      return isLt2M;
+    },
+    onError(err) {
+      if (this.upBool) {
+        if (this.num == 1) {
+          this.form.image = null;
+          this.$message.error("上传失败");
+        }
+      }
+    },
+    handleAvatarSuccess(res, file) {
+      if (res.code) {
+        this.upBool = false;
+        if (this.num == 1) {
+          this.form.image = res.data;
+        }
+        this.$message.success("上传成功");
+      }
+    },
+    upCLick(val) {
+      this.num = val;
+    }
+  }
+};
+</script>
+<style lang="scss">
+.searchSelect {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  margin: 5px;
+  .text {
+    width: 40px;
+  }
+  .input {
+    width: 200px;
+  }
+  .button {
+    margin-left: 6px;
+  }
+}
+.button-box {
+  display: flex;
+  justify-content: center;
+  margin: 20px;
+  .el-button {
+    width: 80px;
+    margin: 10px;
+  }
+}
+.material {
+  display: flex;
+  justify-content: center;
+  margin-top: 20px;
+  margin-right: 100px;
+  .text {
+    display: inline-block;
+    width: 170px;
+    text-align: right;
+  }
+  .el-input {
+    width: 250px;
+  }
+}
+.form-box {
+  display: flex;
+  justify-content: center;
+  .el-form-item {
+    display: flex;
+    justify-content: center;
+    .el-form-item__label {
+      display: flex;
+      align-items: center;
+    }
+    .el-form-item__content {
+      .el-input {
+        .el-input__inner {
+          width: 250px;
+        }
+      }
+    }
+  }
+}
+</style>

+ 328 - 0
src/views/TMS/components/bmsship/addThreeSectionHandleFee.vue

@@ -0,0 +1,328 @@
+<template>
+  <!-- 添加三程船装卸费4-->
+  <div class="addWagonLoad">
+    <PageTitle>返回</PageTitle>
+    <div class="form-box">
+      <!-- <dil-form :formId="271" v-model="form1" ref="from1"></dil-form> -->
+      <el-form v-model="form">
+        <div class="searchSelect">
+            <span class="text">批次</span>
+            <el-input class="input" v-model="batchName" disabled> </el-input>
+            <el-button class="button" type="primary" @click="ondrawer(5)">浏览</el-button>
+        </div>
+        <div class="searchSelect">
+            <span class="text">单价</span>
+            <el-input class="input" v-model="form.unitPrice" disabled  @change="calculate"> </el-input>
+            <el-button class="button" type="primary" @click="ondrawer(6)">浏览</el-button>
+        </div>
+        <div class="preview-group">
+          <el-form-item label="实装吨位">
+              <el-input v-model="form.realTonnage" type="number"  @change="calculate"></el-input>
+          </el-form-item>
+          <el-form-item label="水运费用">
+              <el-input v-model="form.fee" type="number" disabled></el-input>
+          </el-form-item>
+            <el-form-item label="开票日期">
+                <el-date-picker
+                  v-model="form.makeTime"
+                  type="datetime"
+                  placeholder="选择日期">
+              </el-date-picker>
+          </el-form-item>
+          <el-form-item label="上传水运单图片">
+              <el-upload
+                  class="upload-demo"
+                  style="width: 270px"
+                  ref="upload1"
+                  accept=".pdf , .jpg, .png, .jpeg, .tif, .gif, .pcx, .tga, .exif, .fpx, .svg , .bmp"
+                  action="/api/v1/bms/uploadBmsshipOrder"
+                  :before-upload="beforeUpload"
+                  :multiple="false"
+                  list-type="picture"
+                  :show-file-list="false"
+                  :on-success="handleAvatarSuccess"
+                  :on-error="onError(1)">
+                  <el-input
+                      class="shippingCertificate"
+                      style="width: 270px; display: flex"
+                      placeholder="上传水运单图片(必填项)"
+                      v-model="form.image"
+                      disabled
+                  >
+                  </el-input>
+                  <el-button
+                      size="small"
+                      type="primary"
+                      style="
+                      width: 115px;
+                      height: 35px;
+                      margin-left: 275px;
+                      margin-top: -35px;
+                      display: flex;
+                      "
+                      @click="upCLick(1)">
+                      点击上传附件</el-button
+                  >
+              </el-upload>
+          </el-form-item>
+        </div>
+     </el-form>
+    </div>
+    <!-- 模态框 -->
+    <el-drawer
+      :visible.sync="drawer"
+      :direction="direction"
+      :before-close="handleClose"
+      size="50%"
+    >
+      <el-input
+        placeholder="请输入内容"
+        v-model="input"
+        style="margin-top: 10px; margin-left: 20px; width: 250px"
+        clearable
+      >
+      </el-input>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="onclick(a)"
+        style="margin-bottom: 15px">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <div v-show="a == 5">
+        <dilTable
+          v-bind.sync="batchOption"
+          @radio-change="batchChange"
+        ></dilTable>
+      </div>
+      <div v-show="a == 6">
+        <dilTable
+          v-bind.sync="contractPriceOption"
+          @radio-change="priceChange"
+        ></dilTable>
+      </div>
+    </el-drawer>
+    <!-- 底部按钮 -->
+    <div class="button-box">
+      <el-button @click="cancel">取消</el-button>
+      <el-button type="primary" @click="makeSure" :loading="isLoading">确定</el-button>
+    </div>
+  </div>
+</template>
+
+<script>
+import PageTitle from "@/components/Page/Title";
+import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
+import {BigNumber} from 'bignumber.js';
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+      form: {},
+      portId:null,
+      ports:[],
+      isLoading:false,
+      drawer: false,
+      direction: "rtl",
+      a:0,
+      input:null,
+      batchId:null,
+      purchaseOrderId:null,
+      batchName:null,
+      cargoPictureUrl: "",
+      batchOption: {
+        requestUrl: "/api/v1/uc/selectPurchaseOrderForShip?apiId=502",
+        selectionType: "radio",
+        map: [],
+      },
+      contractPriceOption: {
+        requestUrl: "/api/v1/rms/selectbmsshipContractPriceList?apiId=500",
+        selectionType: "radio",
+        map: [],
+      }
+    };
+  },
+  mounted() {
+    //this.getPorts();
+  },
+  methods: {
+    //右侧选中框
+    ondrawer(num) {
+      this.drawer = true;
+      this.a = num;
+      // 清空当前输入框中的数据
+      this.input = "";
+    },
+    handleClose(done) {
+      done();
+    },
+    onclick(a) {
+        if(a==5){
+            this.batchOption.requestUrl =
+            "/api/v1/uc/selectPurchaseOrderForShip?apiId=502&index=" + this.input;
+        }else if(a==6){
+            this.contractPriceOption.requestUrl =
+            "/api/v1/rms/selectbmsshipContractPriceList?apiId=500&con=" + this.input;
+        }
+    },
+    //修改选中
+    batchChange(selection) {
+        console.log(selection);
+        this.batchId=selection.batchId;
+        this.purchaseOrderId=selection.purchaseOrderId;
+        this.batchName =selection.materialName + selection.resultForeignShipName;
+    },
+    priceChange(selection){
+        this.form.unitPriceId = selection.resultId;
+        this.form.unitPrice = selection.unitPrice;
+        this.calculate();
+    },
+    //计算水运费
+    calculate(){
+        console.log("能否计算水运费:",this.form.realTonnage && this.form.unitPrice);
+        if(this.form.realTonnage && this.form.unitPrice){
+           let fee = new BigNumber(this.form.realTonnage);
+           this.$set(this.form,'fee',fee.multipliedBy(this.form.unitPrice).toNumber())
+           console.log(this.form.fee);
+        }
+    },
+    makeSure() {
+      this.isLoading=true;
+      let map={
+        batchId:this.batchId,
+        purchaseOrderId:this.purchaseOrderId,
+        unitPrice:this.form.unitPrice,
+        unitPriceId:this.form.unitPriceId,
+        realTonnage:this.form.realTonnage,
+        fee:this.form.fee,
+        makeTime: sjTime(this.form.makeTime),
+        image:this.form.image,
+        feeType:4,
+        userId:getCookie("userId")
+      }
+      console.log(map);
+      if(map.batchId==null ||
+       map.purchaseOrderId==null ||
+       map.unitPrice==null ||
+       map.unitPriceId==null ||
+       map.realTonnage==null ||
+       map.fee==null ||
+       map.makeTime==null ||
+       map.image==null || map.image==''
+       ){
+        this.$message.error("存在空值!");
+        this.isLoading=false;
+      }else{
+         this.axios.post("/api/v1/bms/addPortHandlingFeeSecond",map).then(res => {
+          if (res.data.code == 200) {
+            this.$message({
+              type: "success",
+              message: "新增成功!"
+            });
+            this.cancel();
+          } else {
+            this.$message.error(res.data.data);
+          }
+        }).then(()=>{
+          this.isLoading=false;
+        });
+      }
+       
+    },
+    // 取消
+    cancel() {
+      this.$router.go(-1);
+    },
+    //查询港口id
+    getPorts(){
+        this.axios.post("/api/v1/rms/getPortName?index=").then(res => {
+          if (res.data.code == 200) {
+            this.ports=res.data.data;
+            console.log(this.ports);
+          } else {
+            this.$message.error(res.data.data);
+          }
+        });
+    },
+    beforeUpload(file) {
+      this.upBool = true;
+      const isLt2M = file.size < 1024 * 1024 * 0.5;
+      if (!isLt2M) {
+        this.$message.error("上传文件大小不能超过500kb!");
+      } else {
+        let size = file.size / 1024;
+        let _URL = window.URL || window.webkitURL;
+        let img = new Image();
+        img.src = _URL.createObjectURL(file);
+      }
+      return isLt2M;
+    },
+    onError(err) {
+      if (this.upBool) {
+        if (this.num == 1) {
+          this.form.image = null;
+          this.$message.error("上传失败");
+        }
+      }
+    },
+    handleAvatarSuccess(res, file) {
+      if (res.code) {
+        this.upBool = false;
+        if (this.num == 1) {
+          this.form.image = res.data;
+        }
+        this.$message.success("上传成功");
+      }
+    },
+    upCLick(val) {
+      this.num = val;
+    },
+  }
+};
+</script>
+<style lang="scss">
+.searchSelect {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    margin: 5px;
+    .text {
+    width: 40px;
+    }
+    .input {
+    width: 200px;
+    }
+    .button {
+    margin-left: 6px;
+    }
+}
+.button-box {
+  display: flex;
+  justify-content: center;
+  margin: 20px;
+  .el-button {
+    width: 80px;
+    margin: 10px;
+  }
+}
+.form-box {
+  display: flex;
+  justify-content: center;
+  .el-form-item {
+    display: flex;
+    justify-content: center;
+    .el-form-item__label {
+      display: flex;
+      align-items: center;
+    }
+    .el-form-item__content {
+      .el-input {
+        .el-input__inner {
+          width: 250px;
+        }
+      }
+    }
+  }
+}
+</style>

+ 328 - 0
src/views/TMS/components/bmsship/addTwoSectionFee.vue

@@ -0,0 +1,328 @@
+<template>
+  <!-- 添加二程船水运费1-->
+  <div class="addWagonLoad">
+    <PageTitle>返回</PageTitle>
+    <div class="form-box">
+      <!-- <dil-form :formId="271" v-model="form1" ref="from1"></dil-form> -->
+      <el-form v-model="form">
+        <div class="searchSelect">
+            <span class="text">批次</span>
+            <el-input class="input" v-model="batchName" disabled> </el-input>
+            <el-button class="button" type="primary" @click="ondrawer(5)">浏览</el-button>
+        </div>
+        <div class="searchSelect">
+            <span class="text">单价</span>
+            <el-input class="input" v-model="form.unitPrice" disabled  @change="calculate"> </el-input>
+            <el-button class="button" type="primary" @click="ondrawer(6)">浏览</el-button>
+        </div>
+        <div class="preview-group">
+          <el-form-item label="实装吨位">
+              <el-input v-model="form.realTonnage" type="number"  @change="calculate"></el-input>
+          </el-form-item>
+          <el-form-item label="水运费用">
+              <el-input v-model="form.fee" type="number" disabled></el-input>
+          </el-form-item>
+            <el-form-item label="开票日期">
+                <el-date-picker
+                  v-model="form.makeTime"
+                  type="datetime"
+                  placeholder="选择日期">
+              </el-date-picker>
+          </el-form-item>
+          <el-form-item label="上传水运单图片">
+              <el-upload
+                  class="upload-demo"
+                  style="width: 270px"
+                  ref="upload1"
+                  accept=".pdf , .jpg, .png, .jpeg, .tif, .gif, .pcx, .tga, .exif, .fpx, .svg , .bmp"
+                  action="/api/v1/bms/uploadBmsshipOrder"
+                  :before-upload="beforeUpload"
+                  :multiple="false"
+                  list-type="picture"
+                  :show-file-list="false"
+                  :on-success="handleAvatarSuccess"
+                  :on-error="onError(1)">
+                  <el-input
+                      class="shippingCertificate"
+                      style="width: 270px; display: flex"
+                      placeholder="上传水运单图片(必填项)"
+                      v-model="form.image"
+                      disabled
+                  >
+                  </el-input>
+                  <el-button
+                      size="small"
+                      type="primary"
+                      style="
+                      width: 115px;
+                      height: 35px;
+                      margin-left: 275px;
+                      margin-top: -35px;
+                      display: flex;
+                      "
+                      @click="upCLick(1)">
+                      点击上传附件</el-button
+                  >
+              </el-upload>
+          </el-form-item>
+        </div>
+     </el-form>
+    </div>
+    <!-- 模态框 -->
+    <el-drawer
+      :visible.sync="drawer"
+      :direction="direction"
+      :before-close="handleClose"
+      size="50%"
+    >
+      <el-input
+        placeholder="请输入内容"
+        v-model="input"
+        style="margin-top: 10px; margin-left: 20px; width: 250px"
+        clearable
+      >
+      </el-input>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="onclick(a)"
+        style="margin-bottom: 15px">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <div v-show="a == 5">
+        <dilTable
+          v-bind.sync="batchOption"
+          @radio-change="batchChange"
+        ></dilTable>
+      </div>
+      <div v-show="a == 6">
+        <dilTable
+          v-bind.sync="contractPriceOption"
+          @radio-change="priceChange"
+        ></dilTable>
+      </div>
+    </el-drawer>
+    <!-- 底部按钮 -->
+    <div class="button-box">
+      <el-button @click="cancel">取消</el-button>
+      <el-button type="primary" @click="makeSure" :loading="isLoading">确定</el-button>
+    </div>
+  </div>
+</template>
+
+<script>
+import PageTitle from "@/components/Page/Title";
+import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
+import {BigNumber} from 'bignumber.js';
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+      form: {},
+      portId:null,
+      ports:[],
+      isLoading:false,
+      drawer: false,
+      direction: "rtl",
+      a:0,
+      input:null,
+      batchId:null,
+      purchaseOrderId:null,
+      batchName:null,
+      cargoPictureUrl: "",
+      batchOption: {
+        requestUrl: "/api/v1/uc/selectPurchaseOrderForShip?apiId=502",
+        selectionType: "radio",
+        map: [],
+      },
+      contractPriceOption: {
+        requestUrl: "/api/v1/rms/selectbmsshipContractPriceList?apiId=500",
+        selectionType: "radio",
+        map: [],
+      }
+    };
+  },
+  mounted() {
+    //this.getPorts();
+  },
+  methods: {
+    //右侧选中框
+    ondrawer(num) {
+      this.drawer = true;
+      this.a = num;
+      // 清空当前输入框中的数据
+      this.input = "";
+    },
+    handleClose(done) {
+      done();
+    },
+    onclick(a) {
+        if(a==5){
+            this.batchOption.requestUrl =
+            "/api/v1/uc/selectPurchaseOrderForShip?apiId=502&index=" + this.input;
+        }else if(a==6){
+            this.contractPriceOption.requestUrl =
+            "/api/v1/rms/selectbmsshipContractPriceList?apiId=500&con=" + this.input;
+        }
+    },
+    //修改选中
+    batchChange(selection) {
+        console.log(selection);
+        this.batchId=selection.batchId;
+        this.purchaseOrderId=selection.purchaseOrderId;
+        this.batchName =selection.materialName + selection.resultForeignShipName;
+    },
+    priceChange(selection){
+        this.form.unitPriceId = selection.resultId;
+        this.form.unitPrice = selection.unitPrice;
+        this.calculate();
+    },
+    //计算水运费
+    calculate(){
+        console.log("能否计算水运费:",this.form.realTonnage && this.form.unitPrice);
+        if(this.form.realTonnage && this.form.unitPrice){
+           let fee = new BigNumber(this.form.realTonnage);
+           this.$set(this.form,'fee',fee.multipliedBy(this.form.unitPrice).toNumber())
+           console.log(this.form.fee);
+        }
+    },
+    makeSure() {
+      this.isLoading=true;
+      let map={
+        batchId:this.batchId,
+        purchaseOrderId:this.purchaseOrderId,
+        unitPrice:this.form.unitPrice,
+        unitPriceId:this.form.unitPriceId,
+        realTonnage:this.form.realTonnage,
+        fee:this.form.fee,
+        makeTime: sjTime(this.form.makeTime),
+        image:this.form.image,
+        feeType:1,
+        userId:getCookie("userId")
+      }
+      console.log(map);
+      if(map.batchId==null ||
+       map.purchaseOrderId==null ||
+       map.unitPrice==null ||
+       map.unitPriceId==null ||
+       map.realTonnage==null ||
+       map.fee==null ||
+       map.makeTime==null ||
+       map.image==null || map.image==''
+       ){
+        this.$message.error("存在空值!");
+        this.isLoading=false;
+      }else{
+         this.axios.post("/api/v1/bms/addPortHandlingFeeSecond",map).then(res => {
+          if (res.data.code == 200) {
+            this.$message({
+              type: "success",
+              message: "新增成功!"
+            });
+            this.cancel();
+          } else {
+            this.$message.error(res.data.data);
+          }
+        }).then(()=>{
+          this.isLoading=false;
+        });
+      }
+       
+    },
+    // 取消
+    cancel() {
+      this.$router.go(-1);
+    },
+    //查询港口id
+    getPorts(){
+        this.axios.post("/api/v1/rms/getPortName?index=").then(res => {
+          if (res.data.code == 200) {
+            this.ports=res.data.data;
+            console.log(this.ports);
+          } else {
+            this.$message.error(res.data.data);
+          }
+        });
+    },
+    beforeUpload(file) {
+      this.upBool = true;
+      const isLt2M = file.size < 1024 * 1024 * 0.5;
+      if (!isLt2M) {
+        this.$message.error("上传文件大小不能超过500kb!");
+      } else {
+        let size = file.size / 1024;
+        let _URL = window.URL || window.webkitURL;
+        let img = new Image();
+        img.src = _URL.createObjectURL(file);
+      }
+      return isLt2M;
+    },
+    onError(err) {
+      if (this.upBool) {
+        if (this.num == 1) {
+          this.form.image = null;
+          this.$message.error("上传失败");
+        }
+      }
+    },
+    handleAvatarSuccess(res, file) {
+      if (res.code) {
+        this.upBool = false;
+        if (this.num == 1) {
+          this.form.image = res.data;
+        }
+        this.$message.success("上传成功");
+      }
+    },
+    upCLick(val) {
+      this.num = val;
+    },
+  }
+};
+</script>
+<style lang="scss">
+.searchSelect {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    margin: 5px;
+    .text {
+    width: 40px;
+    }
+    .input {
+    width: 200px;
+    }
+    .button {
+    margin-left: 6px;
+    }
+}
+.button-box {
+  display: flex;
+  justify-content: center;
+  margin: 20px;
+  .el-button {
+    width: 80px;
+    margin: 10px;
+  }
+}
+.form-box {
+  display: flex;
+  justify-content: center;
+  .el-form-item {
+    display: flex;
+    justify-content: center;
+    .el-form-item__label {
+      display: flex;
+      align-items: center;
+    }
+    .el-form-item__content {
+      .el-input {
+        .el-input__inner {
+          width: 250px;
+        }
+      }
+    }
+  }
+}
+</style>

+ 328 - 0
src/views/TMS/components/bmsship/addTwoSectionHandleFee.vue

@@ -0,0 +1,328 @@
+<template>
+  <!-- 添加二程船装卸费2-->
+  <div class="addWagonLoad">
+    <PageTitle>返回</PageTitle>
+    <div class="form-box">
+      <!-- <dil-form :formId="271" v-model="form1" ref="from1"></dil-form> -->
+      <el-form v-model="form">
+        <div class="searchSelect">
+            <span class="text">批次</span>
+            <el-input class="input" v-model="batchName" disabled> </el-input>
+            <el-button class="button" type="primary" @click="ondrawer(5)">浏览</el-button>
+        </div>
+        <div class="searchSelect">
+            <span class="text">单价</span>
+            <el-input class="input" v-model="form.unitPrice" disabled  @change="calculate"> </el-input>
+            <el-button class="button" type="primary" @click="ondrawer(6)">浏览</el-button>
+        </div>
+        <div class="preview-group">
+          <el-form-item label="实装吨位">
+              <el-input v-model="form.realTonnage" type="number"  @change="calculate"></el-input>
+          </el-form-item>
+          <el-form-item label="水运费用">
+              <el-input v-model="form.fee" type="number" disabled></el-input>
+          </el-form-item>
+            <el-form-item label="开票日期">
+                <el-date-picker
+                  v-model="form.makeTime"
+                  type="datetime"
+                  placeholder="选择日期">
+              </el-date-picker>
+          </el-form-item>
+          <el-form-item label="上传水运单图片">
+              <el-upload
+                  class="upload-demo"
+                  style="width: 270px"
+                  ref="upload1"
+                  accept=".pdf , .jpg, .png, .jpeg, .tif, .gif, .pcx, .tga, .exif, .fpx, .svg , .bmp"
+                  action="/api/v1/bms/uploadBmsshipOrder"
+                  :before-upload="beforeUpload"
+                  :multiple="false"
+                  list-type="picture"
+                  :show-file-list="false"
+                  :on-success="handleAvatarSuccess"
+                  :on-error="onError(1)">
+                  <el-input
+                      class="shippingCertificate"
+                      style="width: 270px; display: flex"
+                      placeholder="上传水运单图片(必填项)"
+                      v-model="form.image"
+                      disabled
+                  >
+                  </el-input>
+                  <el-button
+                      size="small"
+                      type="primary"
+                      style="
+                      width: 115px;
+                      height: 35px;
+                      margin-left: 275px;
+                      margin-top: -35px;
+                      display: flex;
+                      "
+                      @click="upCLick(1)">
+                      点击上传附件</el-button
+                  >
+              </el-upload>
+          </el-form-item>
+        </div>
+     </el-form>
+    </div>
+    <!-- 模态框 -->
+    <el-drawer
+      :visible.sync="drawer"
+      :direction="direction"
+      :before-close="handleClose"
+      size="50%"
+    >
+      <el-input
+        placeholder="请输入内容"
+        v-model="input"
+        style="margin-top: 10px; margin-left: 20px; width: 250px"
+        clearable
+      >
+      </el-input>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="onclick(a)"
+        style="margin-bottom: 15px">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <div v-show="a == 5">
+        <dilTable
+          v-bind.sync="batchOption"
+          @radio-change="batchChange"
+        ></dilTable>
+      </div>
+      <div v-show="a == 6">
+        <dilTable
+          v-bind.sync="contractPriceOption"
+          @radio-change="priceChange"
+        ></dilTable>
+      </div>
+    </el-drawer>
+    <!-- 底部按钮 -->
+    <div class="button-box">
+      <el-button @click="cancel">取消</el-button>
+      <el-button type="primary" @click="makeSure" :loading="isLoading">确定</el-button>
+    </div>
+  </div>
+</template>
+
+<script>
+import PageTitle from "@/components/Page/Title";
+import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
+import {BigNumber} from 'bignumber.js';
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+      form: {},
+      portId:null,
+      ports:[],
+      isLoading:false,
+      drawer: false,
+      direction: "rtl",
+      a:0,
+      input:null,
+      batchId:null,
+      purchaseOrderId:null,
+      batchName:null,
+      cargoPictureUrl: "",
+      batchOption: {
+        requestUrl: "/api/v1/uc/selectPurchaseOrderForShip?apiId=502",
+        selectionType: "radio",
+        map: [],
+      },
+      contractPriceOption: {
+        requestUrl: "/api/v1/rms/selectbmsshipContractPriceList?apiId=500",
+        selectionType: "radio",
+        map: [],
+      }
+    };
+  },
+  mounted() {
+    //this.getPorts();
+  },
+  methods: {
+    //右侧选中框
+    ondrawer(num) {
+      this.drawer = true;
+      this.a = num;
+      // 清空当前输入框中的数据
+      this.input = "";
+    },
+    handleClose(done) {
+      done();
+    },
+    onclick(a) {
+        if(a==5){
+            this.batchOption.requestUrl =
+            "/api/v1/uc/selectPurchaseOrderForShip?apiId=502&index=" + this.input;
+        }else if(a==6){
+            this.contractPriceOption.requestUrl =
+            "/api/v1/rms/selectbmsshipContractPriceList?apiId=500&con=" + this.input;
+        }
+    },
+    //修改选中
+    batchChange(selection) {
+        console.log(selection);
+        this.batchId=selection.batchId;
+        this.purchaseOrderId=selection.purchaseOrderId;
+        this.batchName =selection.materialName + selection.resultForeignShipName;
+    },
+    priceChange(selection){
+        this.form.unitPriceId = selection.resultId;
+        this.form.unitPrice = selection.unitPrice;
+        this.calculate();
+    },
+    //计算水运费
+    calculate(){
+        console.log("能否计算水运费:",this.form.realTonnage && this.form.unitPrice);
+        if(this.form.realTonnage && this.form.unitPrice){
+           let fee = new BigNumber(this.form.realTonnage);
+           this.$set(this.form,'fee',fee.multipliedBy(this.form.unitPrice).toNumber())
+           console.log(this.form.fee);
+        }
+    },
+    makeSure() {
+      this.isLoading=true;
+      let map={
+        batchId:this.batchId,
+        purchaseOrderId:this.purchaseOrderId,
+        unitPrice:this.form.unitPrice,
+        unitPriceId:this.form.unitPriceId,
+        realTonnage:this.form.realTonnage,
+        fee:this.form.fee,
+        makeTime: sjTime(this.form.makeTime),
+        image:this.form.image,
+        feeType:2,
+        userId:getCookie("userId")
+      }
+      console.log(map);
+      if(map.batchId==null ||
+       map.purchaseOrderId==null ||
+       map.unitPrice==null ||
+       map.unitPriceId==null ||
+       map.realTonnage==null ||
+       map.fee==null ||
+       map.makeTime==null ||
+       map.image==null || map.image==''
+       ){
+        this.$message.error("存在空值!");
+        this.isLoading=false;
+      }else{
+         this.axios.post("/api/v1/bms/addPortHandlingFeeSecond",map).then(res => {
+          if (res.data.code == 200) {
+            this.$message({
+              type: "success",
+              message: "新增成功!"
+            });
+            this.cancel();
+          } else {
+            this.$message.error(res.data.data);
+          }
+        }).then(()=>{
+          this.isLoading=false;
+        });
+      }
+       
+    },
+    // 取消
+    cancel() {
+      this.$router.go(-1);
+    },
+    //查询港口id
+    getPorts(){
+        this.axios.post("/api/v1/rms/getPortName?index=").then(res => {
+          if (res.data.code == 200) {
+            this.ports=res.data.data;
+            console.log(this.ports);
+          } else {
+            this.$message.error(res.data.data);
+          }
+        });
+    },
+    beforeUpload(file) {
+      this.upBool = true;
+      const isLt2M = file.size < 1024 * 1024 * 0.5;
+      if (!isLt2M) {
+        this.$message.error("上传文件大小不能超过500kb!");
+      } else {
+        let size = file.size / 1024;
+        let _URL = window.URL || window.webkitURL;
+        let img = new Image();
+        img.src = _URL.createObjectURL(file);
+      }
+      return isLt2M;
+    },
+    onError(err) {
+      if (this.upBool) {
+        if (this.num == 1) {
+          this.form.image = null;
+          this.$message.error("上传失败");
+        }
+      }
+    },
+    handleAvatarSuccess(res, file) {
+      if (res.code) {
+        this.upBool = false;
+        if (this.num == 1) {
+          this.form.image = res.data;
+        }
+        this.$message.success("上传成功");
+      }
+    },
+    upCLick(val) {
+      this.num = val;
+    },
+  }
+};
+</script>
+<style lang="scss">
+.searchSelect {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    margin: 5px;
+    .text {
+    width: 40px;
+    }
+    .input {
+    width: 200px;
+    }
+    .button {
+    margin-left: 6px;
+    }
+}
+.button-box {
+  display: flex;
+  justify-content: center;
+  margin: 20px;
+  .el-button {
+    width: 80px;
+    margin: 10px;
+  }
+}
+.form-box {
+  display: flex;
+  justify-content: center;
+  .el-form-item {
+    display: flex;
+    justify-content: center;
+    .el-form-item__label {
+      display: flex;
+      align-items: center;
+    }
+    .el-form-item__content {
+      .el-input {
+        .el-input__inner {
+          width: 250px;
+        }
+      }
+    }
+  }
+}
+</style>

+ 3 - 0
src/views/TMS/components/bmsship/detailsOrder.vue

@@ -41,6 +41,9 @@ export default {
 .purchaseOrder {
   .top {
     padding: 1.25rem 1.875rem;
+    .el-input {
+      width: 250px;
+    }
   }
 }
 </style>

+ 448 - 45
src/views/TMS/components/bmsship/detailsStatement.vue

@@ -1,68 +1,471 @@
+<!-- 计费账单 -->
 <template>
-  <!-- 船运计费详单页面 -->
-  <div class="purchaseOrder">
+  <div id="detailsStatement">
     <div class="top">
-      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
-      <el-button type="primary" class="btn" @click="onclick">
-        <i class="el-icon-search"></i>查询
-      </el-button>
-      <el-button type="primary" @click="shipclick">
-        生成水运费账单
-      </el-button>
-      <el-button type="primary" @click="waterclick">
-        生成水分检测费账单
-      </el-button>
-      <el-button type="primary" @click="click()">
-        生成途损费账单
-      </el-button>
+      <el-form inline="true">
+        <el-form-item>
+          <el-input v-model="shipName" placeholder="请输入船名"></el-input>
+        </el-form-item>
+        <el-form-item>
+          <span class="demonstration">结算日期</span>
+          <el-date-picker v-model="value1" type="date" placeholder="选择日期">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item>
+          <el-button @click="onClick">查询</el-button>
+        </el-form-item>
+        <el-form-item>
+          <span class="totalWillTonage">合计已预开票吨位</span>
+          <el-input
+            v-model="totalWillTonageedValue"
+            disabled
+            style="width:80px"
+          ></el-input>
+        </el-form-item>
+        <el-form-item>
+          <span class="totalWillTonage">合计已预开金额</span>
+          <el-input
+            v-model="totalWillTonageedMoney"
+            disabled
+            style="width:80px"
+          ></el-input>
+        </el-form-item>
+        <el-form-item>
+          <span class="totalWillTonage">合计本次实际开票吨位</span>
+          <el-input
+            v-model="totalActuallyTonageedValue"
+            disabled
+            style="width:80px"
+          ></el-input>
+        </el-form-item>
+        <el-form-item>
+          <span class="totalWillTonage">合计本月实际开票金额</span>
+          <el-input
+            v-model="totalActuallyTonageedMoney"
+            disabled
+            style="width:80px"
+          ></el-input>
+        </el-form-item>
+      </el-form>
     </div>
-    <dilTable v-bind.sync="option" >
-      <el-table-column fixed="right" label="操作" width="100">
-        <template slot-scope="scope">
-          <el-button @click="btnclick(scope.row)" type="text" size="small"
-            >详情</el-button
+    <div class="main">
+      <el-tabs v-model="activeName" @tab-click="handleClick">
+        <el-tab-pane label="未结算" name="first">
+          <el-table
+            :data="tableData"
+            ref="tableRef"
+            border
+            stripe
+            style="width: 100%; margin-top: 20px"
+            max-height="800px"
+            :row-style="{ height: '30px' }"
+            :cell-style="{ fontWeight: '700' }"
+            :summary-method="getSummaries"
+            show-summary
+            class="table"
           >
-        </template>
-      </el-table-column>
-    </dilTable>
+            <el-table-column
+              prop="index"
+              width="50"
+              label="序号"
+              align="center"
+              :resizable="false"
+            >
+              <template slot-scope="scope">{{ scope.row.group + 1 }}</template>
+            </el-table-column>
+            <el-table-column
+              prop="materialTypeName"
+              label="品种"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="shipName"
+              label="船名"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="portName"
+              label="放货港口"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="carrierName"
+              label="承运单位"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="leavePortDate"
+              label="离港日期"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="loadShipTon"
+              label="装船吨位"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="loadShipPer"
+              label="装船比例"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="billTon"
+              label="结算吨位"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="enFatoryTon"
+              label="到厂湿吨"
+              width="200px"
+              align="center"
+            >
+              <template slot-scope="scope">
+                <el-input v-model="scope.row.enFatoryTon"></el-input>
+              </template>
+            </el-table-column>
+            <el-table-column
+              prop="contractPrice"
+              label="合同单价"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="statementAmount"
+              label="金额(元)"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="willTonanged"
+              label="已预开票吨位"
+              width="200px"
+              align="center"
+            >
+              <template slot-scope="scope">
+                <el-input v-model="scope.row.willTonanged"></el-input>
+              </template>
+            </el-table-column>
+            <el-table-column
+              prop="willMoneyed"
+              label="已预开票金额"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="actuallyMoney"
+              label="本次实际开票吨位"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="actuallyMoney"
+              label="本次实际开票吨位"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="actuallyMonthMoney"
+              label="本月实际开票金额"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+          </el-table>
+        </el-tab-pane>
+        <el-tab-pane label="已结算" name="second">
+          <el-table
+            :data="tableData1"
+            ref="tableRef1"
+            border
+            stripe
+            style="width: 100%; margin-top: 20px"
+            max-height="800px"
+            :row-style="{ height: '30px' }"
+            :cell-style="{ fontWeight: '700' }"
+            :summary-method="getSummaries"
+            show-summary
+            class="table"
+          >
+            <el-table-column
+              prop="index"
+              width="50"
+              label="序号"
+              align="center"
+              :resizable="false"
+            >
+              <template slot-scope="scope">{{ scope.row.group + 1 }}</template>
+            </el-table-column>
+            <el-table-column
+              prop="materialTypeName"
+              label="品种"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="shipName"
+              label="船名"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="portName"
+              label="放货港口"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="carrierName"
+              label="承运单位"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="leavePortDate"
+              label="离港日期"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="loadShipTon"
+              label="装船吨位"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="loadShipPer"
+              label="装船比例"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="billTon"
+              label="结算吨位"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="enFatoryTon"
+              label="到厂湿吨"
+              width="200px"
+              align="center"
+            >
+              <template slot-scope="scope">
+                <el-input v-model="scope.row.enFatoryTon"></el-input>
+              </template>
+            </el-table-column>
+            <el-table-column
+              prop="contractPrice"
+              label="合同单价"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="statementAmount"
+              label="金额(元)"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="willTonanged"
+              label="已预开票吨位"
+              width="200px"
+              align="center"
+            >
+              <template slot-scope="scope">
+                <el-input v-model="scope.row.willTonanged"></el-input>
+              </template>
+            </el-table-column>
+            <el-table-column
+              prop="willMoneyed"
+              label="已预开票金额"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="actuallyMoney"
+              label="本次实际开票吨位"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="actuallyMoney"
+              label="本次实际开票吨位"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="actuallyMonthMoney"
+              label="本月实际开票金额"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+          </el-table>
+        </el-tab-pane>
+      </el-tabs>
+    </div>
   </div>
 </template>
-
 <script>
 export default {
-  name: "purchaseOrder",
   data() {
     return {
-      input:"",
-      option: {
-        // 表格请求数据的地址
-        requestUrl: "/api/v1/bms/getStatementList?apiId=113",
-      },
+      totalWillTonageedValue: 0,
+      totalWillTonageedMoney: 0,
+      totalActuallyTonageedMoney: 0,
+      totalActuallyTonageedValue: 0,
+      shipName: null,
+      tableData: null,
+      spanArr: [],
+      mergeList: [
+        "index",
+        "carrierName",
+        "portName",
+        "shipName",
+        "materialTypeName",
+        "enFatoryTon"
+      ],
+      activeName: "first",
+      tableTitle: "结算账单报表"
     };
   },
   methods: {
-    onclick() {
-      this.option.requestUrl = "/api/v1/bms/getStatementList?apiId=113&con="+this.input;
+    //根据表格据汇总顶部展示
+    getTotalArr(data) {
+      this.totalWillTonageedValue = data.reduce((pre, item) => {
+        return pre + item.willTonanged;
+      }, 0);
+      this.totalWillTonageedMoney = data.reduce((pre, item) => {
+        return pre + item.willMoneyed;
+      });
+      this.totalActuallyTonageedValue = data.reduce((pre, item) => {
+        return pre + item.actuallyMoney;
+      });
+      this.totalActuallyTonageedMoney = data.reduce((pre, item) => {
+        return pre + item.actuallyMonthMoney;
+      });
     },
-    btnclick(row) {
-      this.$router.push("/statementDetailsOrder/" + row.batchId + "?statementId=" + row.statementId);
+    onClick() {},
+    //获取未结算账单数据
+    getNoDetailsStament() {},
+    getDetailsStamented() {},
+    //合并表格数据
+    getSpanArr(data) {
+      //每次调用方法初始化
+      this.spanArr = [];
+      for (var i = 0; i < data.length; i++) {
+        if (i === 0) {
+          this.spanArr.push(1);
+          data[i].group = i;
+          this.pos = 0;
+        } else {
+          // 判断当前元素与上一个元素是否相同
+          if (data[i].saleOrderId === data[i - 1].saleOrderId) {
+            this.spanArr[this.pos] += 1;
+            data[i].group = data[i - 1].group;
+            this.spanArr.push(0);
+          } else {
+            this.spanArr.push(1);
+            this.pos = i;
+            data[i].group = data[i - 1].group + 1;
+          }
+        }
+      }
     },
-    shipclick() {
-      this.$router.push("/uncomplateDetails");
+    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+      if (this.mergeList.includes(column.property)) {
+        const _row = this.spanArr[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
+      }
     },
-    waterclick() {
-      this.$router.push("/uncomplateWater");
-    },
-    click() {
-      this.$router.push("/toBeStatement");
+    //导出账单数据
+    exportAllReportToExcel() {
+      console.log(this.$refs.tableRef);
+      const loading = this.$loading({
+        lock: true,
+        text: "正在导出Excel",
+        spinner: "el-icon-loading",
+        background: "rgba(0, 0, 0, 0.7)"
+      });
+      var title = this.tableTitle;
+      let tHeader = [];
+      let filterVal = [];
+      let data = [];
+      if (this.activeName == "first") {
+        data = this.$refs.tableRef.$children;
+      } else {
+        data = this.$refs.tableRef1.$children;
+      }
+      data.forEach(item => {
+        if (item.label != undefined && item.prop != undefined) {
+          if (tHeader.indexOf(item.label) === -1) {
+            tHeader.push(item.label);
+          }
+          if (filterVal.indexOf(item.prop) === -1) {
+            filterVal.push(item.prop);
+          }
+        }
+      });
+      this.downloadLoading = true;
+      require.ensure([], () => {
+        const {
+          export_json_to_excel
+        } = require("@/assets/excel/Export2Excel.js"); //这里必须使用绝对路径,使用@/+存放export2Excel的路径
+        let data = this.tableData.map(v => filterVal.map(j => v[j])); //3.formatJson格式转换
+        export_json_to_excel(tHeader, data, title); // (title)导出的表格名称
+      });
+      loading.close();
     }
   },
+  mounted() {
+    this.getNoDetailsStament();
+    this.getDetailsStamented();
+  }
 };
 </script>
-<style lang='scss' scoped>
-.purchaseOrder {
+<style lang="scss" scoped>
+#detailsStatement {
   .top {
-    padding: 1.25rem 1.875rem;
+    margin-left: 10px;
+    margin-top: 30px;
   }
 }
-</style>
+</style>

+ 459 - 0
src/views/TMS/components/bmsship/editThreeSectionFee.vue

@@ -0,0 +1,459 @@
+<template>
+  <!-- 添加二程船水运费1-->
+  <div class="addWagonLoad">
+    <PageTitle>返回</PageTitle>
+    <div class="form-box">
+      <!-- <dil-form :formId="271" v-model="form1" ref="from1"></dil-form> -->
+      <el-form v-model="form">
+        <div class="searchSelect">
+          <span class="text">批次</span>
+          <el-input class="input" v-model="batchName" disabled> </el-input>
+          <el-button class="button" type="primary" @click="ondrawer(5)"
+            >浏览</el-button
+          >
+        </div>
+        <div
+          class="material"
+          v-for="(item, index) in form.Array"
+          :key="index"
+          style="margin-left:30px"
+        >
+          <el-form :inline="true">
+            <el-form-item label="装船时间">
+              <el-input
+                v-model="item.resultLoadShipDate"
+                placeholder="装船时间"
+                disabled
+              ></el-input>
+            </el-form-item>
+            <el-form-item label="离港时间">
+              <el-input
+                v-model="item.resultOutPortTime"
+                placeholder="离港时间"
+                disabled
+              ></el-input>
+            </el-form-item>
+            <el-form-item label="实装吨位">
+              <el-input
+                v-model="item.resultActualInstallations"
+                placeholder="实装吨位"
+                disabled
+              ></el-input>
+            </el-form-item>
+            <el-form-item label="水运费用">
+              <el-input v-model="item.fee" type="number" disabled></el-input>
+              <el-button type="primary" @click="ondrawer(6, index)"
+                >浏览单价</el-button
+              >
+            </el-form-item>
+          </el-form>
+        </div>
+        <div class="preview-group">
+          <el-form-item label="开票日期">
+            <el-date-picker
+              v-model="form.makeTime"
+              type="datetime"
+              placeholder="选择日期"
+            >
+            </el-date-picker>
+          </el-form-item>
+          <el-form-item label="上传水运单图片">
+            <el-upload
+              class="upload-demo"
+              style="width: 270px"
+              ref="upload1"
+              accept=".pdf , .jpg, .png, .jpeg, .tif, .gif, .pcx, .tga, .exif, .fpx, .svg , .bmp"
+              action="/api/v1/bms/uploadBmsshipOrder"
+              :before-upload="beforeUpload"
+              :multiple="false"
+              list-type="picture"
+              :show-file-list="false"
+              :on-success="handleAvatarSuccess"
+              :on-error="onError(1)"
+            >
+              <el-input
+                class="shippingCertificate"
+                style="width: 270px; display: flex"
+                placeholder="上传水运单图片(必填项)"
+                v-model="form.image"
+                disabled
+              >
+              </el-input>
+              <el-button
+                size="small"
+                type="primary"
+                style="
+                      width: 115px;
+                      height: 35px;
+                      margin-left: 275px;
+                      margin-top: -35px;
+                      display: flex;
+                      "
+                @click="upCLick(1)"
+              >
+                点击上传附件</el-button
+              >
+            </el-upload>
+          </el-form-item>
+        </div>
+      </el-form>
+    </div>
+    <!-- 模态框 -->
+    <el-drawer
+      :visible.sync="drawer"
+      :direction="direction"
+      :before-close="handleClose"
+      size="50%"
+    >
+      <el-input
+        placeholder="请输入内容"
+        v-model="input"
+        style="margin-top: 10px; margin-left: 20px; width: 250px"
+        clearable
+      >
+      </el-input>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="onclick(a)"
+        style="margin-bottom: 15px"
+      >
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <div v-show="a == 5">
+        <dilTable
+          v-bind.sync="batchOption"
+          @radio-change="batchChange"
+        ></dilTable>
+      </div>
+      <div v-show="a == 6">
+        <dilTable
+          v-bind.sync="contractPriceOption"
+          @radio-change="priceChange"
+        ></dilTable>
+      </div>
+    </el-drawer>
+    <!-- 底部按钮 -->
+    <div class="button-box">
+      <el-button @click="cancel">取消</el-button>
+      <el-button type="primary" @click="makeSure" :loading="isLoading"
+        >确定</el-button
+      >
+    </div>
+  </div>
+</template>
+
+<script>
+import PageTitle from "@/components/Page/Title";
+import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
+import { BigNumber } from "bignumber.js";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+      indexNum: null,
+      form: {},
+      portId: null,
+      ports: [],
+      isLoading: false,
+      drawer: false,
+      direction: "rtl",
+      a: 0,
+      input: null,
+      batchId: null,
+      purchaseOrderId: null,
+      batchName: null,
+      cargoPictureUrl: "",
+      batchOption: {
+        requestUrl: "/api/v1/uc/findBatchHavingLoad?apiId=502",
+        selectionType: "radio",
+        map: []
+      },
+      contractPriceOption: {
+        requestUrl: "/api/v1/rms/selectbmsshipContractPriceList?apiId=500",
+        selectionType: "radio",
+        map: []
+      }
+    };
+  },
+  mounted() {
+    //this.getPorts();
+    this.information();
+  },
+  computed: {
+    batch() {
+      return this.batchId;
+    }
+  },
+  watch: {
+    batch() {
+      console.log("无变化l");
+      this.findLoadByBatch();
+    }
+  },
+  methods: {
+    information() {
+      //编辑车皮装车作业
+      this.axios
+        .post(
+          "/api/v1/bms/getBmsshipFee/" + this.$route.params.resultId
+        )
+        .then((res) => {
+          res.data.data.forEach((e) => {
+            console.log(e);
+            this.form = e;
+            this.batchName=e.batchName;
+            this.batchId=e.batchId;
+            this.purchaseOrderId=e.purchaseOrderId;
+          });
+        }).then(()=>{
+          this.findLoadByBatch();
+        });
+    },
+    findLoadByBatch() {
+      if (this.batchId != null) {
+        this.axios
+          .post("/api/v1/bms/findLoadByBatch/" + this.batchId)
+          .then(res => {
+            console.log(res.data.data);
+            this.$set(this.form, "Array", res.data.data);
+            // this.form.Array = res.data.data;
+          });
+      }else{
+        console.log("尚未选择批次");
+      }
+    },
+    //右侧选中框
+    ondrawer(num, index) {
+      if (num == 5) {
+        this.batchOption.requestUrl =
+          "/api/v1/uc/findBatchHavingLoad?apiId=502" + "&i=" + new Date();
+      } else if (num == 6) {
+        this.contractPriceOption.requestUrl =
+          "/api/v1/rms/selectbmsshipContractPriceList?apiId=500" +
+          "&i=" +
+          new Date();
+      }
+      this.drawer = true;
+      this.indexNum = index;
+      this.a = num;
+      // 清空当前输入框中的数据
+      this.input = "";
+    },
+    handleClose(done) {
+      done();
+    },
+    onclick(a) {
+      if (a == 5) {
+        this.batchOption.requestUrl =
+          "/api/v1/uc/findBatchHavingLoad?apiId=502&index=" +
+          this.input +
+          "&i=" +
+          new Date();
+      } else if (a == 6) {
+        this.contractPriceOption.requestUrl =
+          "/api/v1/rms/selectbmsshipContractPriceList?apiId=500&con=" +
+          this.input;
+      }
+    },
+    //修改选中
+    batchChange(selection) {
+      console.log(JSON.stringify(selection).length);
+      if (JSON.stringify(selection).length > 2) {
+        this.batchId = selection.batchId;
+        this.purchaseOrderId = selection.purchaseOrderId;
+        this.batchName =
+          selection.materialName + selection.resultForeignShipName;
+      } else {
+        this.batchId = null;
+        this.purchaseOrderId = null;
+        this.batchName = "";
+      }
+    },
+    priceChange(selection) {
+      this.form.Array[this.indexNum].unitPriceId = selection.resultId;
+      this.form.Array[this.indexNum].unitPrice = selection.unitPrice;
+      //   this.form.unitPriceId = selection.resultId;
+      //   this.form.unitPrice = selection.unitPrice;
+      this.calculate();
+    },
+    //计算水运费
+    calculate() {
+      if (
+        this.form.Array[this.indexNum].resultActualInstallations &&
+        this.form.Array[this.indexNum].unitPrice
+      ) {
+        let fee = new BigNumber(
+          this.form.Array[this.indexNum].resultActualInstallations
+        );
+        this.$set(
+          this.form.Array[this.indexNum],
+          "fee",
+          fee.multipliedBy(this.form.Array[this.indexNum].unitPrice).toNumber()
+        );
+      }
+    },
+    makeSure() {
+      let totalFee = this.form.Array.reduce(function(prev, item) {
+        return prev + item.fee;
+      }, 0);
+      let realTonnage = this.form.Array.reduce(function(prev, item) {
+        return prev + item.resultActualInstallations;
+      }, 0);
+      //this.isLoading=true;
+      let map = {
+        resultId:this.$route.params.resultId,
+        batchId: this.batchId,
+        purchaseOrderId: this.purchaseOrderId,
+        realTonnage: realTonnage,
+        mapList: this.form.Array,
+        fee: totalFee,
+        makeTime: sjTime(this.form.makeTime),
+        image: this.form.image,
+        feeType: 3,
+        userId: getCookie("userId")
+      };
+      console.log(map);
+      //   if (
+      //     map.batchId == null ||
+      //     map.purchaseOrderId == null ||
+      //     map.unitPrice == null ||
+      //     map.unitPriceId == null ||
+      //     map.realTonnage == null ||
+      //     map.fee == null ||
+      //     map.makeTime == null ||
+      //     map.image == null ||
+      //     map.image == ""
+      //   ) {
+      //     this.$message.error("存在空值!");
+      //     this.isLoading = false;
+      //   } else {
+      this.axios
+        .post("/api/v1/bms/updatePortHandlingFee", map)
+        .then(res => {
+          if (res.data.code == 0) {
+            this.$message({
+              type: "success",
+              message: "修改成功!"
+            });
+            this.cancel();
+          } else {
+            this.$message.error(res.data.data);
+          }
+        })
+        .then(() => {
+          this.isLoading = false;
+        });
+      //   }
+    },
+    // 取消
+    cancel() {
+      this.$router.go(-1);
+    },
+    //查询港口id
+    getPorts() {
+      this.axios.post("/api/v1/rms/getPortName?index=").then(res => {
+        if (res.data.code == 200) {
+          this.ports = res.data.data;
+          console.log(this.ports);
+        } else {
+          this.$message.error(res.data.data);
+        }
+      });
+    },
+    beforeUpload(file) {
+      this.upBool = true;
+      const isLt2M = file.size < 1024 * 1024 * 0.5;
+      if (!isLt2M) {
+        this.$message.error("上传文件大小不能超过500kb!");
+      } else {
+        let size = file.size / 1024;
+        let _URL = window.URL || window.webkitURL;
+        let img = new Image();
+        img.src = _URL.createObjectURL(file);
+      }
+      return isLt2M;
+    },
+    onError(err) {
+      if (this.upBool) {
+        if (this.num == 1) {
+          this.form.image = null;
+          this.$message.error("上传失败");
+        }
+      }
+    },
+    handleAvatarSuccess(res, file) {
+      if (res.code) {
+        this.upBool = false;
+        if (this.num == 1) {
+          this.form.image = res.data;
+        }
+        this.$message.success("上传成功");
+      }
+    },
+    upCLick(val) {
+      this.num = val;
+    }
+  }
+};
+</script>
+<style lang="scss">
+.searchSelect {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  margin: 5px;
+  .text {
+    width: 40px;
+  }
+  .input {
+    width: 200px;
+  }
+  .button {
+    margin-left: 6px;
+  }
+}
+.button-box {
+  display: flex;
+  justify-content: center;
+  margin: 20px;
+  .el-button {
+    width: 80px;
+    margin: 10px;
+  }
+}
+.material {
+  display: flex;
+  justify-content: center;
+  margin-top: 20px;
+  margin-right: 100px;
+  .text {
+    display: inline-block;
+    width: 170px;
+    text-align: right;
+  }
+  .el-input {
+    width: 250px;
+  }
+}
+.form-box {
+  display: flex;
+  justify-content: center;
+  .el-form-item {
+    display: flex;
+    justify-content: center;
+    .el-form-item__label {
+      display: flex;
+      align-items: center;
+    }
+    .el-form-item__content {
+      .el-input {
+        .el-input__inner {
+          width: 250px;
+        }
+      }
+    }
+  }
+}
+</style>

+ 350 - 0
src/views/TMS/components/bmsship/editThreeSectionHandleFee.vue

@@ -0,0 +1,350 @@
+<template>
+  <!-- 修改三程船装卸费4-->
+  <div class="addWagonLoad">
+    <PageTitle>返回</PageTitle>
+    <div class="form-box">
+      <!-- <dil-form :formId="271" v-model="form1" ref="from1"></dil-form> -->
+   
+      <el-form v-model="form">
+        <div class="searchSelect">
+            <span class="text">批次</span>
+            <el-input class="input" v-model="batchName" disabled> </el-input>
+            <el-button class="button" type="primary" @click="ondrawer(5)">浏览</el-button>
+        </div>
+         <div class="searchSelect">
+            <span class="text">单价</span>
+            <el-input class="input" v-model="form.unitPrice" disabled  @change="calculate"> </el-input>
+            <el-button class="button" type="primary" @click="ondrawer(6)">浏览</el-button>
+        </div>
+          <div class="preview-group">
+             <el-form-item label="实装吨位">
+                <el-input v-model="form.realTonnage" type="number"  @change="calculate"></el-input>
+            </el-form-item>
+            <el-form-item label="水运费用">
+                <el-input v-model="form.fee" type="number"  disabled></el-input>
+            </el-form-item>
+             <el-form-item label="开票日期">
+                 <el-date-picker
+                    v-model="form.makeTime"
+                    type="datetime"
+                    placeholder="选择日期">
+                </el-date-picker>
+            </el-form-item>
+            <el-form-item label="上传水运单图片">
+                <el-upload
+                    class="upload-demo"
+                    style="width: 270px"
+                    ref="upload1"
+                    accept=".pdf , .jpg, .png, .jpeg, .tif, .gif, .pcx, .tga, .exif, .fpx, .svg , .bmp"
+                    action="/api/v1/bms/uploadBmsshipOrder"
+                    :before-upload="beforeUpload"
+                    :multiple="false"
+                    list-type="picture"
+                    :show-file-list="false"
+                    :on-success="handleAvatarSuccess"
+                    :on-error="onError(1)">
+                    <el-input
+                        class="shippingCertificate"
+                        style="width: 270px; display: flex"
+                        placeholder="上传水运单图片(必填项)"
+                        v-model="form.image"
+                        disabled
+                    >
+                    </el-input>
+                    <el-button
+                        size="small"
+                        type="primary"
+                        style="
+                        width: 115px;
+                        height: 35px;
+                        margin-left: 275px;
+                        margin-top: -35px;
+                        display: flex;
+                        "
+                        @click="upCLick(1)">
+                        点击上传附件</el-button
+                    >
+                </el-upload>
+            </el-form-item>
+          </div>
+     </el-form>
+    </div>
+    <!-- 模态框 -->
+    <el-drawer
+      :visible.sync="drawer"
+      :direction="direction"
+      :before-close="handleClose"
+      size="50%"
+    >
+      <el-input
+        placeholder="请输入内容"
+        v-model="input"
+        style="margin-top: 10px; margin-left: 20px; width: 250px"
+        clearable
+      >
+      </el-input>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="onclick(a)"
+        style="margin-bottom: 15px">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <div v-show="a == 5">
+        <dilTable
+          v-bind.sync="batchOption"
+          @radio-change="batchChange"
+        ></dilTable>
+      </div>
+      <div v-show="a == 6">
+        <dilTable
+          v-bind.sync="contractPriceOption"
+          @radio-change="priceChange"
+        ></dilTable>
+      </div>
+    </el-drawer>
+    <!-- 底部按钮 -->
+    <div class="button-box">
+      <el-button @click="cancel">取消</el-button>
+      <el-button type="primary" @click="makeSure" :loading="isLoading">确定</el-button>
+    </div>
+  </div>
+</template>
+
+<script>
+import PageTitle from "@/components/Page/Title";
+import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
+import {BigNumber} from 'bignumber.js';
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+      form: {},
+      portId:null,
+      ports:[],
+      isLoading:false,
+      drawer: false,
+      direction: "rtl",
+      a:0,
+      input:null,
+      batchId:null,
+      purchaseOrderId:null,
+      batchName:null,
+      cargoPictureUrl: "",
+      batchOption: {
+        requestUrl: "/api/v1/uc/selectPurchaseOrderForShip?apiId=502",
+        selectionType: "radio",
+        map: [],
+      },
+      contractPriceOption: {
+        requestUrl: "/api/v1/rms/selectbmsshipContractPriceList?apiId=500",
+        selectionType: "radio",
+        map: [],
+      }
+    };
+  },
+  mounted() {
+    //this.getPorts();
+    this.information();
+  },
+  methods: {
+    information() {
+      //编辑车皮装车作业
+      this.axios
+        .post(
+          "/api/v1/bms/getBmsshipFee/" + this.$route.params.resultId
+        )
+        .then((res) => {
+          res.data.data.forEach((e) => {
+            console.log(e);
+            this.form = e;
+            this.batchName=e.batchName;
+            this.batchId=e.batchId;
+            this.purchaseOrderId=e.purchaseOrderId;
+          });
+        });
+    },
+    //右侧选中框
+    ondrawer(num) {
+      this.drawer = true;
+      this.a = num;
+      // 清空当前输入框中的数据
+      this.input = "";
+    },
+    handleClose(done) {
+      done();
+    },
+    onclick(a) {
+        if(a==5){
+            this.batchOption.requestUrl =
+            "/api/v1/uc/selectPurchaseOrderForShip?apiId=502&index=" + this.input;
+        }else if(a==6){
+            this.contractPriceOption.requestUrl =
+            "api/v1/rms/selectbmsshipContractPriceList?apiId=500&con=" + this.input;
+        }
+    },
+    //修改选中
+    batchChange(selection) {
+        this.batchId=selection.batchId;
+        this.purchaseOrderId=selection.purchaseOrderId;
+        console.log("before",this.batchName);
+        this.batchName =selection.materialName + selection.resultForeignShipName;
+        console.log("before",this.batchName);
+        console.log("batch",selection);
+    },
+    priceChange(selection){
+        this.form.unitPriceId = selection.resultId;
+        this.form.unitPrice = selection.unitPrice;
+        console.log("unitPrice:",selection);
+        this.calculate();
+    },
+    //计算水运费
+    calculate(){
+        console.log("能否计算水运费:",this.form.realTonnage && this.form.unitPrice);
+        if(this.form.realTonnage && this.form.unitPrice){
+           let fee = new BigNumber(this.form.realTonnage);
+           this.$set(this.form,'fee',fee.multipliedBy(this.form.unitPrice).toNumber())
+           console.log(this.form.fee);
+        }
+    },
+    makeSure() {
+      this.isLoading=true;
+      let map={
+        resultId:this.form.resultId,
+        batchId:this.batchId,
+        purchaseOrderId:this.purchaseOrderId,
+        unitPrice:this.form.unitPrice,
+        unitPriceId:this.form.unitPriceId,
+        realTonnage:this.form.realTonnage,
+        fee:this.form.fee,
+        makeTime:sjTime(this.form.makeTime),
+        image:this.form.image,
+        feeType:4,
+        userId:getCookie("userId")
+      }
+      console.log(map);
+      if(
+       map.unitPrice==null ||
+       map.realTonnage==null ||
+       map.fee==null ||
+       map.makeTime==null ||
+       map.image==null || map.image==''
+       ){
+        this.$message.error("存在空值!");
+        this.isLoading=false;
+      }else{
+         map.startTime = sjTime(this.form.startTime);
+         map.endTime = sjTime(this.form.endTime);
+         this.axios.post("/api/v1/bms/updatePortHandlingFee",map).then(res => {
+          if (res.data.code == 0) {
+            this.$message({
+              type: "success",
+              message: "修改成功!"
+            });
+            this.cancel();
+          } else {
+            this.$message.error(res.data.data);
+          }
+        }).then(()=>{
+          this.isLoading=false;
+        });
+      }
+       
+    },
+    // 取消
+    cancel() {
+      this.$router.go(-1);
+    },
+    //查询港口id
+    getPorts(){
+        this.axios.post("/api/v1/rms/getPortName?index=").then(res => {
+          if (res.data.code == 200) {
+            this.ports=res.data.data;
+            console.log(this.ports);
+          } else {
+            this.$message.error(res.data.data);
+          }
+        });
+    },
+    beforeUpload(file) {
+      this.upBool = true;
+      const isLt2M = file.size < 1024 * 1024 * 0.5;
+      if (!isLt2M) {
+        this.$message.error("上传文件大小不能超过500kb!");
+      } else {
+        let size = file.size / 1024;
+        let _URL = window.URL || window.webkitURL;
+        let img = new Image();
+        img.src = _URL.createObjectURL(file);
+      }
+      return isLt2M;
+    },
+    onError(err) {
+      if (this.upBool) {
+        if (this.num == 1) {
+          this.form.image = null;
+          this.$message.error("上传失败");
+        }
+      }
+    },
+    handleAvatarSuccess(res, file) {
+      if (res.code) {
+        this.upBool = false;
+        if (this.num == 1) {
+         this.form.image = res.data;
+        }
+        this.$message.success("上传成功");
+      }
+    },
+    upCLick(val) {
+      this.num = val;
+    },
+  }
+};
+</script>
+<style lang="scss">
+.searchSelect {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    margin: 5px;
+    .text {
+    width: 40px;
+    }
+    .input {
+    width: 200px;
+    }
+    .button {
+    margin-left: 6px;
+    }
+}
+.button-box {
+  display: flex;
+  justify-content: center;
+  margin: 20px;
+  .el-button {
+    width: 80px;
+    margin: 10px;
+  }
+}
+.form-box {
+  display: flex;
+  justify-content: center;
+  .el-form-item {
+    display: flex;
+    justify-content: center;
+    .el-form-item__label {
+      display: flex;
+      align-items: center;
+    }
+    .el-form-item__content {
+      .el-input {
+        .el-input__inner {
+          width: 250px;
+        }
+      }
+    }
+  }
+}
+</style>

+ 350 - 0
src/views/TMS/components/bmsship/editTwoSectionFee.vue

@@ -0,0 +1,350 @@
+<template>
+  <!-- 修改二程船水运费1-->
+  <div class="addWagonLoad">
+    <PageTitle>返回</PageTitle>
+    <div class="form-box">
+      <!-- <dil-form :formId="271" v-model="form1" ref="from1"></dil-form> -->
+   
+      <el-form v-model="form">
+        <div class="searchSelect">
+            <span class="text">批次</span>
+            <el-input class="input" v-model="batchName" disabled> </el-input>
+            <el-button class="button" type="primary" @click="ondrawer(5)">浏览</el-button>
+        </div>
+         <div class="searchSelect">
+            <span class="text">单价</span>
+            <el-input class="input" v-model="form.unitPrice" disabled  @change="calculate"> </el-input>
+            <el-button class="button" type="primary" @click="ondrawer(6)">浏览</el-button>
+        </div>
+          <div class="preview-group">
+             <el-form-item label="实装吨位">
+                <el-input v-model="form.realTonnage" type="number"  @change="calculate"></el-input>
+            </el-form-item>
+            <el-form-item label="水运费用">
+                <el-input v-model="form.fee" type="number"  disabled></el-input>
+            </el-form-item>
+             <el-form-item label="开票日期">
+                 <el-date-picker
+                    v-model="form.makeTime"
+                    type="datetime"
+                    placeholder="选择日期">
+                </el-date-picker>
+            </el-form-item>
+            <el-form-item label="上传水运单图片">
+                <el-upload
+                    class="upload-demo"
+                    style="width: 270px"
+                    ref="upload1"
+                    accept=".pdf , .jpg, .png, .jpeg, .tif, .gif, .pcx, .tga, .exif, .fpx, .svg , .bmp"
+                    action="/api/v1/bms/uploadBmsshipOrder"
+                    :before-upload="beforeUpload"
+                    :multiple="false"
+                    list-type="picture"
+                    :show-file-list="false"
+                    :on-success="handleAvatarSuccess"
+                    :on-error="onError(1)">
+                    <el-input
+                        class="shippingCertificate"
+                        style="width: 270px; display: flex"
+                        placeholder="上传水运单图片(必填项)"
+                        v-model="form.image"
+                        disabled
+                    >
+                    </el-input>
+                    <el-button
+                        size="small"
+                        type="primary"
+                        style="
+                        width: 115px;
+                        height: 35px;
+                        margin-left: 275px;
+                        margin-top: -35px;
+                        display: flex;
+                        "
+                        @click="upCLick(1)">
+                        点击上传附件</el-button
+                    >
+                </el-upload>
+            </el-form-item>
+          </div>
+     </el-form>
+    </div>
+    <!-- 模态框 -->
+    <el-drawer
+      :visible.sync="drawer"
+      :direction="direction"
+      :before-close="handleClose"
+      size="50%"
+    >
+      <el-input
+        placeholder="请输入内容"
+        v-model="input"
+        style="margin-top: 10px; margin-left: 20px; width: 250px"
+        clearable
+      >
+      </el-input>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="onclick(a)"
+        style="margin-bottom: 15px">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <div v-show="a == 5">
+        <dilTable
+          v-bind.sync="batchOption"
+          @radio-change="batchChange"
+        ></dilTable>
+      </div>
+      <div v-show="a == 6">
+        <dilTable
+          v-bind.sync="contractPriceOption"
+          @radio-change="priceChange"
+        ></dilTable>
+      </div>
+    </el-drawer>
+    <!-- 底部按钮 -->
+    <div class="button-box">
+      <el-button @click="cancel">取消</el-button>
+      <el-button type="primary" @click="makeSure" :loading="isLoading">确定</el-button>
+    </div>
+  </div>
+</template>
+
+<script>
+import PageTitle from "@/components/Page/Title";
+import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
+import {BigNumber} from 'bignumber.js';
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+      form: {},
+      portId:null,
+      ports:[],
+      isLoading:false,
+      drawer: false,
+      direction: "rtl",
+      a:0,
+      input:null,
+      batchId:null,
+      purchaseOrderId:null,
+      batchName:null,
+      cargoPictureUrl: "",
+      batchOption: {
+        requestUrl: "/api/v1/uc/selectPurchaseOrderForShip?apiId=502",
+        selectionType: "radio",
+        map: [],
+      },
+      contractPriceOption: {
+        requestUrl: "/api/v1/rms/selectbmsshipContractPriceList?apiId=500",
+        selectionType: "radio",
+        map: [],
+      }
+    };
+  },
+  mounted() {
+    //this.getPorts();
+    this.information();
+  },
+  methods: {
+    information() {
+      //编辑车皮装车作业
+      this.axios
+        .post(
+          "/api/v1/bms/getBmsshipFee/" + this.$route.params.resultId
+        )
+        .then((res) => {
+          res.data.data.forEach((e) => {
+            console.log(e);
+            this.form = e;
+            this.batchName=e.batchName;
+            this.batchId=e.batchId;
+            this.purchaseOrderId=e.purchaseOrderId;
+          });
+        });
+    },
+    //右侧选中框
+    ondrawer(num) {
+      this.drawer = true;
+      this.a = num;
+      // 清空当前输入框中的数据
+      this.input = "";
+    },
+    handleClose(done) {
+      done();
+    },
+    onclick(a) {
+        if(a==5){
+            this.batchOption.requestUrl =
+            "/api/v1/uc/selectPurchaseOrderForShip?apiId=502&index=" + this.input;
+        }else if(a==6){
+            this.contractPriceOption.requestUrl =
+            "api/v1/rms/selectbmsshipContractPriceList?apiId=500&con=" + this.input;
+        }
+    },
+    //修改选中
+    batchChange(selection) {
+        this.batchId=selection.batchId;
+        this.purchaseOrderId=selection.purchaseOrderId;
+        console.log("before",this.batchName);
+        this.batchName =selection.materialName + selection.resultForeignShipName;
+        console.log("before",this.batchName);
+        console.log("batch",selection);
+    },
+    priceChange(selection){
+        this.form.unitPriceId = selection.resultId;
+        this.form.unitPrice = selection.unitPrice;
+        console.log("unitPrice:",selection);
+        this.calculate();
+    },
+    //计算水运费
+    calculate(){
+        console.log("能否计算水运费:",this.form.realTonnage && this.form.unitPrice);
+        if(this.form.realTonnage && this.form.unitPrice){
+           let fee = new BigNumber(this.form.realTonnage);
+           this.$set(this.form,'fee',fee.multipliedBy(this.form.unitPrice).toNumber())
+           console.log(this.form.fee);
+        }
+    },
+    makeSure() {
+      this.isLoading=true;
+      let map={
+        resultId:this.form.resultId,
+        batchId:this.batchId,
+        purchaseOrderId:this.purchaseOrderId,
+        unitPrice:this.form.unitPrice,
+        unitPriceId:this.form.unitPriceId,
+        realTonnage:this.form.realTonnage,
+        fee:this.form.fee,
+        makeTime:sjTime(this.form.makeTime),
+        image:this.form.image,
+        feeType:1,
+        userId:getCookie("userId")
+      }
+      console.log(map);
+      if(
+       map.unitPrice==null ||
+       map.realTonnage==null ||
+       map.fee==null ||
+       map.makeTime==null ||
+       map.image==null || map.image==''
+       ){
+        this.$message.error("存在空值!");
+        this.isLoading=false;
+      }else{
+         map.startTime = sjTime(this.form.startTime);
+         map.endTime = sjTime(this.form.endTime);
+         this.axios.post("/api/v1/bms/updatePortHandlingFee",map).then(res => {
+          if (res.data.code == 0) {
+            this.$message({
+              type: "success",
+              message: "修改成功!"
+            });
+            this.cancel();
+          } else {
+            this.$message.error(res.data.data);
+          }
+        }).then(()=>{
+          this.isLoading=false;
+        });
+      }
+       
+    },
+    // 取消
+    cancel() {
+      this.$router.go(-1);
+    },
+    //查询港口id
+    getPorts(){
+        this.axios.post("/api/v1/rms/getPortName?index=").then(res => {
+          if (res.data.code == 200) {
+            this.ports=res.data.data;
+            console.log(this.ports);
+          } else {
+            this.$message.error(res.data.data);
+          }
+        });
+    },
+    beforeUpload(file) {
+      this.upBool = true;
+      const isLt2M = file.size < 1024 * 1024 * 0.5;
+      if (!isLt2M) {
+        this.$message.error("上传文件大小不能超过500kb!");
+      } else {
+        let size = file.size / 1024;
+        let _URL = window.URL || window.webkitURL;
+        let img = new Image();
+        img.src = _URL.createObjectURL(file);
+      }
+      return isLt2M;
+    },
+    onError(err) {
+      if (this.upBool) {
+        if (this.num == 1) {
+          this.form.image = null;
+          this.$message.error("上传失败");
+        }
+      }
+    },
+    handleAvatarSuccess(res, file) {
+      if (res.code) {
+        this.upBool = false;
+        if (this.num == 1) {
+         this.form.image = res.data;
+        }
+        this.$message.success("上传成功");
+      }
+    },
+    upCLick(val) {
+      this.num = val;
+    },
+  }
+};
+</script>
+<style lang="scss">
+.searchSelect {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    margin: 5px;
+    .text {
+    width: 40px;
+    }
+    .input {
+    width: 200px;
+    }
+    .button {
+    margin-left: 6px;
+    }
+}
+.button-box {
+  display: flex;
+  justify-content: center;
+  margin: 20px;
+  .el-button {
+    width: 80px;
+    margin: 10px;
+  }
+}
+.form-box {
+  display: flex;
+  justify-content: center;
+  .el-form-item {
+    display: flex;
+    justify-content: center;
+    .el-form-item__label {
+      display: flex;
+      align-items: center;
+    }
+    .el-form-item__content {
+      .el-input {
+        .el-input__inner {
+          width: 250px;
+        }
+      }
+    }
+  }
+}
+</style>

+ 350 - 0
src/views/TMS/components/bmsship/editTwoSectionHandleFee.vue

@@ -0,0 +1,350 @@
+<template>
+  <!-- 修改二程船装卸费2-->
+  <div class="addWagonLoad">
+    <PageTitle>返回</PageTitle>
+    <div class="form-box">
+      <!-- <dil-form :formId="271" v-model="form1" ref="from1"></dil-form> -->
+   
+      <el-form v-model="form">
+        <div class="searchSelect">
+            <span class="text">批次</span>
+            <el-input class="input" v-model="batchName" disabled> </el-input>
+            <el-button class="button" type="primary" @click="ondrawer(5)">浏览</el-button>
+        </div>
+         <div class="searchSelect">
+            <span class="text">单价</span>
+            <el-input class="input" v-model="form.unitPrice" disabled  @change="calculate"> </el-input>
+            <el-button class="button" type="primary" @click="ondrawer(6)">浏览</el-button>
+        </div>
+          <div class="preview-group">
+             <el-form-item label="实装吨位">
+                <el-input v-model="form.realTonnage" type="number"  @change="calculate"></el-input>
+            </el-form-item>
+            <el-form-item label="水运费用">
+                <el-input v-model="form.fee" type="number"  disabled></el-input>
+            </el-form-item>
+             <el-form-item label="开票日期">
+                 <el-date-picker
+                    v-model="form.makeTime"
+                    type="datetime"
+                    placeholder="选择日期">
+                </el-date-picker>
+            </el-form-item>
+            <el-form-item label="上传水运单图片">
+                <el-upload
+                    class="upload-demo"
+                    style="width: 270px"
+                    ref="upload1"
+                    accept=".pdf , .jpg, .png, .jpeg, .tif, .gif, .pcx, .tga, .exif, .fpx, .svg , .bmp"
+                    action="/api/v1/bms/uploadBmsshipOrder"
+                    :before-upload="beforeUpload"
+                    :multiple="false"
+                    list-type="picture"
+                    :show-file-list="false"
+                    :on-success="handleAvatarSuccess"
+                    :on-error="onError(1)">
+                    <el-input
+                        class="shippingCertificate"
+                        style="width: 270px; display: flex"
+                        placeholder="上传水运单图片(必填项)"
+                        v-model="form.image"
+                        disabled
+                    >
+                    </el-input>
+                    <el-button
+                        size="small"
+                        type="primary"
+                        style="
+                        width: 115px;
+                        height: 35px;
+                        margin-left: 275px;
+                        margin-top: -35px;
+                        display: flex;
+                        "
+                        @click="upCLick(1)">
+                        点击上传附件</el-button
+                    >
+                </el-upload>
+            </el-form-item>
+          </div>
+     </el-form>
+    </div>
+    <!-- 模态框 -->
+    <el-drawer
+      :visible.sync="drawer"
+      :direction="direction"
+      :before-close="handleClose"
+      size="50%"
+    >
+      <el-input
+        placeholder="请输入内容"
+        v-model="input"
+        style="margin-top: 10px; margin-left: 20px; width: 250px"
+        clearable
+      >
+      </el-input>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="onclick(a)"
+        style="margin-bottom: 15px">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <div v-show="a == 5">
+        <dilTable
+          v-bind.sync="batchOption"
+          @radio-change="batchChange"
+        ></dilTable>
+      </div>
+      <div v-show="a == 6">
+        <dilTable
+          v-bind.sync="contractPriceOption"
+          @radio-change="priceChange"
+        ></dilTable>
+      </div>
+    </el-drawer>
+    <!-- 底部按钮 -->
+    <div class="button-box">
+      <el-button @click="cancel">取消</el-button>
+      <el-button type="primary" @click="makeSure" :loading="isLoading">确定</el-button>
+    </div>
+  </div>
+</template>
+
+<script>
+import PageTitle from "@/components/Page/Title";
+import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
+import {BigNumber} from 'bignumber.js';
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+      form: {},
+      portId:null,
+      ports:[],
+      isLoading:false,
+      drawer: false,
+      direction: "rtl",
+      a:0,
+      input:null,
+      batchId:null,
+      purchaseOrderId:null,
+      batchName:null,
+      cargoPictureUrl: "",
+      batchOption: {
+        requestUrl: "/api/v1/uc/selectPurchaseOrderForShip?apiId=502",
+        selectionType: "radio",
+        map: [],
+      },
+      contractPriceOption: {
+        requestUrl: "/api/v1/rms/selectbmsshipContractPriceList?apiId=500",
+        selectionType: "radio",
+        map: [],
+      }
+    };
+  },
+  mounted() {
+    //this.getPorts();
+    this.information();
+  },
+  methods: {
+    information() {
+      //编辑车皮装车作业
+      this.axios
+        .post(
+          "/api/v1/bms/getBmsshipFee/" + this.$route.params.resultId
+        )
+        .then((res) => {
+          res.data.data.forEach((e) => {
+            console.log(e);
+            this.form = e;
+            this.batchName=e.batchName;
+            this.batchId=e.batchId;
+            this.purchaseOrderId=e.purchaseOrderId;
+          });
+        });
+    },
+    //右侧选中框
+    ondrawer(num) {
+      this.drawer = true;
+      this.a = num;
+      // 清空当前输入框中的数据
+      this.input = "";
+    },
+    handleClose(done) {
+      done();
+    },
+    onclick(a) {
+        if(a==5){
+            this.batchOption.requestUrl =
+            "/api/v1/uc/selectPurchaseOrderForShip?apiId=502&index=" + this.input;
+        }else if(a==6){
+            this.contractPriceOption.requestUrl =
+            "api/v1/rms/selectbmsshipContractPriceList?apiId=500&con=" + this.input;
+        }
+    },
+    //修改选中
+    batchChange(selection) {
+        this.batchId=selection.batchId;
+        this.purchaseOrderId=selection.purchaseOrderId;
+        console.log("before",this.batchName);
+        this.batchName =selection.materialName + selection.resultForeignShipName;
+        console.log("before",this.batchName);
+        console.log("batch",selection);
+    },
+    priceChange(selection){
+        this.form.unitPriceId = selection.resultId;
+        this.form.unitPrice = selection.unitPrice;
+        console.log("unitPrice:",selection);
+        this.calculate();
+    },
+    //计算水运费
+    calculate(){
+        console.log("能否计算水运费:",this.form.realTonnage && this.form.unitPrice);
+        if(this.form.realTonnage && this.form.unitPrice){
+           let fee = new BigNumber(this.form.realTonnage);
+           this.$set(this.form,'fee',fee.multipliedBy(this.form.unitPrice).toNumber())
+           console.log(this.form.fee);
+        }
+    },
+    makeSure() {
+      this.isLoading=true;
+      let map={
+        resultId:this.form.resultId,
+        batchId:this.batchId,
+        purchaseOrderId:this.purchaseOrderId,
+        unitPrice:this.form.unitPrice,
+        unitPriceId:this.form.unitPriceId,
+        realTonnage:this.form.realTonnage,
+        fee:this.form.fee,
+        makeTime:sjTime(this.form.makeTime),
+        image:this.form.image,
+        feeType:2,
+        userId:getCookie("userId")
+      }
+      console.log(map);
+      if(
+       map.unitPrice==null ||
+       map.realTonnage==null ||
+       map.fee==null ||
+       map.makeTime==null ||
+       map.image==null || map.image==''
+       ){
+        this.$message.error("存在空值!");
+        this.isLoading=false;
+      }else{
+         map.startTime = sjTime(this.form.startTime);
+         map.endTime = sjTime(this.form.endTime);
+         this.axios.post("/api/v1/bms/updatePortHandlingFee",map).then(res => {
+          if (res.data.code == 0) {
+            this.$message({
+              type: "success",
+              message: "修改成功!"
+            });
+            this.cancel();
+          } else {
+            this.$message.error(res.data.data);
+          }
+        }).then(()=>{
+          this.isLoading=false;
+        });
+      }
+       
+    },
+    // 取消
+    cancel() {
+      this.$router.go(-1);
+    },
+    //查询港口id
+    getPorts(){
+        this.axios.post("/api/v1/rms/getPortName?index=").then(res => {
+          if (res.data.code == 200) {
+            this.ports=res.data.data;
+            console.log(this.ports);
+          } else {
+            this.$message.error(res.data.data);
+          }
+        });
+    },
+    beforeUpload(file) {
+      this.upBool = true;
+      const isLt2M = file.size < 1024 * 1024 * 0.5;
+      if (!isLt2M) {
+        this.$message.error("上传文件大小不能超过500kb!");
+      } else {
+        let size = file.size / 1024;
+        let _URL = window.URL || window.webkitURL;
+        let img = new Image();
+        img.src = _URL.createObjectURL(file);
+      }
+      return isLt2M;
+    },
+    onError(err) {
+      if (this.upBool) {
+        if (this.num == 1) {
+          this.form.image = null;
+          this.$message.error("上传失败");
+        }
+      }
+    },
+    handleAvatarSuccess(res, file) {
+      if (res.code) {
+        this.upBool = false;
+        if (this.num == 1) {
+         this.form.image = res.data;
+        }
+        this.$message.success("上传成功");
+      }
+    },
+    upCLick(val) {
+      this.num = val;
+    },
+  }
+};
+</script>
+<style lang="scss">
+.searchSelect {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    margin: 5px;
+    .text {
+    width: 40px;
+    }
+    .input {
+    width: 200px;
+    }
+    .button {
+    margin-left: 6px;
+    }
+}
+.button-box {
+  display: flex;
+  justify-content: center;
+  margin: 20px;
+  .el-button {
+    width: 80px;
+    margin: 10px;
+  }
+}
+.form-box {
+  display: flex;
+  justify-content: center;
+  .el-form-item {
+    display: flex;
+    justify-content: center;
+    .el-form-item__label {
+      display: flex;
+      align-items: center;
+    }
+    .el-form-item__content {
+      .el-input {
+        .el-input__inner {
+          width: 250px;
+        }
+      }
+    }
+  }
+}
+</style>

+ 0 - 10
src/views/TMS/components/bmsship/lossDetailsStatement.vue

@@ -6,18 +6,8 @@
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
-      <!-- <el-button type="primary" @click="click()">
-        生成途损费账单
-      </el-button> -->
     </div>
     <dilTable v-bind.sync="option">
-      <!-- <el-table-column fixed="right" label="操作" width="100">
-        <template slot-scope="scope">
-          <el-button @click="btnclick(scope.row)" type="text" size="small"
-            >详情</el-button
-          >
-        </template>
-      </el-table-column> -->
     </dilTable>
   </div>
 </template>

+ 130 - 0
src/views/TMS/components/bmsship/moistureDetection.vue

@@ -0,0 +1,130 @@
+//三程船的水分检测费
+<template>
+  <!-- 二程船水运费 -->
+  <div class="contract_price">
+    <div class="sache">
+      <el-input placeholder="请输入内容" v-model="inputText" clearable>
+      </el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button type="primary" class="btn" @click="toInsert">
+        <i class="el-icon-plus"></i>新增
+      </el-button>
+    </div>
+    <div class="table">
+      <dilTable v-bind.sync="options">
+        <el-table-column fixed="right" label="操作" width="100">
+          <template slot-scope="scope">
+            <!-- <el-button type="text" size="small" @click="update(scope)">
+              修改
+            </el-button> -->
+            <el-button type="text" size="mini" @click="deleteOne(scope)">
+              删除
+            </el-button>
+          </template>
+        </el-table-column>
+      </dilTable>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      inputText: "",
+      isShow: false,
+      options: {
+        // first请求数据的地址
+        requestUrl: "/api/v1/bms/selectPortFeeSecondList?apiId=504&feeType=5"
+      }
+    };
+  },
+  methods: {
+    getRequestUrl() {
+      this.options.requestUrl =
+        "/api/v1/bms/selectPortFeeSecondList?apiId=504&feeType=5&i=" +
+        new Date();
+    },
+    //查询
+    onclick() {
+      this.options.requestUrl =
+        "/api/v1/bms/selectPortFeeSecondList?apiId=504&feeType=5&con=" +
+        this.inputText;
+    },
+    //新增
+    toInsert() {
+      this.$router.push("/addMoistureDetection");
+    },
+    // update(scope) {
+    //   console.log(scope.row.resultId);
+    //   this.$router.push("/editTwoSectionFee/" + scope.row.resultId);
+    // },
+    showCarrier(scope) {
+      console.log(scope.row.resultId);
+      this.$router.push("/showTwoSectionFee/" + scope.row.resultId);
+    },
+    deleteOne(scope) {
+      this.$confirm("是否删除", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+        center: true
+      })
+        .then(() => {
+          let map = {
+            resultId: scope.row.resultId
+          };
+          this.axios
+            .post(
+              "/api/v1/bms/deletePortHandlingFeeSecond/" + scope.row.resultId
+            )
+            .then(res => {
+              if (res.data.code == 200) {
+                this.$message({
+                  type: "success",
+                  message: "删除成功!"
+                });
+                this.getRequestUrl();
+              } else {
+                this.$message({
+                  message: "删除失败",
+                  type: "warning"
+                });
+              }
+            });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "删除操作已取消!"
+          });
+        });
+    },
+    toPhotoClick(resultId) {
+      this.axios
+        .post("/api/v1/bms/downloadBmsshipOrder?resultId=" + resultId)
+        .then(res => {
+          console.log("res", res.data.data);
+          this.srcList = [];
+          this.src = res.data.data;
+          this.isShow = true;
+          this.srcList.push(res.data.data);
+        });
+    }
+  }
+};
+</script>
+
+<style lang="scss" scode>
+.contract_price {
+  .sache {
+    padding: 1.25rem 0.375rem;
+    .el-input {
+      width: 20%;
+      margin-right: 1.25rem;
+    }
+  }
+}
+</style>

+ 148 - 0
src/views/TMS/components/bmsship/threeSectionFee.vue

@@ -0,0 +1,148 @@
+<template>
+  <!-- 二程船水运费 -->
+  <div class="contract_price">
+    <div class="sache">
+      <el-input placeholder="请输入内容" v-model="inputText" clearable>
+      </el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button type="primary" class="btn" @click="toInsert">
+        <i class="el-icon-plus"></i>新增
+      </el-button>
+    </div>
+    <div class="table">
+      <mergeRowTable v-bind.sync="options">
+        <el-table-column fixed="right" label="操作" width="100">
+          <template slot-scope="scope">
+            <el-button type="text" size="small" @click="update(scope)">
+              修改
+            </el-button>
+            <el-button type="text" size="mini" @click="deleteOne(scope)">
+              删除
+            </el-button>
+            <el-button
+              @click="toPhotoClick(scope.row.resultId)"
+              type="text"
+              size="small"
+            >
+              水运单图片
+            </el-button>
+          </template>
+        </el-table-column>
+      </mergeRowTable>
+    </div>
+    <vxe-modal width="549px" height="731px" v-model="isShow" show-footer>
+      <div class="demo-image__preview">
+        <el-image
+          style=" height:731px;text-align:center"
+          :src="src"
+          :preview-src-list="srcList"
+        >
+        </el-image>
+      </div>
+    </vxe-modal>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      inputText: "",
+      isShow: false,
+      options: {
+        // first请求数据的地址
+        requestUrl: "/api/v1/bms/selectPortFeeSecondList?apiId=506&feeType=3",
+        comparison:"resultForeignShipName",
+        columnIndexs:[0,1,2,3]
+      }
+    };
+  },
+  methods: {
+    getRequestUrl() {
+      this.options.requestUrl =
+        "/api/v1/bms/selectPortFeeSecondList?apiId=506&feeType=3&i=" +
+        new Date();
+    },
+    //查询
+    onclick() {
+      this.options.requestUrl =
+        "/api/v1/bms/selectPortFeeSecondList?apiId=506&feeType=3&con=" +
+        this.inputText;
+    },
+    //新增
+    toInsert() {
+      this.$router.push("/addThreeSectionFee");
+    },
+    update(scope) {
+      console.log(scope.row.resultId);
+      this.$router.push("/editThreeSectionFee/" + scope.row.resultId);
+    },
+    showCarrier(scope) {
+      console.log(scope.row.resultId);
+      this.$router.push("/showTwoSectionFee/" + scope.row.resultId);
+    },
+    deleteOne(scope) {
+      this.$confirm("是否删除", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+        center: true
+      })
+        .then(() => {
+          let map = {
+            resultId: scope.row.resultId
+          };
+          this.axios
+            .post(
+              "/api/v1/bms/deletePortHandlingFeeSecond/" + scope.row.resultId
+            )
+            .then(res => {
+              if (res.data.code == 200) {
+                this.$message({
+                  type: "success",
+                  message: "删除成功!"
+                });
+                this.getRequestUrl();
+              } else {
+                this.$message({
+                  message: "删除失败",
+                  type: "warning"
+                });
+              }
+            });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "删除操作已取消!"
+          });
+        });
+    },
+    toPhotoClick(resultId) {
+      this.axios
+        .post("/api/v1/bms/downloadBmsshipOrder?resultId=" + resultId)
+        .then(res => {
+          console.log("res", res.data.data);
+          this.srcList = [];
+          this.src = res.data.data;
+          this.isShow = true;
+          this.srcList.push(res.data.data);
+        });
+    }
+  }
+};
+</script>
+
+<style lang="scss" scode>
+.contract_price {
+  .sache {
+    padding: 1.25rem 0.375rem;
+    .el-input {
+      width: 20%;
+      margin-right: 1.25rem;
+    }
+  }
+}
+</style>

+ 132 - 0
src/views/TMS/components/bmsship/threeSectionFeeDetails.vue

@@ -0,0 +1,132 @@
+<template>
+  <!-- 装船作业页面 -->
+  <div class="shipTransport">
+    <div class="top">
+      <el-input
+        class="el-input"
+        placeholder="请输入内容"
+        v-model="input"
+        clearable
+      >
+      </el-input>
+<!-- 
+       <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期"></el-date-picker>
+      <span>至</span>
+      <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期"></el-date-picker> -->
+
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button type="primary" @click="refresh()">
+        <i class="el-icon-refresh"></i>刷新
+      </el-button>
+    </div>
+    <dilTable v-bind.sync="option">
+      <el-table-column fixed="right" label="操作" align="center" width="100">
+        <template slot-scope="scope">
+          <el-button @click="click(scope.row.resultId)" type="text" size="small"
+            >编辑</el-button
+          >
+          <!-- <el-button
+            type="text"
+            size="small"
+            @click="deleteclick(scope.row.resultId)"
+            >删除</el-button> -->
+        </template>
+      </el-table-column>
+    </dilTable>
+  </div>
+</template>
+
+<script>
+import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
+export default {
+  name: "homeworkPath",
+  data() {
+    return {
+      startTime: null,
+      endTime: null,
+      input: "",
+       startTime: null,
+      endTime: null,
+      option: {
+        // 表格请求数据的地址
+        requestUrl: "/api/v1/tms/getLoadShipList?apiId=63",
+      },
+    };
+  },
+  mounted() {},
+  methods: {
+    onclick() {
+      let startTime = null;
+      let endTime = null;
+      if (this.startTime) {
+        startTime = sjTime(this.startTime);
+      }
+      if (this.endTime) {
+        endTime = sjTime(this.endTime);
+      }
+      if(startTime && endTime && startTime < endTime){
+          this.option.requestUrl = "/api/v1/tms/getLoadShipList?apiId=63&con=" + this.input+
+                "&startTime=" +
+                startTime +
+                "&endTime=" +
+                endTime;
+      }else{
+          this.option.requestUrl = "/api/v1/tms/getLoadShipList?apiId=63&con=" + this.input;
+      }
+    },
+    click(resultId) {
+      console.log("aaa" + resultId);
+      this.$router.push("/updateThreeSectionFeeDetails/" + resultId);
+    },
+    addclick() {
+      this.$router.push("/addLoadShip/");
+    },
+    deleteclick(scope) {
+      let resultId = scope;
+      this.$confirm("是否删除", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+        center: true,
+      })
+        .then(() => {
+          this.axios.post("/api/v1/tms/deleteLoadShip/" + resultId).then(() => {
+            this.$message({
+              type: "success",
+              message: "删除成功!",
+            });
+            this.option.requestUrl =
+              "/api/v1/tms/getLoadShipList?apiId=63&i=" + new Date();
+          });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "取消删除!",
+          });
+        });
+    },
+    refresh() {
+      this.$router.go(0);
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.shipTransport {
+  .top {
+    padding: 1.25rem 0.375rem;
+    .el-input {
+      width: 20%;
+      margin-right: 40rpx;
+    }
+    .btn {
+      width: 5.5%;
+      margin-left: 0.25rem;
+    }
+  }
+}
+</style>

Some files were not shown because too many files changed in this diff