contract_detail.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870
  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. mask:true
  161. })
  162. that.$api.request('contract', 'getContractDetail', {
  163. contractNo: options.contractNo
  164. }, failres => {
  165. that.$api.msg(failres.errmsg)
  166. uni.hideLoading()
  167. }).then(res => {
  168. that.contract = res.data
  169. uni.hideLoading()
  170. })
  171. },
  172. computed: {
  173. ...mapState(['hasLogin','userInfo'])
  174. },
  175. methods: {
  176. }
  177. }
  178. </script>
  179. <style lang='scss' scoped>
  180. .container {
  181. background: $page-color-base;
  182. padding-bottom: 160upx;
  183. }
  184. .icon-you {
  185. font-size: $font-base + 2upx;
  186. color: #888;
  187. }
  188. .carousel {
  189. height: 722upx;
  190. position: relative;
  191. swiper {
  192. height: 100%;
  193. }
  194. .image-wrapper {
  195. width: 100%;
  196. height: 100%;
  197. }
  198. .swiper-item {
  199. display: flex;
  200. justify-content: center;
  201. align-content: center;
  202. height: 750upx;
  203. overflow: hidden;
  204. image {
  205. width: 100%;
  206. height: 100%;
  207. }
  208. }
  209. }
  210. /* 分享 */
  211. .share-section {
  212. display: flex;
  213. align-items: center;
  214. color: $font-color-base;
  215. background: linear-gradient(left, #fdf5f6, #fbebf6);
  216. padding: 12upx 30upx;
  217. .share-icon {
  218. display: flex;
  219. align-items: center;
  220. width: 70upx;
  221. height: 30upx;
  222. line-height: 1;
  223. border: 1px solid $uni-color-primary;
  224. border-radius: 4upx;
  225. position: relative;
  226. overflow: hidden;
  227. font-size: 22upx;
  228. color: $uni-color-primary;
  229. &:after {
  230. content: '';
  231. width: 50upx;
  232. height: 50upx;
  233. border-radius: 50%;
  234. left: -20upx;
  235. top: -12upx;
  236. position: absolute;
  237. background: $uni-color-primary;
  238. }
  239. }
  240. .icon-xingxing {
  241. position: relative;
  242. z-index: 1;
  243. font-size: 24upx;
  244. margin-left: 2upx;
  245. margin-right: 10upx;
  246. color: #fff;
  247. line-height: 1;
  248. }
  249. .tit {
  250. font-size: $font-base;
  251. margin-left: 10upx;
  252. }
  253. .icon-bangzhu1 {
  254. padding: 10upx;
  255. font-size: 30upx;
  256. line-height: 1;
  257. }
  258. .share-btn {
  259. flex: 1;
  260. text-align: right;
  261. font-size: $font-sm;
  262. color: $uni-color-primary;
  263. }
  264. .icon-you {
  265. font-size: $font-sm;
  266. margin-left: 4upx;
  267. color: $uni-color-primary;
  268. }
  269. }
  270. .c-list {
  271. font-size: $font-sm + 2upx;
  272. color: $font-color-base;
  273. background: #fff;
  274. .c-row {
  275. display: flex;
  276. align-items: center;
  277. padding: 20upx 30upx;
  278. position: relative;
  279. }
  280. .tit {
  281. width: 220upx;
  282. }
  283. .con {
  284. flex: 1;
  285. color: $font-color-dark;
  286. .selected-text {
  287. margin-right: 10upx;
  288. }
  289. }
  290. .bz-list {
  291. height: 40upx;
  292. font-size: $font-sm+2upx;
  293. color: $font-color-dark;
  294. text {
  295. display: inline-block;
  296. margin-right: 30upx;
  297. }
  298. }
  299. .con-list {
  300. flex: 1;
  301. display: flex;
  302. flex-direction: column;
  303. color: $font-color-dark;
  304. line-height: 40upx;
  305. text-align: right;
  306. padding-right: 20upx;
  307. }
  308. .red {
  309. color: $uni-color-primary;
  310. }
  311. }
  312. /* 评价 */
  313. .eva-section {
  314. display: flex;
  315. flex-direction: column;
  316. padding: 20upx 30upx;
  317. background: #fff;
  318. margin-top: 16upx;
  319. .e-header {
  320. display: flex;
  321. align-items: center;
  322. height: 70upx;
  323. font-size: $font-sm + 2upx;
  324. color: $font-color-light;
  325. .tit {
  326. font-size: $font-base + 2upx;
  327. color: $font-color-dark;
  328. margin-right: 4upx;
  329. }
  330. .tip {
  331. flex: 1;
  332. text-align: right;
  333. }
  334. .icon-you {
  335. margin-left: 10upx;
  336. }
  337. }
  338. }
  339. .eva-box {
  340. display: flex;
  341. padding: 20upx 0;
  342. .portrait {
  343. flex-shrink: 0;
  344. width: 80upx;
  345. height: 80upx;
  346. border-radius: 100px;
  347. }
  348. .right {
  349. flex: 1;
  350. display: flex;
  351. flex-direction: column;
  352. font-size: $font-base;
  353. color: $font-color-base;
  354. padding-left: 26upx;
  355. .con {
  356. font-size: $font-base;
  357. color: $font-color-dark;
  358. padding: 20upx 0;
  359. }
  360. .bot {
  361. display: flex;
  362. justify-content: space-between;
  363. font-size: $font-sm;
  364. color: $font-color-light;
  365. }
  366. }
  367. }
  368. /* 详情 */
  369. .detail-desc {
  370. background: #fff;
  371. margin-top: 16upx;
  372. width: 750upx;
  373. .d-header {
  374. display: flex;
  375. justify-content: center;
  376. align-items: center;
  377. height: 80upx;
  378. font-size: $font-base + 2upx;
  379. color: $font-color-dark;
  380. position: relative;
  381. text {
  382. padding: 0 20upx;
  383. background: #fff;
  384. position: relative;
  385. z-index: 1;
  386. }
  387. &:after {
  388. position: absolute;
  389. left: 50%;
  390. top: 50%;
  391. transform: translateX(-50%);
  392. width: 300upx;
  393. height: 0;
  394. content: '';
  395. border-bottom: 1px solid #ccc;
  396. }
  397. }
  398. }
  399. /* 规格选择弹窗 */
  400. .attr-content {
  401. padding: 10upx 30upx;
  402. .a-t {
  403. display: flex;
  404. image {
  405. width: 170upx;
  406. height: 170upx;
  407. flex-shrink: 0;
  408. margin-top: -40upx;
  409. border-radius: 8upx;
  410. ;
  411. }
  412. .right {
  413. display: flex;
  414. flex-direction: column;
  415. padding-left: 24upx;
  416. font-size: $font-sm + 2upx;
  417. color: $font-color-base;
  418. line-height: 42upx;
  419. .price {
  420. font-size: $font-lg;
  421. color: $uni-color-primary;
  422. margin-bottom: 10upx;
  423. }
  424. .selected-text {
  425. margin-right: 10upx;
  426. }
  427. }
  428. }
  429. .attr-list {
  430. display: flex;
  431. flex-direction: column;
  432. font-size: $font-base + 2upx;
  433. color: $font-color-base;
  434. padding-top: 30upx;
  435. padding-left: 10upx;
  436. }
  437. .item-list {
  438. padding: 30upx 0 0;
  439. display: flex;
  440. flex-wrap: wrap;
  441. text {
  442. display: flex;
  443. align-items: center;
  444. justify-content: center;
  445. background: #eee;
  446. margin-right: 20upx;
  447. margin-bottom: 20upx;
  448. border-radius: 100upx;
  449. min-width: 60upx;
  450. height: 60upx;
  451. padding: 0 20upx;
  452. font-size: $font-base;
  453. color: $font-color-dark;
  454. }
  455. .selected {
  456. background: #fbebee;
  457. color: $uni-color-primary;
  458. }
  459. }
  460. }
  461. /* 弹出层 */
  462. .popup {
  463. position: fixed;
  464. left: 0;
  465. top: 0;
  466. right: 0;
  467. bottom: 0;
  468. z-index: 99;
  469. &.show {
  470. display: block;
  471. .mask {
  472. animation: showPopup 0.2s linear both;
  473. }
  474. .layer {
  475. animation: showLayer 0.2s linear both;
  476. }
  477. }
  478. &.hide {
  479. .mask {
  480. animation: hidePopup 0.2s linear both;
  481. }
  482. .layer {
  483. animation: hideLayer 0.2s linear both;
  484. }
  485. }
  486. &.none {
  487. display: none;
  488. }
  489. .mask {
  490. position: fixed;
  491. top: 0;
  492. width: 100%;
  493. height: 100%;
  494. z-index: 1;
  495. background-color: rgba(0, 0, 0, 0.4);
  496. }
  497. .layer {
  498. position: fixed;
  499. z-index: 99;
  500. bottom: 0;
  501. width: 100%;
  502. min-height: 40vh;
  503. border-radius: 10upx 10upx 0 0;
  504. background-color: #fff;
  505. .btn {
  506. height: 66upx;
  507. line-height: 66upx;
  508. border-radius: 100upx;
  509. background: $uni-color-primary;
  510. font-size: $font-base + 2upx;
  511. color: #fff;
  512. margin: 30upx auto 20upx;
  513. }
  514. }
  515. @keyframes showPopup {
  516. 0% {
  517. opacity: 0;
  518. }
  519. 100% {
  520. opacity: 1;
  521. }
  522. }
  523. @keyframes hidePopup {
  524. 0% {
  525. opacity: 1;
  526. }
  527. 100% {
  528. opacity: 0;
  529. }
  530. }
  531. @keyframes showLayer {
  532. 0% {
  533. transform: translateY(120%);
  534. }
  535. 100% {
  536. transform: translateY(0%);
  537. }
  538. }
  539. @keyframes hideLayer {
  540. 0% {
  541. transform: translateY(0);
  542. }
  543. 100% {
  544. transform: translateY(120%);
  545. }
  546. }
  547. }
  548. /* 底部操作菜单 */
  549. .page-bottom {
  550. position: fixed;
  551. left: 30upx;
  552. bottom: 30upx;
  553. z-index: 95;
  554. display: flex;
  555. justify-content: center;
  556. align-items: center;
  557. width: 690upx;
  558. height: 100upx;
  559. background: rgba(255, 255, 255, .9);
  560. box-shadow: 0 0 20upx 0 rgba(0, 0, 0, .5);
  561. border-radius: 16upx;
  562. .p-b-btn {
  563. display: flex;
  564. flex-direction: column;
  565. align-items: center;
  566. justify-content: center;
  567. font-size: $font-sm;
  568. color: $font-color-base;
  569. width: 96upx;
  570. height: 80upx;
  571. .yticon {
  572. font-size: 40upx;
  573. line-height: 48upx;
  574. color: $font-color-light;
  575. }
  576. &.active,
  577. &.active .yticon {
  578. color: $uni-color-primary;
  579. }
  580. .icon-fenxiang2 {
  581. font-size: 42upx;
  582. transform: translateY(-2upx);
  583. }
  584. .icon-shoucang {
  585. font-size: 46upx;
  586. }
  587. }
  588. }
  589. /* 优惠券面板 */
  590. .mask {
  591. display: flex;
  592. align-items: flex-end;
  593. position: fixed;
  594. left: 0;
  595. top: var(--window-top);
  596. bottom: 0;
  597. width: 100%;
  598. background: rgba(0, 0, 0, 0);
  599. z-index: 9995;
  600. transition: .3s;
  601. .mask-content {
  602. width: 100%;
  603. min-height: 30vh;
  604. max-height: 70vh;
  605. background: #f3f3f3;
  606. transform: translateY(100%);
  607. transition: .3s;
  608. overflow-y: scroll;
  609. }
  610. &.none {
  611. display: none;
  612. }
  613. &.show {
  614. background: rgba(0, 0, 0, .4);
  615. .mask-content {
  616. transform: translateY(0);
  617. }
  618. }
  619. }
  620. /* 优惠券列表 */
  621. .coupon-item {
  622. display: flex;
  623. flex-direction: column;
  624. margin: 20upx 24upx;
  625. background: #fff;
  626. .con {
  627. display: flex;
  628. align-items: center;
  629. position: relative;
  630. height: 120upx;
  631. padding: 0 30upx;
  632. &:after {
  633. position: absolute;
  634. left: 0;
  635. bottom: 0;
  636. content: '';
  637. width: 100%;
  638. height: 0;
  639. border-bottom: 1px dashed #f3f3f3;
  640. transform: scaleY(50%);
  641. }
  642. }
  643. .left {
  644. display: flex;
  645. flex-direction: column;
  646. justify-content: center;
  647. flex: 1;
  648. overflow: hidden;
  649. height: 100upx;
  650. }
  651. .title {
  652. font-size: 32upx;
  653. color: $font-color-dark;
  654. margin-bottom: 10upx;
  655. }
  656. .time {
  657. font-size: 24upx;
  658. color: $font-color-light;
  659. }
  660. .right {
  661. display: flex;
  662. flex-direction: column;
  663. justify-content: center;
  664. align-items: center;
  665. font-size: 26upx;
  666. color: $font-color-base;
  667. height: 100upx;
  668. }
  669. .price {
  670. font-size: 44upx;
  671. color: $base-color;
  672. &:before {
  673. content: '¥';
  674. font-size: 34upx;
  675. }
  676. }
  677. .tips {
  678. font-size: 24upx;
  679. color: $font-color-light;
  680. line-height: 60upx;
  681. padding-left: 30upx;
  682. }
  683. .circle {
  684. position: absolute;
  685. left: -6upx;
  686. bottom: -10upx;
  687. z-index: 10;
  688. width: 20upx;
  689. height: 20upx;
  690. background: #f3f3f3;
  691. border-radius: 100px;
  692. &.r {
  693. left: auto;
  694. right: -6upx;
  695. }
  696. }
  697. }
  698. .rich-img {
  699. width: 100%;
  700. height: auto;
  701. margin: 0;
  702. padding: 0;
  703. line-height: 0px;
  704. }
  705. button::after {
  706. border: none;
  707. }
  708. /* 销售信息 */
  709. .introduce-section {
  710. background: #fff;
  711. padding: 20upx 30upx;
  712. padding-bottom: 100upx;
  713. .guess-item {
  714. padding-bottom: 20upx;
  715. border-bottom: 1px solid #ccc;
  716. }
  717. .title {
  718. font-size: 28upx;
  719. color: $font-color-dark;
  720. font-weight:bold;
  721. height: 50upx;
  722. line-height: 50upx;
  723. flex:2.5;
  724. }
  725. .title-tip {
  726. flex:1;
  727. }
  728. .price-box {
  729. display: flex;
  730. align-items: baseline;
  731. height: 70upx;
  732. padding: 10upx 0;
  733. font-size: 26upx;
  734. color: $uni-color-primary;
  735. }
  736. .price {
  737. font-size: $font-lg + 2upx;
  738. }
  739. .m-price {
  740. margin: 0 12upx;
  741. color: $font-color-light;
  742. text-decoration: line-through;
  743. }
  744. .coupon-tip {
  745. align-items: center;
  746. padding: 4upx 10upx;
  747. background: $uni-color-primary;
  748. font-size: $font-sm;
  749. color: #fff;
  750. border-radius: 6upx;
  751. line-height: 1;
  752. transform: translateY(-4upx);
  753. }
  754. .bot-row {
  755. display: flex;
  756. align-items: center;
  757. height: 50upx;
  758. font-size: $font-sm;
  759. color: $font-color-light;
  760. view {
  761. flex: 1;
  762. }
  763. }
  764. }
  765. </style>