preReceivedDetails.vue 10 KB

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