noExpend.vue 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  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 { list } from "@/mixins";
  47. import ShopSelect from "@/components/module/shopSelect";
  48. import DateSelect from "@/components/module/dateSelect";
  49. import AppSearchModule from "@/components/module/app-search";
  50. import { getList } from "@/api/member";
  51. import {mapActions, mapGetters} from "vuex";
  52. import ModalModule from "@/components/plugin/modal"
  53. export default {
  54. components: {
  55. AppWrapperEmpty,
  56. ShopSelect,
  57. AppSearchModule,
  58. DateSelect,
  59. ModalModule
  60. },
  61. mixins: [list],
  62. computed: {
  63. ...mapGetters(["getDictionariesInfo","getLoginInfo"])
  64. },
  65. data() {
  66. return {
  67. recentDay:7,
  68. recentUnDay:7,
  69. recentDayShow:false,
  70. recentFocus:false
  71. };
  72. },
  73. onLoad() {
  74. this.getCustomList()
  75. },
  76. onPullDownRefresh() {
  77. this.resetList();
  78. this.getCustomList()
  79. uni.stopPullDownRefresh()
  80. },
  81. onReachBottom() {
  82. if (!this.list.finished) {
  83. if (this.list.totalPage != null && this.list.page > this.list.totalPage) {
  84. this.list.finished = true
  85. return;
  86. }
  87. this.getCustomList().then((res) => {
  88. uni.stopPullDownRefresh();
  89. })
  90. } else {
  91. uni.stopPullDownRefresh();
  92. }
  93. },
  94. methods: {
  95. init() {
  96. },
  97. changeDay(){
  98. let that = this
  99. that.recentDayShow = true
  100. that.recentUnDay = ''
  101. setTimeout(x => {
  102. this.$nextTick(() => {
  103. that.recentFocus = true
  104. })
  105. }, 200)
  106. },
  107. recentBlur() {
  108. this.recentFocus = false
  109. },
  110. getCustomList() {
  111. return getList({type:4, page: this.list.page,recentDay:this.recentDay}).then((res) => {
  112. this.completes(res);
  113. if (this.$util.isEmpty(res.data)){
  114. return false;
  115. }
  116. })
  117. },
  118. confirmDayFn(val) {
  119. let that=this;
  120. if (val.index == 0) {
  121. that.recentDayShow = false
  122. that.recentFocus = false
  123. return
  124. }
  125. this.recentDay = this.recentUnDay
  126. this.resetList()
  127. this.getCustomList()
  128. this.recentDayShow = false
  129. this.recentFocus = false
  130. }
  131. }
  132. };
  133. </script>
  134. <style lang="scss" scoped>
  135. .ex-page {
  136. background: white;
  137. padding-top:20upx;
  138. height: 100%;
  139. display: flex;
  140. flex-direction: column;
  141. .top-bar {
  142. position: absolute;
  143. left: 0;
  144. top:30upx;
  145. display: flex;
  146. width: 100%;
  147. z-index: 20;
  148. .bar{
  149. width: 50%;
  150. height: 100%;
  151. text-align: center;
  152. &:nth-child(1){
  153. border-right: 1upx solid #eeeeec;
  154. }
  155. }
  156. }
  157. .main-view {
  158. margin-top:70upx;
  159. flex: 1;
  160. background-color: #f9fbfc;
  161. .space-view {
  162. background-color: #fff;
  163. .change-level{
  164. font-size:22upx;
  165. padding:10upx 15upx;
  166. }
  167. }
  168. .ex-info {
  169. padding: 30upx;
  170. .info-cell {
  171. display: flex;
  172. align-items: center;
  173. font-size: 28upx;
  174. &:not(:first-child) {
  175. margin-top: 20upx;
  176. }
  177. .cell-label {
  178. width: 110upx;
  179. color: #666666;
  180. }
  181. .cell-value {
  182. margin-left: 40upx;
  183. color: #333;
  184. &.warning {
  185. color: #ffaf1d;
  186. }
  187. &.success {
  188. color: #27c325;
  189. }
  190. }
  191. }
  192. }
  193. .ex-table {
  194. ::v-deep.icon-info {
  195. color: #333333;
  196. }
  197. }
  198. }
  199. .bar-view {
  200. display: flex;
  201. justify-content: space-between;
  202. align-items: center;
  203. padding: 0 30upx;
  204. width: 100%;
  205. height: 100upx;
  206. box-shadow: 0upx -1upx 6upx 0upx rgba(4, 0, 0, 0.06);
  207. .info-view {
  208. font-size: 26upx;
  209. }
  210. .btn-view {
  211. display: flex;
  212. .admin-button-com {
  213. margin: 0 10upx;
  214. }
  215. }
  216. }
  217. }
  218. </style>