queryWriteOff.vue 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <template>
  2. <view style="background-color: white;">
  3. <view class="img">
  4. <image slot="icon" src="@/static/order/搜索@2x.png" style="width: 250rpx; height: 200rpx" />
  5. </view>
  6. <view class="queryWriteOff">
  7. <input type="text" v-model="value" placeholder="请输入订单号查询" />
  8. <button @click='verification()'>查询核销</button>
  9. </view>
  10. </view>
  11. </template>
  12. <script>
  13. import {
  14. getOrderListApi,
  15. getVerificationApi
  16. } from '@/api/merchant/order'
  17. // import {
  18. // mapGetters
  19. // } from 'vuex';
  20. export default {
  21. data() {
  22. return {
  23. value: '',
  24. params: {
  25. pageNum: 1,
  26. pageSize: 10,
  27. }
  28. }
  29. },
  30. // computed: {
  31. // ...mapGetters(['userId']),
  32. // },
  33. methods: {
  34. verification() {
  35. this.getOrderList()
  36. },
  37. async getOrderList() {
  38. console.log(this.value,"输入的")
  39. let result = Object.assign({}, {
  40. paging: `${this.params.pageNum},${this.params.pageSize}`,
  41. status: 0,
  42. orderSn: this.value
  43. }, );
  44. let res = await getOrderListApi({
  45. ...result
  46. });
  47. if (res.code === 'OK' && res.data.records.lentgh > 0) {
  48. uni.navigateTo({
  49. url: `/pageMerchant/components/toBeVerified?list=${JSON.stringify(res.data.records)}`
  50. })
  51. } else {
  52. uni.showToast({
  53. title: "没有该订单信息",
  54. dration: 2000,
  55. });
  56. }
  57. },
  58. }
  59. }
  60. </script>
  61. <style lang="scss" scoped>
  62. .img {
  63. padding-top: 100rpx;
  64. image {
  65. display: block;
  66. margin: 0 auto;
  67. }
  68. }
  69. .queryWriteOff {
  70. margin-top: 50rpx;
  71. padding-left: 100rpx;
  72. padding-right: 100rpx;
  73. input {
  74. border: 1px solid blue;
  75. font-size: 30rpx;
  76. /* 设置输入框文本大小 */
  77. height: 70rpx;
  78. /* 设置输入框高度 */
  79. }
  80. button {
  81. margin-top: 20rpx;
  82. background-color: blue;
  83. color: aliceblue;
  84. }
  85. }
  86. </style>