contract_detail.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869
  1. <template>
  2. <view class="container">
  3. <view class="introduce-section">
  4. <view class="price-box">
  5. <view class="title">{{contract.contractNo}}</view>
  6. <view class="title-tip">
  7. <text class="price-tip">¥</text>
  8. <text class="price">{{contract.price}}</text>
  9. <text class="price-tip">元/吨</text>
  10. </view>
  11. </view>
  12. <view class="bot-row">
  13. <view class='cu-tag radius line-orange'>{{contract.seller}}</view>
  14. <view class='cu-tag radius line-orange'>{{contract.buyer}}</view>
  15. </view>
  16. <view class="bot-row">
  17. <view class='cu-tag radius line-orange'>{{contract.goodsName}}</view>
  18. <view class='cu-tag radius line-orange'>{{contract.total}}吨</view>
  19. </view>
  20. </view>
  21. <view class="detail-desc">
  22. <view class="d-header">
  23. <text>基本信息</text>
  24. </view>
  25. <view class="c-list">
  26. <view class="c-row b-b">
  27. <text class="tit">卖方</text>
  28. <view class="con-list">
  29. <text>{{contract.seller}}</text>
  30. </view>
  31. </view>
  32. <view class="c-row b-b">
  33. <text class="tit">买方</text>
  34. <view class="con-list">
  35. <text>{{contract.buyer}}</text>
  36. </view>
  37. </view>
  38. <view class="c-row b-b">
  39. <text class="tit">货名</text>
  40. <view class="con-list">
  41. <text>{{contract.goodsName}}</text>
  42. </view>
  43. </view>
  44. <view class="c-row b-b">
  45. <text class="tit">总量(吨)</text>
  46. <view class="con-list">
  47. <text>{{contract.total}}</text>
  48. </view>
  49. </view>
  50. <view class="c-row b-b">
  51. <text class="tit">起始时间</text>
  52. <view class="con-list">
  53. <text>{{contract.startTime}}</text>
  54. </view>
  55. </view>
  56. <view class="c-row b-b">
  57. <text class="tit">结束时间</text>
  58. <view class="con-list">
  59. <text>{{contract.endTime}}</text>
  60. </view>
  61. </view>
  62. <view class="c-row b-b">
  63. <text class="tit">合同编号</text>
  64. <view class="con-list">
  65. <text>{{contract.contractNo}}</text>
  66. </view>
  67. </view>
  68. <view class="c-row b-b">
  69. <text class="tit">容重(克/升){{'>='}}</text>
  70. <view class="con-list">
  71. <text>{{contract.bulkDensity}}</text>
  72. </view>
  73. </view>
  74. <view class="c-row b-b">
  75. <text class="tit">水分(%){{'<='}}</text>
  76. <view class="con-list">
  77. <text>{{contract.waterContent}}</text>
  78. </view>
  79. </view>
  80. <view class="c-row b-b">
  81. <text class="tit">杂质(%){{'<='}}</text>
  82. <view class="con-list">
  83. <text>{{contract.impurity}}</text>
  84. </view>
  85. </view>
  86. <view class="c-row b-b">
  87. <text class="tit">霉变粒(%){{'<='}}</text>
  88. <view class="con-list">
  89. <text>{{contract.mildew}}</text>
  90. </view>
  91. </view>
  92. <view class="c-row b-b">
  93. <text class="tit">焦糊粒(%){{'<='}}</text>
  94. <view class="con-list">
  95. <text>{{contract.burnt}}</text>
  96. </view>
  97. </view>
  98. <view class="c-row b-b">
  99. <text class="tit">品级</text>
  100. <view class="con-list">
  101. <text>{{contract.level}}</text>
  102. </view>
  103. </view>
  104. <view class="c-row b-b">
  105. <text class="tit">包装方式</text>
  106. <view class="con-list">
  107. <text>{{contract.packing}}</text>
  108. </view>
  109. </view>
  110. <view class="c-row b-b">
  111. <text class="tit">交货地点</text>
  112. <view class="con-list">
  113. <text>{{contract.place}}</text>
  114. </view>
  115. </view>
  116. <view class="c-row b-b">
  117. <text class="tit">价格(元/吨)</text>
  118. <view class="con-list">
  119. <text>{{contract.price}}</text>
  120. </view>
  121. </view>
  122. <view class="c-row b-b">
  123. <text class="tit">验收方式</text>
  124. <view class="con-list">
  125. <text>{{contract.acceptType}}</text>
  126. </view>
  127. </view>
  128. <view class="c-row b-b">
  129. <text class="tit">备注</text>
  130. <view class="con-list">
  131. <text>{{contract.memo}}</text>
  132. </view>
  133. </view>
  134. </view>
  135. </view>
  136. </view>
  137. </template>
  138. <script>
  139. import uploadImage from '@/components/ossutil/uploadFile.js';
  140. import uniNumberBox from '@/components/uni-number-box.vue';
  141. import {
  142. mapState
  143. } from 'vuex';
  144. export default {
  145. components: {
  146. uniNumberBox
  147. },
  148. data() {
  149. return {
  150. contract: {
  151. }
  152. };
  153. },
  154. onShow() {
  155. },
  156. onLoad(options) {
  157. const that = this
  158. uni.showLoading({
  159. title: '正在加载'
  160. })
  161. that.$api.request('contract', 'getContractDetail', {
  162. contractNo: options.contractNo
  163. }, failres => {
  164. that.$api.msg(failres.errmsg)
  165. uni.hideLoading()
  166. }).then(res => {
  167. that.contract = res.data
  168. uni.hideLoading()
  169. })
  170. },
  171. computed: {
  172. ...mapState(['hasLogin','userInfo'])
  173. },
  174. methods: {
  175. }
  176. }
  177. </script>
  178. <style lang='scss' scoped>
  179. .container {
  180. background: $page-color-base;
  181. padding-bottom: 160upx;
  182. }
  183. .icon-you {
  184. font-size: $font-base + 2upx;
  185. color: #888;
  186. }
  187. .carousel {
  188. height: 722upx;
  189. position: relative;
  190. swiper {
  191. height: 100%;
  192. }
  193. .image-wrapper {
  194. width: 100%;
  195. height: 100%;
  196. }
  197. .swiper-item {
  198. display: flex;
  199. justify-content: center;
  200. align-content: center;
  201. height: 750upx;
  202. overflow: hidden;
  203. image {
  204. width: 100%;
  205. height: 100%;
  206. }
  207. }
  208. }
  209. /* 分享 */
  210. .share-section {
  211. display: flex;
  212. align-items: center;
  213. color: $font-color-base;
  214. background: linear-gradient(left, #fdf5f6, #fbebf6);
  215. padding: 12upx 30upx;
  216. .share-icon {
  217. display: flex;
  218. align-items: center;
  219. width: 70upx;
  220. height: 30upx;
  221. line-height: 1;
  222. border: 1px solid $uni-color-primary;
  223. border-radius: 4upx;
  224. position: relative;
  225. overflow: hidden;
  226. font-size: 22upx;
  227. color: $uni-color-primary;
  228. &:after {
  229. content: '';
  230. width: 50upx;
  231. height: 50upx;
  232. border-radius: 50%;
  233. left: -20upx;
  234. top: -12upx;
  235. position: absolute;
  236. background: $uni-color-primary;
  237. }
  238. }
  239. .icon-xingxing {
  240. position: relative;
  241. z-index: 1;
  242. font-size: 24upx;
  243. margin-left: 2upx;
  244. margin-right: 10upx;
  245. color: #fff;
  246. line-height: 1;
  247. }
  248. .tit {
  249. font-size: $font-base;
  250. margin-left: 10upx;
  251. }
  252. .icon-bangzhu1 {
  253. padding: 10upx;
  254. font-size: 30upx;
  255. line-height: 1;
  256. }
  257. .share-btn {
  258. flex: 1;
  259. text-align: right;
  260. font-size: $font-sm;
  261. color: $uni-color-primary;
  262. }
  263. .icon-you {
  264. font-size: $font-sm;
  265. margin-left: 4upx;
  266. color: $uni-color-primary;
  267. }
  268. }
  269. .c-list {
  270. font-size: $font-sm + 2upx;
  271. color: $font-color-base;
  272. background: #fff;
  273. .c-row {
  274. display: flex;
  275. align-items: center;
  276. padding: 20upx 30upx;
  277. position: relative;
  278. }
  279. .tit {
  280. width: 220upx;
  281. }
  282. .con {
  283. flex: 1;
  284. color: $font-color-dark;
  285. .selected-text {
  286. margin-right: 10upx;
  287. }
  288. }
  289. .bz-list {
  290. height: 40upx;
  291. font-size: $font-sm+2upx;
  292. color: $font-color-dark;
  293. text {
  294. display: inline-block;
  295. margin-right: 30upx;
  296. }
  297. }
  298. .con-list {
  299. flex: 1;
  300. display: flex;
  301. flex-direction: column;
  302. color: $font-color-dark;
  303. line-height: 40upx;
  304. text-align: right;
  305. padding-right: 20upx;
  306. }
  307. .red {
  308. color: $uni-color-primary;
  309. }
  310. }
  311. /* 评价 */
  312. .eva-section {
  313. display: flex;
  314. flex-direction: column;
  315. padding: 20upx 30upx;
  316. background: #fff;
  317. margin-top: 16upx;
  318. .e-header {
  319. display: flex;
  320. align-items: center;
  321. height: 70upx;
  322. font-size: $font-sm + 2upx;
  323. color: $font-color-light;
  324. .tit {
  325. font-size: $font-base + 2upx;
  326. color: $font-color-dark;
  327. margin-right: 4upx;
  328. }
  329. .tip {
  330. flex: 1;
  331. text-align: right;
  332. }
  333. .icon-you {
  334. margin-left: 10upx;
  335. }
  336. }
  337. }
  338. .eva-box {
  339. display: flex;
  340. padding: 20upx 0;
  341. .portrait {
  342. flex-shrink: 0;
  343. width: 80upx;
  344. height: 80upx;
  345. border-radius: 100px;
  346. }
  347. .right {
  348. flex: 1;
  349. display: flex;
  350. flex-direction: column;
  351. font-size: $font-base;
  352. color: $font-color-base;
  353. padding-left: 26upx;
  354. .con {
  355. font-size: $font-base;
  356. color: $font-color-dark;
  357. padding: 20upx 0;
  358. }
  359. .bot {
  360. display: flex;
  361. justify-content: space-between;
  362. font-size: $font-sm;
  363. color: $font-color-light;
  364. }
  365. }
  366. }
  367. /* 详情 */
  368. .detail-desc {
  369. background: #fff;
  370. margin-top: 16upx;
  371. width: 750upx;
  372. .d-header {
  373. display: flex;
  374. justify-content: center;
  375. align-items: center;
  376. height: 80upx;
  377. font-size: $font-base + 2upx;
  378. color: $font-color-dark;
  379. position: relative;
  380. text {
  381. padding: 0 20upx;
  382. background: #fff;
  383. position: relative;
  384. z-index: 1;
  385. }
  386. &:after {
  387. position: absolute;
  388. left: 50%;
  389. top: 50%;
  390. transform: translateX(-50%);
  391. width: 300upx;
  392. height: 0;
  393. content: '';
  394. border-bottom: 1px solid #ccc;
  395. }
  396. }
  397. }
  398. /* 规格选择弹窗 */
  399. .attr-content {
  400. padding: 10upx 30upx;
  401. .a-t {
  402. display: flex;
  403. image {
  404. width: 170upx;
  405. height: 170upx;
  406. flex-shrink: 0;
  407. margin-top: -40upx;
  408. border-radius: 8upx;
  409. ;
  410. }
  411. .right {
  412. display: flex;
  413. flex-direction: column;
  414. padding-left: 24upx;
  415. font-size: $font-sm + 2upx;
  416. color: $font-color-base;
  417. line-height: 42upx;
  418. .price {
  419. font-size: $font-lg;
  420. color: $uni-color-primary;
  421. margin-bottom: 10upx;
  422. }
  423. .selected-text {
  424. margin-right: 10upx;
  425. }
  426. }
  427. }
  428. .attr-list {
  429. display: flex;
  430. flex-direction: column;
  431. font-size: $font-base + 2upx;
  432. color: $font-color-base;
  433. padding-top: 30upx;
  434. padding-left: 10upx;
  435. }
  436. .item-list {
  437. padding: 30upx 0 0;
  438. display: flex;
  439. flex-wrap: wrap;
  440. text {
  441. display: flex;
  442. align-items: center;
  443. justify-content: center;
  444. background: #eee;
  445. margin-right: 20upx;
  446. margin-bottom: 20upx;
  447. border-radius: 100upx;
  448. min-width: 60upx;
  449. height: 60upx;
  450. padding: 0 20upx;
  451. font-size: $font-base;
  452. color: $font-color-dark;
  453. }
  454. .selected {
  455. background: #fbebee;
  456. color: $uni-color-primary;
  457. }
  458. }
  459. }
  460. /* 弹出层 */
  461. .popup {
  462. position: fixed;
  463. left: 0;
  464. top: 0;
  465. right: 0;
  466. bottom: 0;
  467. z-index: 99;
  468. &.show {
  469. display: block;
  470. .mask {
  471. animation: showPopup 0.2s linear both;
  472. }
  473. .layer {
  474. animation: showLayer 0.2s linear both;
  475. }
  476. }
  477. &.hide {
  478. .mask {
  479. animation: hidePopup 0.2s linear both;
  480. }
  481. .layer {
  482. animation: hideLayer 0.2s linear both;
  483. }
  484. }
  485. &.none {
  486. display: none;
  487. }
  488. .mask {
  489. position: fixed;
  490. top: 0;
  491. width: 100%;
  492. height: 100%;
  493. z-index: 1;
  494. background-color: rgba(0, 0, 0, 0.4);
  495. }
  496. .layer {
  497. position: fixed;
  498. z-index: 99;
  499. bottom: 0;
  500. width: 100%;
  501. min-height: 40vh;
  502. border-radius: 10upx 10upx 0 0;
  503. background-color: #fff;
  504. .btn {
  505. height: 66upx;
  506. line-height: 66upx;
  507. border-radius: 100upx;
  508. background: $uni-color-primary;
  509. font-size: $font-base + 2upx;
  510. color: #fff;
  511. margin: 30upx auto 20upx;
  512. }
  513. }
  514. @keyframes showPopup {
  515. 0% {
  516. opacity: 0;
  517. }
  518. 100% {
  519. opacity: 1;
  520. }
  521. }
  522. @keyframes hidePopup {
  523. 0% {
  524. opacity: 1;
  525. }
  526. 100% {
  527. opacity: 0;
  528. }
  529. }
  530. @keyframes showLayer {
  531. 0% {
  532. transform: translateY(120%);
  533. }
  534. 100% {
  535. transform: translateY(0%);
  536. }
  537. }
  538. @keyframes hideLayer {
  539. 0% {
  540. transform: translateY(0);
  541. }
  542. 100% {
  543. transform: translateY(120%);
  544. }
  545. }
  546. }
  547. /* 底部操作菜单 */
  548. .page-bottom {
  549. position: fixed;
  550. left: 30upx;
  551. bottom: 30upx;
  552. z-index: 95;
  553. display: flex;
  554. justify-content: center;
  555. align-items: center;
  556. width: 690upx;
  557. height: 100upx;
  558. background: rgba(255, 255, 255, .9);
  559. box-shadow: 0 0 20upx 0 rgba(0, 0, 0, .5);
  560. border-radius: 16upx;
  561. .p-b-btn {
  562. display: flex;
  563. flex-direction: column;
  564. align-items: center;
  565. justify-content: center;
  566. font-size: $font-sm;
  567. color: $font-color-base;
  568. width: 96upx;
  569. height: 80upx;
  570. .yticon {
  571. font-size: 40upx;
  572. line-height: 48upx;
  573. color: $font-color-light;
  574. }
  575. &.active,
  576. &.active .yticon {
  577. color: $uni-color-primary;
  578. }
  579. .icon-fenxiang2 {
  580. font-size: 42upx;
  581. transform: translateY(-2upx);
  582. }
  583. .icon-shoucang {
  584. font-size: 46upx;
  585. }
  586. }
  587. }
  588. /* 优惠券面板 */
  589. .mask {
  590. display: flex;
  591. align-items: flex-end;
  592. position: fixed;
  593. left: 0;
  594. top: var(--window-top);
  595. bottom: 0;
  596. width: 100%;
  597. background: rgba(0, 0, 0, 0);
  598. z-index: 9995;
  599. transition: .3s;
  600. .mask-content {
  601. width: 100%;
  602. min-height: 30vh;
  603. max-height: 70vh;
  604. background: #f3f3f3;
  605. transform: translateY(100%);
  606. transition: .3s;
  607. overflow-y: scroll;
  608. }
  609. &.none {
  610. display: none;
  611. }
  612. &.show {
  613. background: rgba(0, 0, 0, .4);
  614. .mask-content {
  615. transform: translateY(0);
  616. }
  617. }
  618. }
  619. /* 优惠券列表 */
  620. .coupon-item {
  621. display: flex;
  622. flex-direction: column;
  623. margin: 20upx 24upx;
  624. background: #fff;
  625. .con {
  626. display: flex;
  627. align-items: center;
  628. position: relative;
  629. height: 120upx;
  630. padding: 0 30upx;
  631. &:after {
  632. position: absolute;
  633. left: 0;
  634. bottom: 0;
  635. content: '';
  636. width: 100%;
  637. height: 0;
  638. border-bottom: 1px dashed #f3f3f3;
  639. transform: scaleY(50%);
  640. }
  641. }
  642. .left {
  643. display: flex;
  644. flex-direction: column;
  645. justify-content: center;
  646. flex: 1;
  647. overflow: hidden;
  648. height: 100upx;
  649. }
  650. .title {
  651. font-size: 32upx;
  652. color: $font-color-dark;
  653. margin-bottom: 10upx;
  654. }
  655. .time {
  656. font-size: 24upx;
  657. color: $font-color-light;
  658. }
  659. .right {
  660. display: flex;
  661. flex-direction: column;
  662. justify-content: center;
  663. align-items: center;
  664. font-size: 26upx;
  665. color: $font-color-base;
  666. height: 100upx;
  667. }
  668. .price {
  669. font-size: 44upx;
  670. color: $base-color;
  671. &:before {
  672. content: '¥';
  673. font-size: 34upx;
  674. }
  675. }
  676. .tips {
  677. font-size: 24upx;
  678. color: $font-color-light;
  679. line-height: 60upx;
  680. padding-left: 30upx;
  681. }
  682. .circle {
  683. position: absolute;
  684. left: -6upx;
  685. bottom: -10upx;
  686. z-index: 10;
  687. width: 20upx;
  688. height: 20upx;
  689. background: #f3f3f3;
  690. border-radius: 100px;
  691. &.r {
  692. left: auto;
  693. right: -6upx;
  694. }
  695. }
  696. }
  697. .rich-img {
  698. width: 100%;
  699. height: auto;
  700. margin: 0;
  701. padding: 0;
  702. line-height: 0px;
  703. }
  704. button::after {
  705. border: none;
  706. }
  707. /* 销售信息 */
  708. .introduce-section {
  709. background: #fff;
  710. padding: 20upx 30upx;
  711. padding-bottom: 100upx;
  712. .guess-item {
  713. padding-bottom: 20upx;
  714. border-bottom: 1px solid #ccc;
  715. }
  716. .title {
  717. font-size: 28upx;
  718. color: $font-color-dark;
  719. font-weight:bold;
  720. height: 50upx;
  721. line-height: 50upx;
  722. flex:2.5;
  723. }
  724. .title-tip {
  725. flex:1;
  726. }
  727. .price-box {
  728. display: flex;
  729. align-items: baseline;
  730. height: 70upx;
  731. padding: 10upx 0;
  732. font-size: 26upx;
  733. color: $uni-color-primary;
  734. }
  735. .price {
  736. font-size: $font-lg + 2upx;
  737. }
  738. .m-price {
  739. margin: 0 12upx;
  740. color: $font-color-light;
  741. text-decoration: line-through;
  742. }
  743. .coupon-tip {
  744. align-items: center;
  745. padding: 4upx 10upx;
  746. background: $uni-color-primary;
  747. font-size: $font-sm;
  748. color: #fff;
  749. border-radius: 6upx;
  750. line-height: 1;
  751. transform: translateY(-4upx);
  752. }
  753. .bot-row {
  754. display: flex;
  755. align-items: center;
  756. height: 50upx;
  757. font-size: $font-sm;
  758. color: $font-color-light;
  759. view {
  760. flex: 1;
  761. }
  762. }
  763. }
  764. </style>