preReceivedDetails.vue 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418
  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.subOrderNo)">
  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(id) {
  206. this.navigate({
  207. url: "/pages/wallet/billInfo1?companyId=" + id,
  208. },
  209. "navigateTo", true);
  210. },
  211. async queryList() {
  212. let res = await this.$http.post('/sysUserAccount/findMyCollectInAdvanceByUserId', this.pageRequest);
  213. if (res.code == '200') {
  214. this.dataList = res.data.data.content;
  215. this.sumAmountYS = res.data.sumAmountYS;
  216. }
  217. },
  218. searchPopup() {
  219. this.showDropdown = !this.showDropdown;
  220. },
  221. //日期筛选
  222. dateclick(e) {
  223. this.pageRequest.dateQueryType = e;
  224. },
  225. //当前时间
  226. transformTime(day) {
  227. var date = new Date();
  228. date.setFullYear(date.getFullYear());
  229. date.setTime(date.getTime());
  230. var strYear = date.getFullYear();
  231. var strDay = day ? date.getDate() - day : date.getDate();
  232. var strMonth = date.getMonth() + 1;
  233. if (strMonth < 10) {
  234. strMonth = "0" + strMonth;
  235. }
  236. if (strDay < 10) {
  237. strDay = "0" + strDay;
  238. }
  239. var datastr = strYear + "-" + strMonth + "-" + strDay;
  240. return datastr;
  241. },
  242. transformTime1(month) {
  243. var date = new Date();
  244. date.setFullYear(date.getFullYear());
  245. date.setTime(date.getTime());
  246. var strYear = date.getFullYear();
  247. var strDay = date.getDate();
  248. var strMonth = month ? (date.getMonth() + 1) - month : date.getMonth() + 1;
  249. if (strMonth < 10) {
  250. strMonth = "0" + strMonth;
  251. }
  252. if (strDay < 10) {
  253. strDay = "0" + strDay;
  254. }
  255. var datastr = strYear + "-" + strMonth + "-" + strDay;
  256. return datastr;
  257. },
  258. }
  259. }
  260. </script>
  261. <style lang="scss" scoped>
  262. .dropdown-content {
  263. background-color: rgba(0, 0, 0, 0.6);
  264. height: 0px;
  265. opacity: 0;
  266. transition: opacity 0.3s ease;
  267. .title {
  268. font-size: 14px;
  269. color: #232832;
  270. font-weight: bold;
  271. border-bottom: 1px solid #E1E1E1;
  272. }
  273. .term {
  274. padding-top: 10px;
  275. >text {
  276. color: #232832;
  277. font-weight: bold;
  278. font-size: 13px;
  279. }
  280. }
  281. .operateBtn {
  282. font-weight: bold;
  283. font-size: 16px;
  284. .cancel {
  285. width: 50%;
  286. height: 46px;
  287. color: #0052FF;
  288. background-color: #EAEAEA;
  289. }
  290. .confirm {
  291. width: 50%;
  292. height: 46px;
  293. color: #fff;
  294. background-color: #0052FF;
  295. }
  296. }
  297. }
  298. .dropdown-content1 {
  299. background-color: #fff;
  300. height: 0px;
  301. overflow: hidden;
  302. transition: height 0.4s ease;
  303. }
  304. .show {
  305. height: 100vh;
  306. opacity: 1;
  307. /* 下拉菜单内容的最大高度 */
  308. }
  309. .show1 {
  310. height: 350px;
  311. /* 下拉菜单遮罩最大高度 */
  312. }
  313. .status-data {
  314. padding: 4px 10px;
  315. box-sizing: border-box;
  316. margin: 0 4px 4px 0;
  317. font-size: 12px;
  318. border: 1px solid #eee;
  319. cursor: pointer;
  320. }
  321. .active {
  322. position: relative;
  323. background: rgba(0, 82, 255, 0.1);
  324. color: #0052FF;
  325. border: 1px solid #0052FF;
  326. font-weight: 700;
  327. }
  328. .active::before {
  329. content: "";
  330. position: absolute;
  331. top: 0;
  332. left: 0;
  333. width: 10px;
  334. height: 10px;
  335. background-image: url("/static/image/car-insure/before.png");
  336. background-size: cover;
  337. }
  338. .page {
  339. background: #F8FAFE;
  340. }
  341. .flexd {
  342. position: fixed;
  343. left: 0;
  344. right: 0;
  345. z-index: 9999;
  346. }
  347. .yshoudata {
  348. padding: 8px 16px;
  349. background-color: #fff;
  350. .content {
  351. border-bottom: 1px solid #CFCFCF;
  352. padding: 8px 0;
  353. >text:nth-child(2) {
  354. font-size: 13px;
  355. color: #333;
  356. margin: 4px 0;
  357. }
  358. >view:nth-child(3) {
  359. color: rgba(51, 51, 51, 0.8);
  360. font-size: 12px;
  361. }
  362. }
  363. image {
  364. width: 20px;
  365. height: 20px;
  366. }
  367. }
  368. .headerFilter {
  369. padding: 8px 16px;
  370. background: #F8FAFE;
  371. z-index: 99;
  372. .drop {
  373. width: 106px;
  374. height: 100%;
  375. background: #EAEEF5;
  376. border-radius: 6px;
  377. padding: 5px;
  378. text {
  379. color: rgba(51, 51, 51, 0.8);
  380. font-size: 14px;
  381. }
  382. }
  383. >text {
  384. color: rgba(51, 51, 51, 0.8);
  385. font-size: 14px;
  386. }
  387. }
  388. </style>