itemOrder.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. <template>
  2. <div class="app-main app-content">
  3. <div class="list-wrap">
  4. <block v-if="!$util.isEmpty(list.data)">
  5. <div class="list" v-for="(item, index) in list.data" :key="index">
  6. <div v-if="!$util.isEmpty(item.orderInfo)">
  7. <OrderItem :item="item.orderInfo" @orderEventBtn="orderEventBtn"></OrderItem>
  8. </div>
  9. </div>
  10. </block>
  11. <block v-else>
  12. <app-wrapper-empty
  13. title="暂无数据"
  14. :is-empty="$util.isEmpty(list.data)"
  15. />
  16. </block>
  17. </div>
  18. </div>
  19. </template>
  20. <script>
  21. const Month = new Date().getMonth() + 1 < 10 ? "0" + (new Date().getMonth() + 1) : new Date().getMonth() + 1;
  22. const time = `${new Date().getFullYear()}-${Month}-${new Date().getDate()}`;
  23. import AppWrapperEmpty from "@/components/app-wrapper-empty";
  24. import ModalModule from "@/components/plugin/modal";
  25. import { list } from "@/mixins";
  26. import { mapGetters } from "vuex";
  27. import { getOrderInfoList } from "@/api/order-item";
  28. import orderMixin from "@/mixins/order";
  29. import OrderItem from "../home/components/OrderItem";
  30. export default {
  31. name: "itemOrder",
  32. components: {
  33. AppWrapperEmpty,
  34. ModalModule,
  35. OrderItem,
  36. },
  37. mixins: [list,orderMixin],
  38. computed: { ...mapGetters(["getLoginInfo", "getDictionariesInfo"]) },
  39. data() {
  40. return {
  41. orderId:'',
  42. seekVal: "",
  43. isShow: false, //是否显选择时间段
  44. customizationTime: [], //时间段
  45. customizationTimeType: "", //时间段
  46. menuObj: "", //时间筛选列表
  47. tabIndex: 0,
  48. selectItemId: "",
  49. operateIndex: null,
  50. operateData: {},
  51. freeShipModal: false,
  52. classifyForm: {
  53. categoryId: "",
  54. usageId: "",
  55. },
  56. searchType:0,
  57. searchTypeName:'客户',
  58. };
  59. },
  60. onPullDownRefresh() {
  61. this.resetList();
  62. this.getOrderList().then((res) => {
  63. uni.stopPullDownRefresh();
  64. });
  65. },
  66. onReachBottom() {
  67. if (!this.list.finished) {
  68. this.getOrderList().then((res) => {
  69. uni.stopPullDownRefresh();
  70. });
  71. } else {
  72. uni.stopPullDownRefresh();
  73. }
  74. },
  75. mounted() {
  76. },
  77. onLoad(option) {
  78. let dateDefaultOption = [];
  79. let list = this.getDictionariesInfo.dateDefaultOption;
  80. if (!this.$util.isEmpty(list)){
  81. for (let i = 0; i < list.length; i++) {
  82. dateDefaultOption.push({ name: list[i].name, id: list[i].value });
  83. }
  84. }
  85. this.menuObj = {
  86. title: "时间",
  87. titleChild: "时间",
  88. list: dateDefaultOption,
  89. };
  90. let tabIndex = uni.getStorageSync("switchTabQuery") || null;
  91. if (tabIndex) {
  92. uni.removeStorageSync("switchTabQuery");
  93. this.tabIndex = parseInt(tabIndex.tabIndex);
  94. }
  95. this.getOrderList();
  96. },
  97. onShow() {
  98. },
  99. methods: {
  100. getOrderList(type, timeArr) {
  101. return getOrderInfoList({
  102. searchTime: type,
  103. startTime: timeArr ? timeArr[0] : "",
  104. endTime: timeArr ? timeArr[1] : "",
  105. productId:this.option.id,
  106. page: this.list.page,
  107. }).then((res) => {
  108. this.completes(res)
  109. });
  110. }
  111. },
  112. };
  113. </script>
  114. <style lang="scss" scoped>
  115. .admin-button-com {
  116. width: 140upx;
  117. height: 60upx;
  118. padding: 0;
  119. line-height: 60upx;
  120. text-align: center;
  121. font-size: 26upx;
  122. &.active {
  123. border: 1upx solid #ccc;
  124. }
  125. }
  126. page{
  127. width: 750upx;
  128. overflow: hidden;
  129. }
  130. .app-content {
  131. width: 100%;
  132. padding-bottom: 1upx;
  133. overflow: hidden;
  134. .select-dn_bx {
  135. padding-left: 18upx;
  136. }
  137. .app-tabs {
  138. position: fixed;
  139. width: 100%;
  140. z-index: 9;
  141. }
  142. .input-wrap_box {
  143. background-color: #fff;
  144. position: fixed;
  145. top: 0;
  146. z-index: 10;
  147. width: 100%;
  148. height: 100upx;
  149. display: flex;
  150. align-items: center;
  151. padding: 0 30upx;
  152. & > view:nth-child(2) {
  153. flex: 1;
  154. }
  155. }
  156. .list-wrap {
  157. padding-top: 20upx;
  158. .list {
  159. background-color: #fff;
  160. margin-bottom: 20upx;
  161. }
  162. }
  163. }
  164. .upload-confirm-wrap {
  165. max-height: 600upx;
  166. overflow-y: auto;
  167. .modal-tit {
  168. @include disFlex(center, center);
  169. font-size: 40upx;
  170. margin-top: 30upx;
  171. margin-bottom: 50upx;
  172. .iconfont {
  173. color: #09bb07;
  174. margin-right: 20upx;
  175. font-size: 50upx;
  176. }
  177. }
  178. .sel-wrap {
  179. color: $fontColor2;
  180. font-size: 32upx;
  181. .sel-tit {
  182. text-align: left;
  183. }
  184. .sel-btn {
  185. @include disFlex(center, flex-start);
  186. flex-wrap: wrap;
  187. padding: 10upx 0 40upx;
  188. .admin-button-com {
  189. margin-right: 20upx;
  190. margin-top: 20upx;
  191. padding-top: 16upx;
  192. padding-bottom: 16upx;
  193. border-radius: 4upx;
  194. }
  195. }
  196. }
  197. }
  198. </style>