index.vue 20 KB

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