detail.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <template>
  2. <view>
  3. <view class="cmain">
  4. <view class="box order_detail" style="margin-top: 0px">
  5. <view class="item">
  6. <text class="label">收购状态</text>
  7. <text class="desc" v-if="item.isOrders == 0">
  8. <text class="icon">&#xe830;</text>
  9. <text>未接单</text>
  10. </text>
  11. <text class="desc" v-if="item.isOrders == 1">
  12. <text class="icon" style="color: #13ce66">&#xe830;</text>
  13. <text>已接单</text>
  14. </text>
  15. <text class="desc" v-if="item.isConfirm == 1">
  16. <text class="icon" style="color: #13ce66">&#xe830;</text>
  17. <text>已确认</text>
  18. </text>
  19. </view>
  20. </view>
  21. <view class="box order_detail">
  22. <view class="item">
  23. <text class="label">收购商品</text>
  24. <text class="desc omit">{{ item.goodsName }}</text>
  25. </view>
  26. <view class="item">
  27. <text class="label">数量</text>
  28. <text class="desc">{{ item.goodsQuantity }}</text>
  29. </view>
  30. <view class="item">
  31. <text class="label">发布时间</text>
  32. <text class="desc">{{ item.goodsDemandTime }}</text>
  33. </view>
  34. <view class="item">
  35. <text class="label">接单组名</text>
  36. <text class="desc">{{ item.groupName }}</text>
  37. </view>
  38. <view class="item">
  39. <text class="label">接单组长</text>
  40. <text class="desc">{{ item.createName }}</text>
  41. </view>
  42. <view class="item">
  43. <text class="label">组长备注</text>
  44. <text class="desc">{{ item.remark }}</text>
  45. </view>
  46. <view class="item">
  47. <text class="label">出价金额</text>
  48. <text class="desc">{{ item.quotation }}</text>
  49. </view>
  50. <view class="item">
  51. <text class="label">报价时间</text>
  52. <text class="desc">{{ item.createTime }}</text>
  53. </view>
  54. </view>
  55. <button class="btn" @click.stop="confirm()" v-if="item.isConfirm != 1">同意接单并支付</button>
  56. <button class="btn" style="background-color: #F44336;" v-if="item.isConfirm != 1">拒绝接单</button>
  57. </view>
  58. </view>
  59. </template>
  60. <script>
  61. export default {
  62. data() {
  63. return {
  64. item: {}
  65. };
  66. },
  67. onLoad(e) {
  68. if (e.id) {
  69. this.http.request({
  70. url: '/level-two-server/app/TbGoodsDemand/goodsDemandDetail?id=' + e.id,
  71. success: res => {
  72. this.item = res.data.data;
  73. }
  74. });
  75. }
  76. },
  77. methods: {
  78. confirm() {
  79. this.http.request({
  80. url: '/level-two-server/app/TbOrders/add',
  81. data: this.item,
  82. success: res => {
  83. uni.showToast({ title: '操作成功' });
  84. // 收购商已确认
  85. this.item.isConfirm = 1
  86. }
  87. });
  88. }
  89. }
  90. };
  91. </script>
  92. <style lang="scss">
  93. page {
  94. background-color: $pg;
  95. }
  96. .btn{
  97. margin-top: 20px;
  98. width: 70%;
  99. }
  100. </style>