confirm.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <template>
  2. <view>
  3. <view class="cmain">
  4. <view class="box" style="padding: 12px; margin-top: 0px">
  5. <u-steps :current="0">
  6. <u-steps-item title="接单确认"></u-steps-item>
  7. <u-steps-item title="收购商确认"></u-steps-item>
  8. <u-steps-item title="完成交易"></u-steps-item>
  9. </u-steps>
  10. </view>
  11. <u-divider text="需求信息"></u-divider>
  12. <view class="box order_detail">
  13. <view class="item">
  14. <text class="label">收购商品</text>
  15. <text class="desc omit">{{ item.goodsName }}</text>
  16. </view>
  17. <view class="item">
  18. <text class="label">商品编号</text>
  19. <text class="desc">{{ item.goodsNo }}</text>
  20. </view>
  21. <view class="item">
  22. <text class="label">计价单位</text>
  23. <text class="desc">{{ item.goodsUnit }}</text>
  24. </view>
  25. <view class="item">
  26. <text class="label">商品数量</text>
  27. <text class="desc">{{ item.goodsQuantity }}</text>
  28. </view>
  29. <view class="item">
  30. <text class="label">发布时间</text>
  31. <text class="desc">{{ item.createTime }}</text>
  32. </view>
  33. <view class="item">
  34. <text class="label">订单状态</text>
  35. <text class="desc">待接单</text>
  36. </view>
  37. <view class="item">
  38. <text class="label">接单人</text>
  39. <text class="desc">{{ user.name }}</text>
  40. </view>
  41. <view class="item">
  42. <text class="label">出价金额(必填)</text>
  43. <text class="desc">
  44. <input type="number" v-model="order.price" placeholder="请输入(元)" />
  45. </text>
  46. </view>
  47. </view>
  48. </view>
  49. <view class="mfooter">
  50. <view class="flex">
  51. <view class="f">
  52. <button class="btn" @click="pay()">确认接单</button>
  53. </view>
  54. </view>
  55. </view>
  56. </view>
  57. </template>
  58. <script>
  59. export default {
  60. data() {
  61. return {
  62. user: this.getUser(),
  63. item: {},
  64. order: {}
  65. };
  66. },
  67. onLoad(e) {
  68. if (e.item) {
  69. this.item = JSON.parse(e.item);
  70. this.order.purchaserId = this.item.purchaserId;
  71. this.order.goodsDemandId = this.item.id;
  72. }
  73. },
  74. methods: {
  75. pay() {
  76. let rule = [{ name: 'price', checkType: 'notnull', errorMsg: '请输入报价' }];
  77. if (!this.verify.check(this.order, rule)) {
  78. uni.showModal({ content: this.verify.error, showCancel: false });
  79. return false;
  80. }
  81. uni.showModal({
  82. title: '提示',
  83. content: '我已核对接单信息无误',
  84. success: res => {
  85. if (res.confirm) {
  86. this.http.request({
  87. url: '/level-two-server/app/TbDemandQuotation/quotation',
  88. method: 'POST',
  89. data: this.order,
  90. success: res => {
  91. uni.navigateTo({ url: '/pages/market/two/leader/success' });
  92. }
  93. });
  94. }
  95. }
  96. });
  97. }
  98. }
  99. };
  100. </script>
  101. <style lang="scss">
  102. page {
  103. background-color: $pg;
  104. }
  105. </style>