orders.vue 28 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072
  1. <template>
  2. <view class="parent">
  3. <!-- 查询区域Start -->
  4. <view>
  5. <view class=" flexd " style="z-index: 99;">
  6. <view class="search dis a-c j-s"
  7. style="background: linear-gradient( 90deg, #0052FF 0%, #6697FF 100%);padding-top:55px;">
  8. <u-search v-model="pageRequest.licenseNo" @custom="custom" @search="search" :shape="shape"
  9. :height='68' bg-color="rgba(255,255,255,0.5)" color="#fff"
  10. :input-style="{background:'transparent'}" placeholder-color="#fff" :clearabled="clearabled"
  11. :show-action="showAction" :input-align="inputAlign" @clear="clear"
  12. :action-style="{background:'#fff'}" placeholder="请输入车牌号"></u-search>
  13. <image src="/static/image/car-insure/dropdown.png" mode="" @tap="searchPopup"></image>
  14. </view>
  15. <view :class="['dropdown-content', { 'show': showDropdown }]" @tap="searchPopup">
  16. <view :class="['dropdown-content1','dis','f-c','j-s','', { 'scolcentent': showDropdown }]"
  17. @tap.stop.prevent>
  18. <scroll-view scroll-y="true" class="scolcentent ">
  19. <view style="padding: 0px 20px;">
  20. <view class="term">
  21. <text>订单状态</text>
  22. <view class="dis a-c f-wrap j-s" style="margin-top: 10px;">
  23. <view class="status-data"
  24. :class="item.value===pageRequest.orderStatus? 'active':''"
  25. v-for="(item,index) in statusList"
  26. @tap.stop.prevent="statusclick(item.value)" :key="index">
  27. {{item.label}}
  28. </view>
  29. </view>
  30. </view>
  31. <view class="term">
  32. <text>投保险种</text>
  33. <view class="dis a-c f-wrap j-s" style="margin-top: 10px;">
  34. <view class="status-data"
  35. :class="item.dictValue==pageRequest.productid? 'active':''"
  36. v-for="(item,index) in productsTypeoptions"
  37. @tap="productstatusclick(item.dictValue)" :key="index">
  38. {{item.dictTag}}
  39. </view>
  40. </view>
  41. </view>
  42. <view class="term">
  43. <text>保险公司</text>
  44. <view class="dis a-c f-wrap j-start" style="margin-top: 10px;">
  45. <view class="status-data" :class="item.id==pageRequest.companyId? 'active':''"
  46. v-for="(item,index) in esmInsCompanyList" @tap="companystatusclick(item.id)"
  47. :key="index">
  48. {{item.namesimple}}
  49. </view>
  50. </view>
  51. </view>
  52. <view class="term">
  53. <text>车牌号</text>
  54. <view class="dis a-c f-wrap j-start" style="margin-top: 10px;">
  55. <view class="status-data" :class="item==pageRequest.licenseNo? 'active':''"
  56. v-for="(item,index) in vehiclePlateList" @tap="licenseNoclick(item)"
  57. :key="index">
  58. {{item}}
  59. </view>
  60. </view>
  61. </view>
  62. <view class="term">
  63. <text>被保人</text>
  64. <view class="dis a-c f-wrap j-start" style="margin-top: 10px;">
  65. <view class="status-data" :class="item==pageRequest.insuredName? 'active':''"
  66. v-for="(item,index) in insuranceList" @tap="insuranceclick(item)"
  67. :key="index">
  68. {{item}}
  69. </view>
  70. </view>
  71. </view>
  72. <view class="term">
  73. <text>订单日期</text>
  74. <view class="dis a-c f-wrap j-s" style="margin-top: 10px;">
  75. <view class="status-data" :class="item.value==timespecifications? 'active':''"
  76. v-for="(item,index) in dateList" @tap="dateclick(item.value)" :key="index">
  77. {{item.label}}
  78. </view>
  79. <view class="dis a-c">
  80. <view class="status-data" :class="startShow? 'active' :''"
  81. @tap="startShowmethod()">
  82. <text v-if="pageRequest.startDate!=''">{{pageRequest.startDate}}</text>
  83. <text v-else>{{transformTime()}}</text>
  84. </view>
  85. <text style="margin: 0 8px;font-size: 12px;">至</text>
  86. <view class="status-data" :class="endShow? 'active' :''"
  87. @tap="endShowmethod()">
  88. <text v-if="pageRequest.endDate!=''">{{pageRequest.endDate}}</text>
  89. <text v-else>{{transformTime()}}</text>
  90. </view>
  91. </view>
  92. </view>
  93. </view>
  94. </view>
  95. </scroll-view>
  96. <view class="operateBtn dis ">
  97. <view class="cancel dis a-c j-c" @click="showDropdown=false">
  98. 取消
  99. </view>
  100. <view class="confirm dis a-c j-c" @click="querysearch">
  101. 确定
  102. </view>
  103. </view>
  104. </view>
  105. </view>
  106. </view>
  107. </view>
  108. <view style="padding: 110px 16px 50px 16px;">
  109. <view v-for="(item,index) in pageResult" :key="index">
  110. <view class="orderItemPane" v-for="(statusitem, statusindex) in statusList" :key="statusindex"
  111. v-if="item.orderstatus == statusitem.value" :style="{background:statusitem.itemback}">
  112. <view class="orderItemPane-upper dis j-s a-c ">
  113. <view class="dis a-c j-start">
  114. <image :src="statusitem.src" mode="" style="width: 22px;height: 22px;margin-right: 5px;">
  115. </image>
  116. <text class=" licenseno">{{item.licenseno}}</text>
  117. </view>
  118. <view class="colorBlock">
  119. {{item.product}}
  120. </view>
  121. </view>
  122. <view class="orderItemPane-centre ">
  123. <view class="dis f-c">
  124. <text>订单号:{{item.orderno}}</text>
  125. <view class="dis a-c j-s mt-2">
  126. <view class="dis a-end ">
  127. <view class="dis f-c a-c">
  128. <text style="font-size: 24rpx;color: #333">车主</text>
  129. <text style="font-size: 24rpx;color: #333">{{item.ownerinfo.name}}</text>
  130. </view>
  131. <image src="../../static/image/car-insure/phone.png" mode=""
  132. style="width: 16px;height: 16px;margin: 0 0 5px 10px;"
  133. @click="phone(item.ownerinfo.mobile)"></image>
  134. </view>
  135. <view class="dis a-end ">
  136. <view class="dis f-c a-c">
  137. <text style="font-size: 24rpx;color: #333">投保人</text>
  138. <text style="font-size: 24rpx;color: #333">{{item.applyinfo.name}}</text>
  139. </view>
  140. <image src="../../static/image/car-insure/phone.png" mode=""
  141. style="width: 16px;height: 16px;margin: 0 0 5px 10px;"
  142. @click="phone(item.applyinfo.mobile)"></image>
  143. </view>
  144. <view class="dis a-end ">
  145. <view class="dis f-c a-c">
  146. <text style="font-size: 24rpx;color: #333">被保人</text>
  147. <text style="font-size: 24rpx;color: #333">{{item.insureinfo.name}}</text>
  148. </view>
  149. <image src="../../static/image/car-insure/phone.png" mode=""
  150. style="width: 16px;height: 16px;margin: 0 0 5px 10px;"
  151. @click="phone(item.insureinfo.mobile)"></image>
  152. </view>
  153. </view>
  154. <view class="dis f-c mt-2">
  155. <view v-for="(riskitem,riskindex) in item.risk" :key="riskindex">
  156. <template v-if="riskitem.expirationDay && riskitem.expirationDay !='0'">
  157. <view v-if="riskitem.riskCode=='0507'" class="time dis j-s a-c">
  158. <text>交强险到期时间</text>
  159. <view class="dis a-c j-c">还差
  160. <text class="downstyle dis j-c a-c ">{{riskitem.expirationDay}}</text>
  161. 天到期
  162. </view>
  163. </view>
  164. <view v-if="riskitem.riskCode=='0510'" class="time dis j-s a-c">
  165. <text>商业险到期时间</text>
  166. <view class="dis a-c j-c">还差
  167. <text class="downstyle dis j-c a-c ">{{riskitem.expirationDay}}</text>
  168. 天到期
  169. </view>
  170. </view>
  171. </template>
  172. <template v-else-if="riskitem.expirationDay=='0'">
  173. <view v-if="riskitem.riskCode=='0507'" class="time dis j-s a-c">
  174. <text>交强险到期时间</text>
  175. <text>今天到期</text>
  176. </view>
  177. <view v-if="riskitem.riskCode=='0510'" class="time dis j-s a-c">
  178. <text>商业险到期时间</text>
  179. <text>今天到期</text>
  180. </view>
  181. </template>
  182. <template v-else>
  183. <view v-if="riskitem.riskCode=='0507'" class="time dis j-s a-c">
  184. <template v-if="item.orderstatus!=3">
  185. <text>交强险投保时间</text>
  186. <text>{{riskitem.startDate}}</text>
  187. </template>
  188. <template v-else>
  189. <text>交强险保险期间</text>
  190. <text>{{riskitem.startDate}}-{{riskitem.endDate}}</text>
  191. </template>
  192. </view>
  193. <view v-if="riskitem.riskCode=='0510'" class="time dis j-s a-c">
  194. <template v-if="item.orderstatus!=3">
  195. <text>商业险投保时间</text>
  196. <text>{{riskitem.startDate}}</text>
  197. </template>
  198. <template v-else>
  199. <text>商业险保险期间</text>
  200. <text>{{riskitem.startDate}}-{{riskitem.endDate}}</text>
  201. </template>
  202. </view>
  203. </template>
  204. </view>
  205. </view>
  206. </view>
  207. </view>
  208. <view class="orderItemPane-below dis a-c j-end f-wrap ">
  209. <u-button v-if="item.orderstatus!='3'"
  210. :custom-style="{fontSize:'12px',background:'rgba(34,152,5,0.05)',color:'#229805',borderColor:'#229805'}"
  211. shape="circle" size="mini" :hair-line="false" :plain="true"
  212. @click="CloseEdit(item.orderno)">进行中</u-button>
  213. <u-button v-if="item.orderstatus!='3'"
  214. :custom-style="{fontSize:'12px',background:'rgba(255,86,0,0.05)',color:'#FF5600',borderColor:'#FF5600'}"
  215. shape="circle" size="mini" :hair-line="false" :plain="true"
  216. @click="quotehistory(item,'1')">核保中</u-button>
  217. <u-button v-if="item.orderstatus!='3'"
  218. :custom-style="{fontSize:'12px',background:'rgba(255,15,0,0.05)',color:'#FF0F00',borderColor:'#FF0F00'}"
  219. shape="circle" size="mini" :hair-line="false" :plain="true"
  220. @click="quotehistory(item,'2')">待缴费</u-button>
  221. <u-button
  222. :custom-style="{fontSize:'12px',background:'rgba(0,82,255,0.05)',color:'#0052FF',borderColor:'#0052FF'}"
  223. shape="circle" size="mini" :hair-line="false" :plain="true"
  224. @click="quotehistory(item,'3')">已承保</u-button>
  225. <u-button v-if="item.orderstatus!='3'"
  226. :custom-style="{fontSize:'12px',background:'rgba(158,0,255,0.05)',color:'#9E00FF',borderColor:'#9E00FF'}"
  227. shape="circle" size="mini" :hair-line="false" :plain="true"
  228. @click="quotehistory(item,'4')">核保退回</u-button>
  229. </view>
  230. </view>
  231. </view>
  232. <u-loadmore v-if="pageResult.length!=0" :status="status" />
  233. </view>
  234. <o-empty v-if="pageResult.length==0" />
  235. <!-- 回到顶部 -->
  236. <u-picker v-model="startShow" mode="time" :params="params" @confirm="startconfirm"></u-picker>
  237. <u-picker v-model="endShow" mode="time" :params="params" @confirm="endconfirm"></u-picker>
  238. <u-mask :show="stepShow" @click="stepShow = false">
  239. <view class="warp">
  240. <view class="rect" @tap.stop>
  241. <u-steps :list="numList" :current="4" direction="column" mode="number" :viewType="'order'">
  242. <template v-slot:header>
  243. <view>这是父组件传递给子组件的头部插槽内容</view>
  244. </template>
  245. </u-steps>
  246. </view>
  247. </view>
  248. </u-mask>
  249. <service-widget @btnClick="btn_click"></service-widget>
  250. </view>
  251. </template>
  252. <script>
  253. import {
  254. mapState,
  255. mapMutations
  256. } from "vuex"
  257. // import carOrders from "@/components/modules/orders/carOrders.vue";
  258. import {
  259. watch
  260. } from "vue";
  261. export default {
  262. components: {},
  263. watch: {
  264. stageIndex(newVal, oldVal) {
  265. if (newVal !== oldVal) {
  266. this.pageRequest.orderStatus = newVal;
  267. }
  268. }
  269. },
  270. data() {
  271. return {
  272. productsTypeoptions: [],
  273. show: true,
  274. showDropdown: false,
  275. /* 时间筛选相关 */
  276. startShow: false,
  277. endShow: false,
  278. params: {
  279. year: true, //年
  280. month: true, //月
  281. day: true, //日
  282. },
  283. /* 时间筛选相关 */
  284. pageRequest: { //查询的默认条件
  285. companyId: "",
  286. orderNo: "",
  287. frameNo: "",
  288. insuredName: "",
  289. licenseNo: "",
  290. orderStatus: "",
  291. userId: "",
  292. deptId: "",
  293. endDate: "",
  294. startDate: "",
  295. productid: "",
  296. pageNum: 1,
  297. pageSize: 20,
  298. },
  299. timespecifications: null,
  300. pageResult: [], //列表数据
  301. /* 搜索框配置 */
  302. shape: 'square',
  303. clearabled: true,
  304. showAction: false,
  305. inputAlign: 'left',
  306. /* 搜索框配置 */
  307. //状态筛选list
  308. statusList: [{
  309. label: '全部',
  310. value: " ",
  311. }, {
  312. label: '进行中',
  313. value: 0,
  314. btnColor: "#229805",
  315. btnbackground: "rgba(34,152,5,0.05)",
  316. itemback: "linear-gradient( 180deg, #EEFFE4 0%, #CDFFB6 100%)",
  317. src: "/static/image/car-insure/state.png"
  318. },
  319. {
  320. label: '核保中',
  321. value: 1,
  322. btnColor: "#FF5600",
  323. btnbackground: "rgba(255,86,0,0.05)",
  324. itemback: "linear-gradient( 180deg, #FFEDE3 0%, #FFC7AB 100%)",
  325. src: "/static/image/car-insure/state.png"
  326. },
  327. {
  328. label: '待缴费',
  329. value: 2,
  330. btnColor: "#FF0F00",
  331. btnbackground: "rgba(255,15,0,0.05)",
  332. itemback: "linear-gradient( 180deg, #FFEEEC 0%, #FFA8A2 100%)",
  333. src: "/static/image/car-insure/state.png"
  334. },
  335. {
  336. label: '已承保',
  337. value: 3,
  338. btnColor: "#0052FF",
  339. btnbackground: "rgba(0,82,255,0.05)",
  340. itemback: "linear-gradient( 180deg, #ECFFFE 0%, #CCF9FF 100%)",
  341. src: "/static/image/car-insure/state.png"
  342. },
  343. {
  344. label: '核保退回',
  345. value: 4,
  346. btnColor: "#9E00FF",
  347. btnbackground: "rgba(158,0,255,0.05)",
  348. itemback: "linear-gradient( 180deg, #FDECFF 0%, #F5CCFF 100%)",
  349. src: "/static/image/car-insure/state.png"
  350. }
  351. ],
  352. //日期筛选list
  353. dateList: [{
  354. label: '全部',
  355. value: 0,
  356. },
  357. {
  358. label: '近1天',
  359. value: 1,
  360. },
  361. {
  362. label: '近2天',
  363. value: 2,
  364. },
  365. {
  366. label: '近3天',
  367. value: 3,
  368. },
  369. {
  370. label: '近4天',
  371. value: 4,
  372. },
  373. {
  374. label: '近5天',
  375. value: 5,
  376. },
  377. {
  378. label: '近6天',
  379. value: 6,
  380. },
  381. {
  382. label: '近7天',
  383. value: 7,
  384. },
  385. {
  386. label: '一个月内',
  387. value: '一个月内',
  388. },
  389. {
  390. label: '三个月内',
  391. value: '三个月内',
  392. },
  393. {
  394. label: '六个月内',
  395. value: '六个月内',
  396. },
  397. ],
  398. typeArray: [{
  399. label: '车险',
  400. value: 0,
  401. },
  402. {
  403. label: '意外险',
  404. value: 1,
  405. },
  406. {
  407. label: '寿险',
  408. value: 2,
  409. }
  410. ], //订单的类型
  411. vehiclePlateList: [], //车牌
  412. insuranceList: [], //被保人
  413. toTopFlag: false, //显示回到顶部按钮
  414. queryLicenseNo: "",
  415. queryFrameNo: "",
  416. insureMore: false,
  417. insureMoreIndex: null,
  418. esmInsCompanyList: [],
  419. status: 'loadmore',
  420. totalPages: 0, //订单总页数
  421. stepShow: false, //步骤条弹框
  422. numList: [{
  423. "processingStatus": "1",
  424. "processingStatusFlag": true,
  425. "name": "提现申请",
  426. "date": "2024-07-31 19:25:12"
  427. },
  428. {
  429. "processingStatus": "2",
  430. "processingStatusFlag": true,
  431. "name": "处理中",
  432. "date": "2024-07-31 19:25:12"
  433. },
  434. {
  435. "processingStatus": "4",
  436. "processingStatusFlag": true,
  437. "name": "提现成功",
  438. "date": "2024-08-01 08:49:12"
  439. }
  440. ],
  441. }
  442. },
  443. onReachBottom() {
  444. if (this.pageRequest.pageNum >= this.totalPages) return;
  445. this.status = 'loading';
  446. this.pageRequest.pageNum = ++this.pageRequest.pageNum;
  447. setTimeout(async () => {
  448. let res = await this.$http.post('/insurance/order/queryPageOrder', this.pageRequest);
  449. if (res.code == '200') {
  450. this.pageResult = [...this.pageResult, ...res.data.content];
  451. }
  452. if (this.pageRequest.pageNum >= this.totalPages) this.status = 'nomore';
  453. else this.status = 'loading';
  454. }, 1000)
  455. },
  456. computed: {
  457. ...mapState(['userInfo', 'typeIndex', 'stageIndex'])
  458. },
  459. // 页面滚动触发
  460. onPageScroll(e) { //根据距离顶部距离是否显示回到顶部按钮
  461. if (e.scrollTop > 600) { //当距离大于600时显示回到顶部按钮
  462. this.toTopFlag = true
  463. } else { //当距离小于600时显示回到顶部按钮
  464. this.toTopFlag = false
  465. }
  466. },
  467. onShow() {
  468. const arr = uni.getStorageSync('historyInfo');
  469. if (arr) {
  470. uni.removeStorageSync('historyInfo');
  471. }
  472. this.getOrdersList(1, 20)
  473. this.esmInsCompany()
  474. },
  475. onPullDownRefresh() {
  476. this.getOrdersList(1, 20)
  477. setTimeout(function() {
  478. uni.stopPullDownRefresh();
  479. }, 1000);
  480. },
  481. async onLoad(e) {
  482. this.pageRequest.userId = this.userInfo.sysUser.id;
  483. this.pageRequest.deptId = this.userInfo.sysUser.deptId;
  484. this.getOrdersList(1, 20)
  485. this.getDicType("productsType"); //车船税类型
  486. },
  487. methods: {
  488. ...mapMutations(['setOrderType', 'setOrderStage']),
  489. phone(phone) {
  490. uni.makePhoneCall({
  491. phoneNumber: phone, //仅为示例
  492. });
  493. },
  494. btn_click() {
  495. uni.navigateTo({
  496. url: '/pages/chat/chat'
  497. })
  498. },
  499. async getOrdersList(page, size) {
  500. this.pageRequest.pageNum = page;
  501. this.pageRequest.pageSize = size;
  502. let res = await this.$http.post('/insurance/order/queryPageOrder', this.pageRequest);
  503. if (res.code == '200') {
  504. this.pageResult = res.data.content;
  505. this.totalPages = res.data.totalPages;
  506. }
  507. },
  508. async getDicType(type) {
  509. let res = await this.$http.get('/sysDict/dictDetails/' + type);
  510. if (res.code == 200) {
  511. this[type + 'options'] = [{
  512. dictTag: "全部",
  513. dictValue: " ",
  514. }, ...res.data.ddList];
  515. }
  516. },
  517. async esmInsCompany() {
  518. let commpanykad = await this.$http.get('/insurance/order/getAgreementInsCompany');
  519. if (commpanykad.code == '200') {
  520. this.esmInsCompanyList = commpanykad.data;
  521. }
  522. },
  523. searchPopup() {
  524. this.showDropdown = !this.showDropdown;
  525. },
  526. //展开
  527. selectMore(val) {
  528. this.insureMore = true;
  529. this.insureMoreIndex = val;
  530. },
  531. packup(val) {
  532. this.insureMore = false;
  533. this.insureMoreIndex = val;
  534. },
  535. //查询事件
  536. querysearch() {
  537. this.getOrdersList(1, 20);
  538. this.showDropdown = false;
  539. },
  540. insuranceclick(e) {
  541. this.pageRequest.insuredName = e;
  542. },
  543. licenseNoclick(e) {
  544. this.pageRequest.licenseNo = e;
  545. },
  546. //状态筛选
  547. statusclick(e) {
  548. if (e === this.pageRequest.orderStatus) {
  549. this.pageRequest.orderStatus = ''
  550. } else {
  551. this.pageRequest.orderStatus = e;
  552. }
  553. // console.log(this.pageRequest.orderStatus)
  554. },
  555. //保险公司筛选
  556. companystatusclick(e) {
  557. // this.pageRequest.companyId = e;
  558. if (e == this.pageRequest.companyId) {
  559. this.pageRequest.companyId = ''
  560. } else {
  561. this.pageRequest.companyId = e;
  562. }
  563. },
  564. //投保险种筛选
  565. productstatusclick(e) {
  566. if (e == this.pageRequest.productid) {
  567. this.pageRequest.productid = ''
  568. } else {
  569. this.pageRequest.productid = e;
  570. }
  571. },
  572. startShowmethod() {
  573. this.startShow = true;
  574. this.timespecifications = null;
  575. },
  576. endShowmethod() {
  577. this.endShow = true;
  578. this.timespecifications = null;
  579. },
  580. //日期筛选
  581. dateclick(e) {
  582. console.log(e);
  583. /* 0:全部 1:一周内 2:一个月内 3:三个月内 4:六个月内*/
  584. switch (e) {
  585. case 0:
  586. this.pageRequest.startDate = "";
  587. this.pageRequest.endDate = "";
  588. break;
  589. case 1:
  590. case 2:
  591. case 3:
  592. case 4:
  593. case 5:
  594. case 6:
  595. case 7:
  596. this.pageRequest.startDate = this.transformTime(e);
  597. this.pageRequest.endDate = this.transformTime();
  598. this.vehiclePlateform(this.pageRequest.startDate, this.pageRequest.endDate);
  599. this.insuranceform(this.pageRequest.startDate, this.pageRequest.endDate);
  600. break;
  601. case '一个月内':
  602. this.pageRequest.startDate = this.transformTime1(1);
  603. this.pageRequest.endDate = this.transformTime();
  604. break;
  605. case '三个月内':
  606. this.pageRequest.startDate = this.transformTime1(3);
  607. this.pageRequest.endDate = this.transformTime();
  608. break;
  609. case '六个月内':
  610. this.pageRequest.startDate = this.transformTime1(6);
  611. this.pageRequest.endDate = this.transformTime();
  612. break;
  613. default:
  614. }
  615. this.timespecifications = e;
  616. },
  617. async vehiclePlateform(start, end) {
  618. let res = await this.$http.post('/insurance/order/queryLicenseInOrder', {
  619. startDate: start,
  620. endDate: end,
  621. });
  622. if (res.code == 200) {
  623. this.vehiclePlateList = res.data;
  624. }
  625. },
  626. async insuranceform(start, end) {
  627. let res = await this.$http.post('/insurance/order/queryInsuredInOrder', {
  628. startDate: start,
  629. endDate: end,
  630. });
  631. if (res.code == 200) {
  632. this.insuranceList = res.data;
  633. }
  634. },
  635. startconfirm(e) {
  636. this.pageRequest.startDate = e.year + '-' + e.month + '-' + e.day;
  637. },
  638. endconfirm(e) {
  639. this.pageRequest.endDate = e.year + '-' + e.month + '-' + e.day;
  640. },
  641. //验证车架号
  642. isFrameno(str) {
  643. let mPattern = /^([0-9A-Z]){17}$/;
  644. return mPattern.test(str);
  645. },
  646. isCarBrand(str) {
  647. let mPattern = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼A-Z]{1}[A-Z]{1}[A-Z0-9]{4,5}([A-Z0-9挂学警港澳使领]{1}|应急)$/ ||
  648. /^沪[0-9A-Z]{5}$/ || /^陆丰[0-9A-Z]{4}临$/;
  649. return mPattern.test(str.trim())
  650. // return /^陆丰[0-9A-Z]{4}临$/.test(str.trim())
  651. },
  652. //查看子订单
  653. // async querydetail(val) {
  654. // let params = {
  655. // orderno: val.orderno,
  656. // insuredname: val.insuredname,
  657. // licenseno: val.licenseno,
  658. // modelcname: val.carinfo.modelcname,
  659. // }
  660. // uni.navigateTo({
  661. // url: `/pages/orders/subOrders?orderno=${JSON.stringify(params)}`
  662. // })
  663. // },
  664. //报价历史
  665. quotehistory(val, Status) {
  666. let params = {
  667. orderno: val.orderno,
  668. insuredname: val.insuredname,
  669. licenseno: val.licenseno,
  670. modelcname: val.carinfo.modelcname,
  671. orderStatus: Status,
  672. product: val.product,
  673. ownername: val.ownerinfo.name,
  674. applyname: val.applyinfo.name,
  675. insurename: val.insureinfo.name,
  676. }
  677. uni.navigateTo({
  678. url: `/pages/orders/quoteHistory?orderno=${JSON.stringify(params)}`
  679. })
  680. },
  681. //编辑
  682. CloseEdit(val) {
  683. uni.navigateTo({
  684. url: "/pages/carInsure/premiumCalc?orderno=" + val
  685. })
  686. // this.navigate({
  687. // url: '/pages/carInsure1/quote1',
  688. // success: (res) => {
  689. // res.eventChannel.emit("acceptData", {
  690. // carInfo: val.carinfo, //车辆信息
  691. // ownerInfo: val.ownerinfo, //车主信息
  692. // policyHolderInfo: val.applyinfo, //
  693. // insuredPersonInfo: val.insureinfo,
  694. // riskList: val.risk,
  695. // kindList: val.king,
  696. // orderno: val.orderno, //车辆
  697. // quoteno: val.quoteno, //车主
  698. // vehicleAndVesselTaxForm: val.vehicleAndVesselTax, //车船税
  699. // })
  700. // }
  701. // }, "navigateTo", true);
  702. },
  703. //回车搜索事件
  704. search(val) {
  705. this.getOrdersList(1, 20);
  706. },
  707. //搜索按钮事件
  708. custom(val) {
  709. this.getOrdersList(1, 20);
  710. },
  711. //搜索框清除事件
  712. clear(val) {
  713. },
  714. //关闭订单后查询
  715. closeOrders() {
  716. this.totalSize = 0;
  717. this.ordersList = []; //获取到的订单列表
  718. this.currentPage = 1; //当前的页数
  719. this.totalPages = 1; //总共的页数
  720. },
  721. //当前时间
  722. transformTime(day) {
  723. var date = new Date();
  724. date.setFullYear(date.getFullYear());
  725. date.setTime(date.getTime());
  726. var strYear = date.getFullYear();
  727. var strDay = day ? date.getDate() - day : date.getDate();
  728. var strMonth = date.getMonth() + 1;
  729. if (strMonth < 10) {
  730. strMonth = "0" + strMonth;
  731. }
  732. if (strDay < 10) {
  733. strDay = "0" + strDay;
  734. }
  735. var datastr = strYear + "-" + strMonth + "-" + strDay;
  736. return datastr;
  737. },
  738. transformTime1(month) {
  739. var date = new Date();
  740. date.setFullYear(date.getFullYear());
  741. date.setTime(date.getTime());
  742. var strYear = date.getFullYear();
  743. var strDay = date.getDate();
  744. var strMonth = month ? (date.getMonth() + 1) - month : date.getMonth() + 1;
  745. if (strMonth < 10) {
  746. strMonth = "0" + strMonth;
  747. }
  748. if (strDay < 10) {
  749. strDay = "0" + strDay;
  750. }
  751. var datastr = strYear + "-" + strMonth + "-" + strDay;
  752. return datastr;
  753. },
  754. }
  755. }
  756. </script>
  757. <style>
  758. page {
  759. background-color: #F8FAFE;
  760. }
  761. .warp {
  762. display: flex;
  763. align-items: center;
  764. justify-content: center;
  765. height: 100%;
  766. }
  767. .rect {
  768. width: 90%;
  769. height: 80%;
  770. background-color: #fff;
  771. }
  772. </style>
  773. <style lang="scss" scoped>
  774. @import '@/style/mixin.scss';
  775. /deep/ uni-tabbar .uni-tabbar-bottom {
  776. position: fixed;
  777. left: 0;
  778. right: 0;
  779. bottom: 0;
  780. }
  781. /deep/ .u-action[data-v-1a326067] {
  782. color: #FFFFFF;
  783. }
  784. /deep/ .u-dropdown__menu__item__arrow[data-v-01c0c507] uni-text {
  785. color: #FFFFFF !important;
  786. }
  787. .dropdown-content {
  788. background-color: rgba(0, 0, 0, 0.6);
  789. height: 0px;
  790. opacity: 0;
  791. transition: opacity 0.3s ease;
  792. .title {
  793. font-size: 14px;
  794. color: #232832;
  795. font-weight: bold;
  796. border-bottom: 1px solid #E1E1E1;
  797. }
  798. .term {
  799. padding-top: 10px;
  800. >text {
  801. color: #232832;
  802. font-weight: bold;
  803. font-size: 13px;
  804. }
  805. }
  806. .operateBtn {
  807. font-weight: bold;
  808. font-size: 16px;
  809. .cancel {
  810. width: 50%;
  811. height: 46px;
  812. color: #0052FF;
  813. background-color: #EAEAEA;
  814. }
  815. .confirm {
  816. width: 50%;
  817. height: 46px;
  818. color: #fff;
  819. background-color: #0052FF;
  820. }
  821. }
  822. }
  823. .dropdown-content1 {
  824. background-color: #fff;
  825. height: 0px;
  826. overflow: hidden;
  827. transition: height 0.4s ease;
  828. }
  829. .show {
  830. height: 100vh;
  831. opacity: 1;
  832. /* 下拉菜单内容的最大高度 */
  833. }
  834. .scolcentent {
  835. height: 450px;
  836. margin-bottom: 10px;
  837. overflow-y: auto;
  838. /* 下拉菜单遮罩最大高度 */
  839. }
  840. .headers {
  841. background-color: rgba(199, 198, 202, 0.4);
  842. width: 100%;
  843. height: 0;
  844. position: absolute;
  845. z-index: 999;
  846. }
  847. .parent {
  848. position: relative;
  849. }
  850. .search-condition {
  851. padding: 0 16px;
  852. .title {
  853. font-size: 14px;
  854. color: #232832;
  855. font-weight: bold;
  856. border-bottom: 1px solid #E1E1E1;
  857. }
  858. .term {
  859. padding-top: 10px;
  860. >text {
  861. color: #232832;
  862. font-weight: bold;
  863. font-size: 13px;
  864. }
  865. }
  866. }
  867. .search {
  868. padding: 13px 16px;
  869. image {
  870. width: 22px;
  871. height: 22px;
  872. margin-left: 20px;
  873. }
  874. }
  875. .slot-content1 {
  876. background-color: #FFFFFF;
  877. padding: 24rpx;
  878. }
  879. .title {
  880. font-weight: bold;
  881. color: #333;
  882. }
  883. .status-data {
  884. padding: 4px 10px;
  885. box-sizing: border-box;
  886. margin: 0 4px 4px 0;
  887. font-size: 12px;
  888. border: 1px solid #eee;
  889. cursor: pointer;
  890. }
  891. .active {
  892. position: relative;
  893. background: rgba(0, 82, 255, 0.1);
  894. color: #0052FF;
  895. border: 1px solid #0052FF;
  896. font-weight: 700;
  897. }
  898. .active::before {
  899. content: "";
  900. position: absolute;
  901. top: 0;
  902. left: 0;
  903. width: 10px;
  904. height: 10px;
  905. background-image: url("/static/image/car-insure/before.png");
  906. background-size: cover;
  907. }
  908. .orderItemPane {
  909. width: 100%;
  910. height: auto;
  911. margin: 10px 0;
  912. border-radius: 10px;
  913. background: #FFFFFF;
  914. box-shadow: 0px 4px 10px 0px #DAE3F4;
  915. border-radius: 6px;
  916. cursor: pointer;
  917. }
  918. .orderItemPane-upper {
  919. background: rgba(255, 255, 255, 0.5);
  920. border-radius: 6px 6px 0px 0px;
  921. padding: 13rpx 16rpx;
  922. .licenseno {
  923. font-family: Source Han Sans SC, Source Han Sans SC;
  924. font-weight: bold;
  925. font-size: 14px;
  926. color: #181818;
  927. }
  928. .colorBlock {
  929. background: #FF7F00;
  930. box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.1);
  931. border-radius: 4px;
  932. border: 1px solid #FEEDDF;
  933. color: #fff;
  934. font-size: 26rpx;
  935. font-weight: bold;
  936. padding: 0 10px;
  937. }
  938. }
  939. .orderItemPane-centre {
  940. padding: 7px 14px;
  941. >view>text {
  942. font-weight: bold;
  943. color: #232832;
  944. }
  945. .time {
  946. >text {
  947. color: rgba(51, 51, 51, 0.8);
  948. font-size: 12px;
  949. }
  950. .downstyle {
  951. background: rgba(255, 255, 255, 0.6);
  952. border-radius: 2px;
  953. padding: 2px 8px;
  954. margin: 0 4px;
  955. color: #333333;
  956. font-size: 12px;
  957. }
  958. }
  959. }
  960. .orderItemPane .orderItemPane-centre,
  961. .inscommny-sum>text {
  962. color: rgba(51, 51, 51, 0.8);
  963. font-weight: 400;
  964. }
  965. .orderItemPane-below {
  966. height: auto;
  967. padding: 10px;
  968. background: #ffff;
  969. border-radius: 0 0 6px 6px;
  970. &>button {
  971. margin-left: 10px;
  972. margin-bottom: 5px;
  973. }
  974. }
  975. .orderItemPane-extend .extend-button>text {
  976. color: #ff9000;
  977. font-size: 12px;
  978. }
  979. .orderItemPane-extend {
  980. border-bottom-right-radius: 10px;
  981. border-bottom-left-radius: 10px;
  982. }
  983. .classes::before {
  984. content: "·";
  985. color: #ff9000;
  986. margin-right: 10px;
  987. }
  988. .flexd {
  989. position: fixed;
  990. left: 0;
  991. right: 0;
  992. }
  993. .moosize {
  994. font-size: 12px;
  995. color: rgba(51, 51, 51, 0.6);
  996. font-weight: 400;
  997. }
  998. .color {
  999. color: #ff9000;
  1000. }
  1001. /* 查询区域End */
  1002. </style>