orders.vue 28 KB

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