orders.vue 31 KB

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