preReceivedDetails.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440
  1. <template>
  2. <view class="page">
  3. <public-module></public-module>
  4. <service-widget @btnClick="btn_click"></service-widget>
  5. <view class="flexd">
  6. <view class="headerFilter dis a-c j-s">
  7. <view class="drop dis a-c j-s" @tap="searchPopup">
  8. <image src="/static/image/addStaff/screen.png" mode="" style="width: 18px;height: 18px;"></image>
  9. <text>全部筛选</text>
  10. <u-icon name="arrow-down-fill" color="#9A9A9A" size="16"></u-icon>
  11. </view>
  12. <text>{{feeView?'掌柜科技币:':'预收:¥'}}{{sumAmountYS}}</text>
  13. </view>
  14. <view :class="['dropdown-content', { 'show': showDropdown }]" @tap="searchPopup">
  15. <view :class="['dropdown-content1','dis','f-c','j-s', { 'show1': showDropdown }]" @tap.stop.prevent>
  16. <view style="padding: 0 16px; box-sizing: border-box;">
  17. <view class="term">
  18. <text>业务板块</text>
  19. <view class="dis a-c f-wrap j-start" style="margin-top: 5px;">
  20. <view class="status-data"
  21. :class="item.dictValue==pageRequest.businessSegmentsType? 'active':''"
  22. v-for="(item,index) in businessSegmentsTypeList"
  23. @tap.stop.prevent="statusclick('businessSegmentsType',item.dictValue)" :key="index">
  24. {{item.dictTag}}
  25. </view>
  26. </view>
  27. </view>
  28. <view class="term">
  29. <text>收入类型</text>
  30. <view class="dis a-c f-wrap j-start" style="margin-top: 5px;">
  31. <view class="status-data"
  32. :class="item.dictValue==pageRequest.transactionType? 'active':''"
  33. v-for="(item,index) in transactionTypeList"
  34. @tap.stop.prevent="statusclick('transactionType',item.dictValue)" :key="index">
  35. {{item.dictTag}}
  36. </view>
  37. </view>
  38. </view>
  39. <view class="term">
  40. <text>筛选日期</text>
  41. <view class="dis a-c f-wrap j-start" style="margin-top: 5px;">
  42. <view class="status-data" :class="item.value==pageRequest.dateQueryType? 'active':''"
  43. v-for="(item,index) in dateList" @tap="dateclick(index)" :key="index">
  44. {{item.label}}
  45. </view>
  46. <view class="dis a-c">
  47. <view class="status-data" :class="startShow? 'active' :''" @tap="startShowmethod()">
  48. <text v-if="pageRequest.startDate!=''">{{pageRequest.startDate}}</text>
  49. <text v-else>{{transformTime()}}</text>
  50. </view>
  51. <text style="margin: 0 8px;font-size: 12px;">至</text>
  52. <view class="status-data" :class="endShow? 'active' :''" @tap="endShowmethod()">
  53. <text v-if="pageRequest.endDate!=''">{{pageRequest.endDate}}</text>
  54. <text v-else>{{transformTime()}}</text>
  55. </view>
  56. </view>
  57. </view>
  58. </view>
  59. </view>
  60. <view class="operateBtn dis ">
  61. <view class="cancel dis a-c j-c" @click="showDropdown=false">
  62. 取消
  63. </view>
  64. <view class="confirm dis a-c j-c" @click="querysearch">
  65. 确定
  66. </view>
  67. </view>
  68. </view>
  69. </view>
  70. </view>
  71. <view class="" style="padding-top: 52px;">
  72. <view class="yshoudata" v-for="(item,index) in dataList" :key="index" @click="details(item)">
  73. <view class=" dis f-c content">
  74. <view class="dis a-c j-s">
  75. <view class="dis a-c" v-if="item.transactionType==1">
  76. <image src="/static/image/wallet/shouxu.png" mode="">
  77. </image>
  78. <text style="margin-left: 5px;font-size: 14px;color: #333;">车险</text>
  79. </view>
  80. <view class="dis a-c" v-if="item.transactionType==2">
  81. <image src="/static/image/wallet/tuiguang.png" mode="">
  82. </image>
  83. <text style="margin-left: 5px;font-size: 14px;color: #333;">推广</text>
  84. </view>
  85. <text
  86. style="font-size: 14px;color: #333;font-weight: bold;">{{feeView?'':'¥'}}{{item.amount}}</text>
  87. </view>
  88. <text>订单号:{{item.subOrderNo}}</text>
  89. <view class="dis a-c j-s">
  90. <text>{{item.signingTime}}</text>
  91. <text>车牌号:{{item.licenseNo}}</text>
  92. </view>
  93. </view>
  94. </view>
  95. </view>
  96. <!-- 回到顶部 -->
  97. <u-picker v-model="startShow" mode="time" :params="params" @confirm="startconfirm"></u-picker>
  98. <u-picker v-model="endShow" mode="time" :params="params" @confirm="endconfirm"></u-picker>
  99. </view>
  100. </template>
  101. <script>
  102. import {
  103. mapState
  104. } from "vuex"
  105. export default {
  106. data() {
  107. return {
  108. params: {
  109. year: true, //年
  110. month: true, //月
  111. day: true, //日
  112. hour: false,
  113. minute: false,
  114. second: false,
  115. },
  116. sumAmountYS: 0,
  117. startShow: false,
  118. endShow: false,
  119. pageRequest: {
  120. businessSegmentsType: 1, //业务板块
  121. dateQueryType: 0, //日期类型
  122. transactionType: 1, //收入类型
  123. userId: "",
  124. endDate: "",
  125. startDate: "",
  126. pageNum: 1,
  127. pageSize: 20,
  128. },
  129. showDropdown: false,
  130. businessSegmentsTypeList: [],
  131. transactionTypeList: [],
  132. yushouList: [{
  133. label: '车险',
  134. value: 1,
  135. src: "/static/image/wallet/shouxu.png"
  136. },
  137. {
  138. label: '推广费',
  139. value: 2,
  140. src: "/static/image/wallet/tuiguang.png"
  141. },
  142. ],
  143. //日期筛选list
  144. dateList: [{
  145. label: '全部',
  146. value: 0,
  147. },
  148. {
  149. label: '一周内',
  150. value: 1,
  151. },
  152. {
  153. label: '一个月内',
  154. value: 2,
  155. },
  156. {
  157. label: '三个月内',
  158. value: 3,
  159. },
  160. {
  161. label: '六个月内',
  162. value: 4,
  163. },
  164. ],
  165. dataList: [],
  166. feeView: null,
  167. }
  168. },
  169. computed: {
  170. ...mapState(['userInfo'])
  171. },
  172. onShow() {
  173. },
  174. onLoad() {
  175. this.pageRequest.userId = this.userInfo.sysUser.id;
  176. this.getDictionary('businessSegmentsType'); //业务板块
  177. this.getDictionary('transactionType'); //收入类型
  178. this.queryList();
  179. },
  180. methods: {
  181. btn_click() {
  182. uni.navigateTo({
  183. url: '/pages/chat/chat'
  184. })
  185. },
  186. startShowmethod() {
  187. this.startShow = true;
  188. },
  189. startconfirm(e) {
  190. this.pageRequest.startDate = e.year + '-' + e.month + '-' + e.day;
  191. },
  192. endShowmethod() {
  193. this.endShow = true;
  194. },
  195. endconfirm(e) {
  196. this.pageRequest.endDate = e.year + '-' + e.month + '-' + e.day;
  197. },
  198. //状态筛选
  199. statusclick(filed, e) {
  200. this.pageRequest[filed] = e;
  201. },
  202. //查询事件
  203. querysearch() {
  204. this.queryList();
  205. this.showDropdown = false;
  206. },
  207. async getDictionary(type) {
  208. let res = await this.$http.get('/sysDict/dictDetails/' + type);
  209. if (res.code == '200') {
  210. this[type + 'List'] = res.data.ddList;
  211. }
  212. },
  213. details(item) {
  214. switch (item.transactionType) {
  215. case '1':
  216. this.navigate({
  217. url: "/pages/wallet/billInfo1?companyId=" + item.subOrderNo,
  218. },
  219. "navigateTo", true);
  220. break;
  221. case '2':
  222. this.navigate({
  223. url: "/pages/wallet/billInfo?type=" + item.transactionType + '&id=' + item.id +
  224. '&subOrderNo=' + item.subOrderNo + '&amount=' + item.amount,
  225. },
  226. "navigateTo", true);
  227. break;
  228. default:
  229. }
  230. },
  231. async queryList() {
  232. let res = await this.$http.post('/sysUserAccount/findMyCollectInAdvanceByUserId', this.pageRequest);
  233. if (res.code == '200') {
  234. this.dataList = res.data.data.content;
  235. this.sumAmountYS = res.data.sumAmountYS;
  236. this.feeView = res.data.feeView;
  237. }
  238. },
  239. searchPopup() {
  240. this.showDropdown = !this.showDropdown;
  241. },
  242. //日期筛选
  243. dateclick(e) {
  244. this.pageRequest.dateQueryType = e;
  245. },
  246. //当前时间
  247. transformTime(day) {
  248. var date = new Date();
  249. date.setFullYear(date.getFullYear());
  250. date.setTime(date.getTime());
  251. var strYear = date.getFullYear();
  252. var strDay = day ? date.getDate() - day : date.getDate();
  253. var strMonth = date.getMonth() + 1;
  254. if (strMonth < 10) {
  255. strMonth = "0" + strMonth;
  256. }
  257. if (strDay < 10) {
  258. strDay = "0" + strDay;
  259. }
  260. var datastr = strYear + "-" + strMonth + "-" + strDay;
  261. return datastr;
  262. },
  263. transformTime1(month) {
  264. var date = new Date();
  265. date.setFullYear(date.getFullYear());
  266. date.setTime(date.getTime());
  267. var strYear = date.getFullYear();
  268. var strDay = date.getDate();
  269. var strMonth = month ? (date.getMonth() + 1) - month : date.getMonth() + 1;
  270. if (strMonth < 10) {
  271. strMonth = "0" + strMonth;
  272. }
  273. if (strDay < 10) {
  274. strDay = "0" + strDay;
  275. }
  276. var datastr = strYear + "-" + strMonth + "-" + strDay;
  277. return datastr;
  278. },
  279. }
  280. }
  281. </script>
  282. <style lang="scss" scoped>
  283. .dropdown-content {
  284. background-color: rgba(0, 0, 0, 0.6);
  285. height: 0px;
  286. opacity: 0;
  287. transition: opacity 0.3s ease;
  288. .title {
  289. font-size: 14px;
  290. color: #232832;
  291. font-weight: bold;
  292. border-bottom: 1px solid #E1E1E1;
  293. }
  294. .term {
  295. padding-top: 10px;
  296. >text {
  297. color: #232832;
  298. font-weight: bold;
  299. font-size: 13px;
  300. }
  301. }
  302. .operateBtn {
  303. font-weight: bold;
  304. font-size: 16px;
  305. .cancel {
  306. width: 50%;
  307. height: 46px;
  308. color: #0052FF;
  309. background-color: #EAEAEA;
  310. }
  311. .confirm {
  312. width: 50%;
  313. height: 46px;
  314. color: #fff;
  315. background-color: #0052FF;
  316. }
  317. }
  318. }
  319. .dropdown-content1 {
  320. background-color: #fff;
  321. height: 0px;
  322. overflow: hidden;
  323. transition: height 0.4s ease;
  324. }
  325. .show {
  326. height: 100vh;
  327. opacity: 1;
  328. /* 下拉菜单内容的最大高度 */
  329. }
  330. .show1 {
  331. height: 350px;
  332. /* 下拉菜单遮罩最大高度 */
  333. }
  334. .status-data {
  335. padding: 4px 10px;
  336. box-sizing: border-box;
  337. margin: 0 4px 4px 0;
  338. font-size: 12px;
  339. border: 1px solid #eee;
  340. cursor: pointer;
  341. }
  342. .active {
  343. position: relative;
  344. background: rgba(0, 82, 255, 0.1);
  345. color: #0052FF;
  346. border: 1px solid #0052FF;
  347. font-weight: 700;
  348. }
  349. .active::before {
  350. content: "";
  351. position: absolute;
  352. top: 0;
  353. left: 0;
  354. width: 10px;
  355. height: 10px;
  356. background-image: url("/static/image/car-insure/before.png");
  357. background-size: cover;
  358. }
  359. .page {
  360. background: #F8FAFE;
  361. }
  362. .flexd {
  363. position: fixed;
  364. left: 0;
  365. right: 0;
  366. z-index: 9999;
  367. }
  368. .yshoudata {
  369. padding: 8px 16px;
  370. background-color: #fff;
  371. .content {
  372. border-bottom: 1px solid #CFCFCF;
  373. padding: 8px 0;
  374. >text:nth-child(2) {
  375. font-size: 13px;
  376. color: #333;
  377. margin: 4px 0;
  378. }
  379. >view:nth-child(3) {
  380. color: rgba(51, 51, 51, 0.8);
  381. font-size: 12px;
  382. }
  383. }
  384. image {
  385. width: 20px;
  386. height: 20px;
  387. }
  388. }
  389. .headerFilter {
  390. padding: 8px 16px;
  391. background: #F8FAFE;
  392. z-index: 99;
  393. .drop {
  394. width: 106px;
  395. height: 100%;
  396. background: #EAEEF5;
  397. border-radius: 6px;
  398. padding: 5px;
  399. text {
  400. color: rgba(51, 51, 51, 0.8);
  401. font-size: 14px;
  402. }
  403. }
  404. >text {
  405. color: rgba(51, 51, 51, 0.8);
  406. font-size: 14px;
  407. }
  408. }
  409. </style>