preReceivedDetails.vue 10 KB

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