index.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624
  1. <template>
  2. <div class="app-container">
  3. <div class="filter-container" style="margin: 10px 0 10px 0">
  4. <!-- <el-row :gutter="20" style="marginBottom:20px">
  5. <el-col :span="8" :xs="12" :lg="8">
  6. <div>
  7. <span class="textSpan">
  8. 订单号:
  9. </span>
  10. <el-input
  11. v-model="body.orderId"
  12. style="width: 70%;"
  13. placeholder="请输入订单号"
  14. size="small"
  15. clearable
  16. />
  17. </div>
  18. </el-col>
  19. <el-col :span="8" :xs="12" :lg="8">
  20. <div>
  21. <span class="textSpan">
  22. 商户订单号:
  23. </span>
  24. <el-input
  25. v-model="body.extorderId"
  26. style="width: 70%;"
  27. placeholder="请输入商户订单号"
  28. size="small"
  29. clearable
  30. />
  31. </div>
  32. </el-col>
  33. <el-col :span="8" :xs="12" :lg="8">
  34. <div>
  35. <span class="textSpan">
  36. 手机号码:
  37. </span>
  38. <el-input
  39. v-model="body.usedMobile"
  40. style="width: 70%;"
  41. placeholder="请输入手机号码"
  42. size="small"
  43. clearable
  44. />
  45. </div>
  46. </el-col>
  47. </el-row> -->
  48. <div class="flex">
  49. <div class="w_input">
  50. <span class="textSpan"> 订单号:</span>
  51. <el-input
  52. v-model="body.orderId"
  53. style="width:65%;"
  54. placeholder="请输入订单号"
  55. size="small"
  56. clearable
  57. />
  58. </div>
  59. <div class="w_input">
  60. <span class="textSpan">商户订单号:</span>
  61. <el-input
  62. v-model="body.extorderId"
  63. style="width: 65%;"
  64. placeholder="请输入商户订单号"
  65. size="small"
  66. clearable
  67. />
  68. </div>
  69. <div class="w_input stylephone">
  70. <div class="textSpan marginphone"> 手机号:</div>
  71. <!-- <el-input
  72. v-model="body.usedMobile"
  73. style="width:65%;"
  74. v-if="phone"
  75. placeholder="请输入手机号"
  76. size="small"
  77. clearable
  78. /> -->
  79. <el-input
  80. type="textarea"
  81. v-model="body.usedMobile"
  82. :autosize="{ minRows: 1.1, maxRows: 5}"
  83. class="phone"
  84. size="small"
  85. placeholder="请输入内容"
  86. clearable
  87. >
  88. </el-input>
  89. </div>
  90. </div>
  91. <div class="flex">
  92. <div class="w_date">
  93. <span class="textSpan">回调时间:</span>
  94. <el-date-picker
  95. v-model="checkTimeStart"
  96. size="small"
  97. type="datetimerange"
  98. range-separator="至"
  99. style="width:76%"
  100. @change="oncheckTimeStart"
  101. value-format="yyyy-MM-dd HH:mm:ss"
  102. :default-time='["00:00:00","23:59:59"]'
  103. start-placeholder="开始日期"
  104. end-placeholder="结束日期"
  105. >
  106. </el-date-picker>
  107. </div>
  108. <div class="w_date">
  109. <span class="textSpan">发送时间:</span>
  110. <el-date-picker
  111. v-model="applyDateStart"
  112. size="small"
  113. type="datetimerange"
  114. style="width:77%"
  115. range-separator="至"
  116. @change="oncustom"
  117. value-format="yyyy-MM-dd HH:mm:ss"
  118. :default-time='["00:00:00","23:59:59"]'
  119. start-placeholder="开始日期"
  120. end-placeholder="结束日期"
  121. >
  122. </el-date-picker>
  123. </div>
  124. </div>
  125. <div class="flex">
  126. <div class="w_input">
  127. <span class="textSpan">通道名称:</span>
  128. <el-input
  129. v-model="body.channelIdDesc"
  130. style="width:65%;"
  131. placeholder="请输入通道名称"
  132. size="small"
  133. clearable
  134. />
  135. </div>
  136. <div class="w_input">
  137. <span class="textSpan"> 订单状态:</span>
  138. <el-select size="small" v-model="body.status" clearable placeholder="请选择订单状态" style="width: 65%" @change="changeScope">
  139. <el-option
  140. v-for="item in status"
  141. :key="item.id"
  142. :label="item.name"
  143. :value="item.id"
  144. />
  145. </el-select>
  146. </div>
  147. <div class="w_input">
  148. <span class="textSpan"> 运营商:</span>
  149. <el-select size="small" v-model="body.mobileOperator" clearable placeholder="请选择运营商" style="width: 65%" @change="changeoperator">
  150. <el-option
  151. v-for="item in mobileOperator"
  152. :key="item.id"
  153. :label="item.name"
  154. :value="item.id"
  155. />
  156. </el-select>
  157. </div>
  158. </div>
  159. <div class="flex">
  160. <div class="w_input">
  161. <span class="textSpan">  面额:</span>
  162. <el-input
  163. v-model="flowAmount"
  164. @change="changeflow"
  165. style="width:65%;"
  166. placeholder="请输入订单号"
  167. size="small"
  168. clearable
  169. />
  170. </div>
  171. <div class="w_input">
  172. <span class="textSpan"> 客户名称:</span>
  173. <el-input
  174. v-model="body.enterpriseIdDesc"
  175. style="width: 65%;"
  176. placeholder="请输入客户名称"
  177. size="small"
  178. clearable
  179. />
  180. </div>
  181. <div class="w_input">
  182. <span class="textSpan"> 归属地:</span>
  183. <el-input
  184. v-model="body.mobileHome"
  185. style="width: 65%;"
  186. placeholder="请选择归属地"
  187. size="small"
  188. clearable
  189. />
  190. </div>
  191. </div>
  192. <div class="flex">
  193. <div class="w_input">
  194. <span class="textSpan">回调状态:</span>
  195. <el-select size="small" v-model="body.dealFlag" clearable placeholder="请选择订单状态" style="width: 65%" @change="changeScope">
  196. <el-option
  197. v-for="item in dealFlag"
  198. :key="item.id"
  199. :label="item.name"
  200. :value="item.id"
  201. />
  202. </el-select>
  203. </div>
  204. </div>
  205. <div class="flexend">
  206. <el-button class="filter-item" type="info" icon="el-icon-edit" plain @click="handleReset">至重发
  207. </el-button>
  208. <el-button class="filter-item" type="warning" icon="el-icon-message" plain @click="handleReset">至回调
  209. </el-button>
  210. <el-button class="filter-item" icon="el-icon-delete" type="danger" plain @click="handleReset">至失败
  211. </el-button>
  212. <el-button class="filter-item" type="success" icon="el-icon-check" plain @click="handleReset">至成功
  213. </el-button>
  214. <el-button class="classitem" style="marginRight:50px" type="primary" plain icon="el-icon-star-off" @click="handleReset">导出
  215. </el-button>
  216. <el-button class="filter-item" icon="el-icon-search" type="primary" plain @click="handleSearch">搜索</el-button>
  217. </div>
  218. </div>
  219. <el-table v-loading="loading" :data="tableData" border style="width: 100%">
  220. <el-table-column type="selection" width="40"/>
  221. <el-table-column label="订单号" width="120" align="center" show-overflow-tooltip>
  222. <template slot-scope="scope">
  223. <span>{{ scope.row.orderId }}</span>
  224. </template>
  225. </el-table-column>
  226. <el-table-column
  227. label="客户名称"
  228. width="100"
  229. align="center"
  230. prop="createTime"
  231. show-overflow-tooltip
  232. >
  233. <template slot-scope="scope">
  234. <span>{{ scope.row.appId }}</span>
  235. </template>
  236. </el-table-column>
  237. <el-table-column
  238. label="产品ID"
  239. width="100"
  240. align="center"
  241. prop="createTime"
  242. show-overflow-tooltip
  243. >
  244. <template slot-scope="scope">
  245. <span>{{scope.row.packageId}}</span>
  246. </template>
  247. </el-table-column>
  248. <el-table-column label="手机号码" width="110" align="center" show-overflow-tooltip>
  249. <template slot-scope="scope">
  250. <span>{{ scope.row.usedMobile }}</span>
  251. </template>
  252. </el-table-column>
  253. <el-table-column
  254. label="运营商"
  255. width="70"
  256. align="center"
  257. prop="createTime"
  258. show-overflow-tooltip
  259. >
  260. <template slot-scope="scope">
  261. <span>{{ scope.row.mobileOperator }}</span>
  262. </template>
  263. </el-table-column>
  264. <el-table-column
  265. label="归属地"
  266. width="100"
  267. align="center"
  268. prop="createTime"
  269. show-overflow-tooltip
  270. >
  271. <template slot-scope="scope">
  272. <span>{{ scope.row.mobileHome }}</span>
  273. </template>
  274. </el-table-column>
  275. <el-table-column label="发送时间" width="160" align="center">
  276. <template slot-scope="scope">
  277. <span>{{ scope.row.limitedDate }}</span>
  278. </template>
  279. </el-table-column>
  280. <el-table-column label="回调时间" width="160" align="center">
  281. <template slot-scope="scope">
  282. <span>{{ scope.row.lastModifyDate }}</span>
  283. </template>
  284. </el-table-column>
  285. <el-table-column
  286. label="订单状态"
  287. width="90"
  288. align="center"
  289. prop="createTime"
  290. show-overflow-tooltip
  291. >
  292. <template slot-scope="scope">
  293. <el-tag v-if="scope.row.status === 1" size="small">充值中</el-tag>
  294. <el-tag v-if="scope.row.status === 2" size="small">待充值</el-tag>
  295. <el-tag v-if="scope.row.status === 3" size="small">重发</el-tag>
  296. <el-tag v-if="scope.row.status === 4" size="small" >充值成功</el-tag>
  297. <el-tag v-if="scope.row.status === 5" size="small">回调</el-tag>
  298. <el-tag v-if="scope.row.status === 6" size="small">充值失败</el-tag>
  299. </template>
  300. </el-table-column>
  301. <el-table-column
  302. label="用时"
  303. width="90"
  304. align="center"
  305. prop="createTime"
  306. show-overflow-tooltip
  307. >
  308. <template slot-scope="scope">
  309. <span>{{ scope.row.usedTime }}</span>
  310. </template>
  311. </el-table-column>
  312. <el-table-column
  313. label="回调状态"
  314. width="90"
  315. align="center"
  316. prop="createTime"
  317. show-overflow-tooltip
  318. >
  319. <template slot-scope="scope">
  320. <!-- <span>{{ scope.row.dealFlag }}</span> -->
  321. <el-tag v-if="scope.row.dealFlag === '1'" size="small">成功</el-tag>
  322. <el-tag v-if="scope.row.dealFlag === '2'" size="small">失败</el-tag>
  323. </template>
  324. </el-table-column>
  325. <el-table-column
  326. label="通道名称"
  327. width="90"
  328. align="center"
  329. prop="createTime"
  330. show-overflow-tooltip
  331. >
  332. <template slot-scope="scope">
  333. <span>{{ scope.row.channelIdDesc }}</span>
  334. </template>
  335. </el-table-column>
  336. <el-table-column label="商户订单号" width="120" align="center" show-overflow-tooltip>
  337. <template slot-scope="scope">
  338. <span>{{ scope.row.extorderId }}</span>
  339. </template>
  340. </el-table-column>
  341. </el-table>
  342. <!--分页-->
  343. <div class="pagination">
  344. <el-pagination
  345. current-page.sync="body.page"
  346. @size-change="handleSizeChange"
  347. :current-page="body.page"
  348. @current-change="handleCurrentChange"
  349. :page-sizes="[10, 20, 30, 50]"
  350. :page-size="body.size"
  351. layout="total, sizes, prev, pager, next, jumper"
  352. background
  353. :total="total">
  354. </el-pagination>
  355. </div>
  356. </div>
  357. </template>
  358. <script>
  359. import { ordersearch } from '@/api/orderList'
  360. export default {
  361. data() {
  362. return {
  363. Name: '',
  364. // phone:true, //控制批量手机号
  365. tableData:[],
  366. // tableData: [
  367. // { orderId: '1618675202869450462',
  368. // userName: 'test',
  369. // extorderId: 'CD2104253953427952',
  370. // usedMobile: '18820454014',
  371. // applyDateStart: '2021-04-26 00:00:00',
  372. // applyDateEnd: '2021-04-26 23:59:59',
  373. // enterpriseIdDesc: '山东茶蛋信息技术有限公司',
  374. // channelIdDesc: 'BF移动',
  375. // status: '充值成功',
  376. // mobileOperator: '移动',
  377. // flowAmount: '10',
  378. // checkTimeStart: '2021-04-25 00:39:53',
  379. // checkTimeEnd: '2021-04-25 23:39:53',
  380. // dealFlag: '已回调',
  381. // mobileHome: '广东-茂名-移动' },
  382. // { orderId: '1618675202869450462',
  383. // userName: 'test',
  384. // extorderId: 'CD2104253953427952',
  385. // usedMobile: '18820454014',
  386. // applyDateStart: '2021-04-26 00:00:00',
  387. // applyDateEnd: '2021-04-26 23:59:59',
  388. // enterpriseIdDesc: '山东茶蛋信息技术有限公司',
  389. // channelIdDesc: 'BF移动',
  390. // status: '充值成功',
  391. // mobileOperator: '移动',
  392. // flowAmount: '10',
  393. // checkTimeStart: '2021-04-25 00:39:53',
  394. // checkTimeEnd: '2021-04-25 23:39:53',
  395. // dealFlag: '已回调',
  396. // mobileHome: '广东-茂名-移动' },
  397. // { orderId: '1618675202869450462',
  398. // userName: 'test',
  399. // extorderId: 'CD2104253953427952',
  400. // usedMobile: '18820454014',
  401. // applyDateStart: '2021-04-26 00:00:00',
  402. // applyDateEnd: '2021-04-26 23:59:59',
  403. // enterpriseIdDesc: '山东茶蛋信息技术有限公司',
  404. // channelIdDesc: 'BF移动',
  405. // status: '充值成功',
  406. // mobileOperator: '移动',
  407. // flowAmount: '10',
  408. // checkTimeStart: '2021-04-25 00:39:53',
  409. // checkTimeEnd: '2021-04-25 23:39:53',
  410. // dealFlag: '已回调',
  411. // mobileHome: '广东-茂名-移动' },
  412. // { orderId: '1618675202869450462',
  413. // userName: 'test',
  414. // extorderId: 'CD2104253953427952',
  415. // usedMobile: '18820454014',
  416. // applyDateStart: '2021-04-26 00:00:00',
  417. // applyDateEnd: '2021-04-26 23:59:59',
  418. // enterpriseIdDesc: '山东茶蛋信息技术有限公司',
  419. // channelIdDesc: 'BF移动',
  420. // status: '充值成功',
  421. // mobileOperator: '移动',
  422. // flowAmount: '10',
  423. // checkTimeStart: '2021-04-25 00:39:53',
  424. // checkTimeEnd: '2021-04-25 23:39:53',
  425. // dealFlag: '已回调',
  426. // mobileHome: '广东-茂名-移动' }
  427. // ],
  428. applyDateStart:"", //发送时间
  429. checkTimeStart:"", //回调时间
  430. flowAmount:"", //面额乘以10000
  431. body:{
  432. orderId:"",
  433. extorderId:"",
  434. usedMobile:"",
  435. applyDateStart:"",
  436. applyDateEnd:"",
  437. enterpriseIdDesc:"",
  438. channelIdDesc:"",
  439. status:"",
  440. mobileOperator:"",
  441. flowAmount:"",
  442. checkTimeStart:"",
  443. checkTimeEnd:"",
  444. dealFlag:"",
  445. mobileHome:"",
  446. page:1,
  447. size:10,
  448. },
  449. total:0, //总数据
  450. loading:false,
  451. status:[
  452. {id:1,name:"待发"},
  453. {id:2,name:"已发"},
  454. {id:6,name:"成功"},
  455. {id:4,name:"失败"},
  456. {id:5,name:"风控"},
  457. ],
  458. mobileOperator:[
  459. {id:"YD",name:"移动"},
  460. {id:"LT",name:"联通"},
  461. {id:"DX",name:"电信"},
  462. ],
  463. dealFlag:[
  464. {id:"0",name:"运营商处理中"},
  465. {id:"1",name:"待回调"},
  466. {id:"3",name:"以回调"},
  467. {id:"2",name:"无需回调"},
  468. ]
  469. }
  470. },
  471. created(){
  472. let nowDate = new Date()
  473. let date = {
  474. year: nowDate.getFullYear(),
  475. month: nowDate.getMonth() + 1,
  476. date: nowDate.getDate()
  477. }
  478. let systemTime = date.year + '-' + date.month + '-' + date.date
  479. // this.body.applyDateStart = "2021-05-14 + " 00:00:00"
  480. this.applyDateStart = [systemTime + " 00:00:00",systemTime + " 23:59:59"]
  481. this.body.applyDateStart = systemTime + " 00:00:00"
  482. this.body.applyDateEnd = systemTime + " 23:59:59"
  483. // this.body.applyDateEnd = systemTime + " 23:59:59"
  484. // this.
  485. this.getTenantList()
  486. },
  487. methods: {
  488. //获取数据
  489. getTenantList(){
  490. this.loading=true
  491. ordersearch(this.body).then(res=>{
  492. this.loading=false
  493. this.tableData=res.data.data.records
  494. this.total=res.data.data.total
  495. console.log(res.data.data.records)
  496. })
  497. },
  498. //搜索手机号
  499. onphon(){
  500. console.log(this.phone)
  501. },
  502. //搜索面额
  503. changeflow(){
  504. let flow=this.flowAmount;
  505. // let body=this.body.flowAmount;
  506. this.body.flowAmount=flow * 10000;
  507. },
  508. //搜索发送时间
  509. oncustom(){
  510. let applyDateStart = this.applyDateStart;
  511. this.body.applyDateStart = applyDateStart[0]
  512. this.body.applyDateEnd = applyDateStart[1]
  513. // console.log(applyDateStart)
  514. // console.log(this.body.applyDateStart)
  515. },
  516. //搜索回调时间
  517. oncheckTimeStart(){
  518. // checkTimeStart:"",
  519. // checkTimeEnd:"",
  520. let checkTimeStart =this.checkTimeStart
  521. this.body.checkTimeStart= checkTimeStart[0]
  522. this.body.checkTimeEnd=checkTimeStart[1]
  523. },
  524. //搜索状态
  525. changeScope(){
  526. console.log(this.body.status)
  527. },
  528. //运营商
  529. changeoperator(){
  530. console.log(this.body.mobileOperator)
  531. },
  532. //搜索
  533. handleSearch(){
  534. console.log(this.applyDateStart)
  535. this.body.page = 1
  536. if(this.applyDateStart == null){ //发送时间为空时清空 body 里的发送时间
  537. this.body.applyDateEnd = ""
  538. this.body.applyDateStart = ""
  539. }
  540. if(this.checkTimeStart == null){ //回调时间
  541. this.body.checkTimeStart = ""
  542. this.body.checkTimeEnd = ""
  543. }
  544. if(this.flowAmount == null || this.flowAmount == 0){ //面额
  545. this.body.flowAmount = ""
  546. }
  547. this.currentPage="1"
  548. this.getTenantList()
  549. },
  550. //
  551. handleReset(){
  552. },
  553. //分页
  554. handleSizeChange:function(val){
  555. this.body.size=val
  556. this.getTenantList()
  557. },
  558. // 换页
  559. handleCurrentChange: function(val) {
  560. this.body.page = val
  561. this.getTenantList()
  562. },
  563. },
  564. }
  565. </script>
  566. <style scoped>
  567. .textSpan{
  568. position: relative;
  569. top: 0;
  570. font-size: 14px;
  571. font-weight: 600;
  572. color:rgb(87, 86, 86)
  573. }
  574. .stylephone{
  575. display: flex;
  576. }
  577. .marginphone{
  578. padding-top: 9px;
  579. }
  580. .flex{
  581. width: 100%;
  582. display: flex;
  583. flex-direction: row;
  584. margin-bottom: 10px;
  585. /* flex-wrap: wrap; */
  586. /* justify-content: space-evenly; */
  587. }
  588. .w_date{
  589. width: 66%;
  590. }
  591. .w_input{
  592. width:33.33%;
  593. }
  594. .flexend{
  595. display: flex;
  596. justify-content: flex-end;
  597. padding-right: 40px;
  598. }
  599. .phone{
  600. width:66.5% !important ;
  601. z-index: 100;
  602. }
  603. /* .classitem{
  604. background: salmon;
  605. } */
  606. </style>