noExpend.vue 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. <template>
  2. <view class="app-content">
  3. <view class="ex-page">
  4. <view class="top-bar">
  5. <view style="margin-left:50upx;display: flex;align-items: center;font-size:28upx;">
  6. 最近<button class="admin-button-com blue mini-btn" @click="changeDay" style="margin:0 3upx 0 3upx;">{{recentDay}}天</button>未下单
  7. </view>
  8. </view>
  9. <view class="main-view">
  10. <view class="space-view ex-table">
  11. <block>
  12. <t-table :headerBackgroundColor="'#F0F2F6'">
  13. <t-tr header><t-th>ID</t-th><t-th>客户名称</t-th><t-th>最后下单日</t-th></t-tr>
  14. <block v-if="list.data && !$util.isEmpty(list.data)">
  15. <view v-for="(item, index) in list.data" :key="index" @click.stop="pageTo({url:'/pagesClient/member/detail?id='+item.id})">
  16. <t-tr>
  17. <t-td><view style="color:#333333;font-size:28upx;">{{item.id}}</view></t-td>
  18. <t-td><view style="color:#333333;font-size:28upx;">{{item.name}}</view></t-td>
  19. <t-td>
  20. <view style="color:#333333;font-size:28upx;" v-if="item.recentExpend!='0000-00-00 00:00:00'">{{item.recentExpend?item.recentExpend.substr(0,10):''}}</view>
  21. <view style="color:#333333;font-size:28upx;" v-else>没有下单</view>
  22. </t-td>
  23. </t-tr>
  24. </view>
  25. </block>
  26. </t-table>
  27. </block>
  28. </view>
  29. </view>
  30. </view>
  31. <modal-module :show="recentDayShow" @click="confirmDayFn" :maskClosable="true" title="天数" padding="30rpx 30rpx" >
  32. <template v-slot:content>
  33. <div class="app-modal-input-wrap">
  34. <div class="inp-list-line">
  35. <div class="line-input">
  36. <input type="number" ref="input" style="width:61.8%;text-align:center;" @blur="recentBlur" :focus="recentFocus" v-model="recentUnDay" :adjust-position="false" class="inp-input" />
  37. </div>
  38. </div>
  39. </div>
  40. </template>
  41. </modal-module>
  42. </view>
  43. </template>
  44. <script>
  45. import AppWrapperEmpty from "@/components/app-wrapper-empty";
  46. import SelectList from "@/components/plugin/selectList";
  47. import { list } from "@/mixins";
  48. import ShopSelect from "@/components/module/shopSelect";
  49. import DateSelect from "@/components/module/dateSelect";
  50. import AppSearchModule from "@/components/module/app-search";
  51. import { getList } from "@/api/member";
  52. import {mapActions, mapGetters} from "vuex";
  53. import ModalModule from "@/components/plugin/modal"
  54. export default {
  55. components: {
  56. SelectList,
  57. AppWrapperEmpty,
  58. ShopSelect,
  59. AppSearchModule,
  60. DateSelect,
  61. ModalModule
  62. },
  63. mixins: [list],
  64. computed: {
  65. ...mapGetters(["getDictionariesInfo","getLoginInfo"])
  66. },
  67. data() {
  68. return {
  69. recentDay:7,
  70. recentUnDay:7,
  71. recentDayShow:false,
  72. recentFocus:false
  73. };
  74. },
  75. onLoad() {
  76. this.getCustomList()
  77. },
  78. onPullDownRefresh() {
  79. this.resetList();
  80. this.getCustomList()
  81. uni.stopPullDownRefresh()
  82. },
  83. onReachBottom() {
  84. if (!this.list.finished) {
  85. if (this.list.totalPage != null && this.list.page > this.list.totalPage) {
  86. this.list.finished = true
  87. return;
  88. }
  89. this.getCustomList().then((res) => {
  90. uni.stopPullDownRefresh();
  91. })
  92. } else {
  93. uni.stopPullDownRefresh();
  94. }
  95. },
  96. methods: {
  97. init() {
  98. },
  99. changeDay(){
  100. let that = this
  101. that.recentDayShow = true
  102. that.recentUnDay = ''
  103. setTimeout(x => {
  104. this.$nextTick(() => {
  105. that.recentFocus = true
  106. })
  107. }, 200)
  108. },
  109. recentBlur() {
  110. this.recentFocus = false
  111. },
  112. getCustomList() {
  113. return getList({type:4, page: this.list.page,recentDay:this.recentDay}).then((res) => {
  114. this.completes(res);
  115. if (this.$util.isEmpty(res.data)){
  116. return false;
  117. }
  118. })
  119. },
  120. confirmDayFn(val) {
  121. let that=this;
  122. if (val.index == 0) {
  123. that.recentDayShow = false
  124. that.recentFocus = false
  125. return
  126. }
  127. this.recentDay = this.recentUnDay
  128. this.resetList()
  129. this.getCustomList()
  130. this.recentDayShow = false
  131. this.recentFocus = false
  132. }
  133. }
  134. };
  135. </script>
  136. <style lang="scss" scoped>
  137. .ex-page {
  138. background: white;
  139. padding-top:20upx;
  140. height: 100%;
  141. display: flex;
  142. flex-direction: column;
  143. .top-bar {
  144. position: absolute;
  145. left: 0;
  146. top:30upx;
  147. display: flex;
  148. width: 100%;
  149. z-index: 20;
  150. .bar{
  151. width: 50%;
  152. height: 100%;
  153. text-align: center;
  154. &:nth-child(1){
  155. border-right: 1upx solid #eeeeec;
  156. }
  157. }
  158. }
  159. .main-view {
  160. margin-top:70upx;
  161. flex: 1;
  162. background-color: #f9fbfc;
  163. .space-view {
  164. background-color: #fff;
  165. .change-level{
  166. font-size:22upx;
  167. padding:10upx 15upx;
  168. }
  169. }
  170. .ex-info {
  171. padding: 30upx;
  172. .info-cell {
  173. display: flex;
  174. align-items: center;
  175. font-size: 28upx;
  176. &:not(:first-child) {
  177. margin-top: 20upx;
  178. }
  179. .cell-label {
  180. width: 110upx;
  181. color: #666666;
  182. }
  183. .cell-value {
  184. margin-left: 40upx;
  185. color: #333;
  186. &.warning {
  187. color: #ffaf1d;
  188. }
  189. &.success {
  190. color: #27c325;
  191. }
  192. }
  193. }
  194. }
  195. .ex-table {
  196. ::v-deep.icon-info {
  197. color: #333333;
  198. }
  199. }
  200. }
  201. .bar-view {
  202. display: flex;
  203. justify-content: space-between;
  204. align-items: center;
  205. padding: 0 30upx;
  206. width: 100%;
  207. height: 100upx;
  208. box-shadow: 0upx -1upx 6upx 0upx rgba(4, 0, 0, 0.06);
  209. .info-view {
  210. font-size: 26upx;
  211. }
  212. .btn-view {
  213. display: flex;
  214. .admin-button-com {
  215. margin: 0 10upx;
  216. }
  217. }
  218. }
  219. }
  220. </style>