index.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623
  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="warning" icon="el-icon-check" plain @click="handleReset">置成功
  191. </el-button>
  192. <el-button class="filter-item" type="success" icon="el-icon-check" plain @click="handleReset">补单
  193. </el-button>
  194. <el-button class="classitem" style="marginRight:50px" type="primary" plain icon="el-icon-star-off" @click="handleReset">导出
  195. </el-button>
  196. <el-button class="filter-item" icon="el-icon-search" type="primary" plain @click="handleSearch">搜索</el-button>
  197. </div>
  198. </div>
  199. <el-table v-loading="loading" :data="tableData" border style="width: 100%">
  200. <el-table-column type="selection" width="40"/>
  201. <el-table-column label="订单号" width="120" align="center" show-overflow-tooltip>
  202. <template slot-scope="scope">
  203. <span>{{ scope.row.orderId }}</span>
  204. </template>
  205. </el-table-column>
  206. <!-- <el-table-column
  207. label="appID"
  208. width="100"
  209. align="center"
  210. prop="createTime"
  211. show-overflow-tooltip
  212. >
  213. <template slot-scope="scope">
  214. <span>{{ scope.row.appId }}</span>
  215. </template>
  216. </el-table-column> -->
  217. <el-table-column
  218. label="客户名称"
  219. width="100"
  220. align="center"
  221. prop="createTime"
  222. show-overflow-tooltip
  223. >
  224. <template slot-scope="scope">
  225. <span>{{ scope.row.customerName }}</span>
  226. </template>
  227. </el-table-column>
  228. <el-table-column
  229. label="面额"
  230. width="70"
  231. align="center"
  232. show-overflow-tooltip
  233. >
  234. <template slot-scope="scope">
  235. <span>{{ scope.row.flowAmount / 10000 }}</span>
  236. </template>
  237. </el-table-column>
  238. <el-table-column
  239. label="产品ID"
  240. width="100"
  241. align="center"
  242. prop="createTime"
  243. show-overflow-tooltip
  244. >
  245. <template slot-scope="scope">
  246. <span>{{scope.row.packageId}}</span>
  247. </template>
  248. </el-table-column>
  249. <el-table-column label="手机号码" width="110" align="center" show-overflow-tooltip>
  250. <template slot-scope="scope">
  251. <span>{{ scope.row.phoneNo }}</span>
  252. </template>
  253. </el-table-column>
  254. <el-table-column
  255. label="运营商"
  256. width="70"
  257. align="center"
  258. prop="createTime"
  259. show-overflow-tooltip
  260. >
  261. <template slot-scope="scope">
  262. <!-- <span>{{ scope.row.phoneOperator }}</span> -->
  263. <el-tag v-if="scope.row.phoneOperator === 2" size="small">电信</el-tag>
  264. <el-tag v-if="scope.row.phoneOperator === 1" size="small">移动</el-tag>
  265. <el-tag v-if="scope.row.phoneOperator === 3" size="small">联通</el-tag>
  266. </template>
  267. </el-table-column>
  268. <el-table-column
  269. label="归属地"
  270. width="100"
  271. align="center"
  272. prop="createTime"
  273. show-overflow-tooltip
  274. >
  275. <template slot-scope="scope">
  276. <span>{{ scope.row.phoneHome }}</span>
  277. </template>
  278. </el-table-column>
  279. <el-table-column label="发送时间" width="170" align="center" show-overflow-tooltip>
  280. <template slot-scope="scope">
  281. <i class="el-icon-time"></i>
  282. <span>{{ scope.row.limitedDate }}</span>
  283. </template>
  284. </el-table-column>
  285. <el-table-column label="回调时间" width="170" align="center" show-overflow-tooltip>
  286. <template slot-scope="scope">
  287. <i v-if="scope.row.lastModifyDate" class="el-icon-time"></i>
  288. <span>{{ scope.row.lastModifyDate }}</span>
  289. </template>
  290. </el-table-column>
  291. <el-table-column
  292. label="订单状态"
  293. width="90"
  294. align="center"
  295. prop="createTime"
  296. show-overflow-tooltip
  297. >
  298. <template slot-scope="scope">
  299. <el-tag v-if="scope.row.status === 2" size="small">充值中</el-tag>
  300. <el-tag v-if="scope.row.status === 1" size="small">待充值</el-tag>
  301. <!-- <el-tag v-if="scope.row.status === 3" size="small">重发</el-tag> -->
  302. <el-tag v-if="scope.row.status === 4" size="small" >充值失败</el-tag>
  303. <!-- <el-tag v-if="scope.row.status === 5" size="small">回调</el-tag> -->
  304. <el-tag v-if="scope.row.status === 6" size="small">充值成功</el-tag>
  305. </template>
  306. </el-table-column>
  307. <el-table-column
  308. label="用时"
  309. width="90"
  310. align="center"
  311. prop="createTime"
  312. show-overflow-tooltip
  313. >
  314. <template slot-scope="scope">
  315. <span>{{ scope.row.usedTime }}</span>
  316. </template>
  317. </el-table-column>
  318. <el-table-column
  319. label="回调状态"
  320. width="90"
  321. align="center"
  322. prop="createTime"
  323. show-overflow-tooltip
  324. >
  325. <template slot-scope="scope">
  326. <!-- <span>{{ scope.row.dealFlag }}</span> -->
  327. <el-tag v-if="scope.row.callbackStatus === 6" size="small">成功</el-tag>
  328. <el-tag v-if="scope.row.callbackStatus === 4" size="small">失败</el-tag>
  329. </template>
  330. </el-table-column>
  331. <el-table-column
  332. label="通道名称"
  333. width="90"
  334. align="center"
  335. prop="createTime"
  336. show-overflow-tooltip
  337. >
  338. <template slot-scope="scope">
  339. <span>{{ scope.row.channelName }}</span>
  340. </template>
  341. </el-table-column>
  342. <el-table-column label="客户订单号" width="120" align="center" show-overflow-tooltip>
  343. <template slot-scope="scope">
  344. <span>{{ scope.row.extorderId }}</span>
  345. </template>
  346. </el-table-column>
  347. <el-table-column label="通道订单号" width="120" align="center" show-overflow-tooltip>
  348. <template slot-scope="scope">
  349. <span>{{ scope.row.gwSeqNo }}</span>
  350. </template>
  351. </el-table-column>
  352. <el-table-column label="通道错误代码" width="120" align="center" show-overflow-tooltip>
  353. <template slot-scope="scope">
  354. <span>{{ scope.row.gwErrorCode }}</span>
  355. </template>
  356. </el-table-column>
  357. <el-table-column label="通道错误原因" width="120" align="center" show-overflow-tooltip>
  358. <template slot-scope="scope">
  359. <span>{{ scope.row.gwStatus }}</span>
  360. </template>
  361. </el-table-column>
  362. </el-table>
  363. <!--分页-->
  364. <div class="pagination">
  365. <el-pagination
  366. current-page.sync="body.page"
  367. @size-change="handleSizeChange"
  368. :current-page="body.page"
  369. @current-change="handleCurrentChange"
  370. :page-sizes="[10, 20, 30, 50]"
  371. :page-size="body.size"
  372. layout="total, sizes, prev, pager, next, jumper"
  373. background
  374. :total="total">
  375. </el-pagination>
  376. </div>
  377. </div>
  378. </template>
  379. <script>
  380. import { ordersearch } from '@/api/orderList'
  381. export default {
  382. data() {
  383. return {
  384. Name: '',
  385. // phone:true, //控制批量手机号
  386. tableData:[],
  387. applyDateStart:"", //发送时间
  388. callbackTimeEnd:"", //回调时间
  389. flowAmount:"", //面额乘以10000
  390. flowAmount1:"", //面额乘以10000
  391. body:{
  392. Id:"",
  393. gwSeqNo:"",
  394. orderId:"",
  395. extorderId:"",
  396. phoneNo:"",
  397. applyDateStart:"",
  398. applyDateEnd:"",
  399. customerName:"",
  400. channelIdDesc:"",
  401. phoneHome:"",
  402. status:"",
  403. phoneOperator:"",
  404. flowAmount:"",
  405. callbackTimeStart:"",
  406. callbackTimeEnd:"",
  407. callbackStatus:"",
  408. mobileHome:"",
  409. page:1,
  410. size:10,
  411. },
  412. total:0, //总数据
  413. loading:false,
  414. status:[
  415. {id:1,name:"待发"},
  416. {id:2,name:"充值中"},
  417. {id:6,name:"成功"},
  418. {id:4,name:"失败"},
  419. ],
  420. mobileOperator:[
  421. {id:1,name:"移动"},
  422. {id:3,name:"联通"},
  423. {id:2,name:"电信"},
  424. ],
  425. dealFlag:[
  426. {id:"6",name:"成功"},
  427. {id:"4",name:"失败"},
  428. ]
  429. }
  430. },
  431. created(){
  432. let nowDate = new Date()
  433. let date = {
  434. year: nowDate.getFullYear(),
  435. month: nowDate.getMonth() + 1,
  436. date: nowDate.getDate()
  437. }
  438. let systemTime = date.year + '-' + date.month + '-' + date.date
  439. // this.body.applyDateStart = "2021-05-14 + " 00:00:00"
  440. this.applyDateStart = [systemTime + " 00:00:00",systemTime + " 23:59:59"]
  441. this.body.applyDateStart = systemTime + " 00:00:00"
  442. this.body.applyDateEnd = systemTime + " 23:59:59"
  443. // this.body.applyDateEnd = systemTime + " 23:59:59"
  444. // this.
  445. this.getTenantList()
  446. },
  447. methods: {
  448. //获取数据
  449. getTenantList(){
  450. this.loading=true
  451. ordersearch(this.body).then(res=>{
  452. this.loading=false
  453. // this.tableData=res.data.data.records
  454. // limitedDate :发送时间
  455. // lastModifyDate :回调
  456. // usedTime :用时
  457. let tableData=res.data.data.records
  458. let arry=tableData.map((res)=>{
  459. if(res.lastModifyDate != null && res.lastModifyDate != ""){
  460. let limitedDate = res.limitedDate
  461. let lastModifyDate =res.lastModifyDate
  462. //发送时间 减去 回调时间
  463. let date = new Date(limitedDate)
  464. let time= date.valueOf()
  465. let modify =new Date(lastModifyDate)
  466. let last = modify.valueOf()
  467. let used = last - time
  468. res.usedTime = used / 1000
  469. }
  470. return res
  471. })
  472. this.tableData=arry
  473. // console.log(arry)
  474. this.total=res.data.data.total
  475. // console.log(res.data.data.records)
  476. })
  477. },
  478. //搜索手机号
  479. onphon(){
  480. console.log(this.phone)
  481. },
  482. //清除面额
  483. changeflow(flow){
  484. this.flowAmount = ""
  485. },
  486. //清除面额
  487. changeflow1(flow){
  488. this.flowAmount1 = ""
  489. },
  490. //搜索发送时间
  491. oncustom(){
  492. let applyDateStart = this.applyDateStart;
  493. this.body.applyDateStart = applyDateStart[0]
  494. this.body.applyDateEnd = applyDateStart[1]
  495. // console.log(applyDateStart)
  496. // console.log(this.body.applyDateStart)
  497. },
  498. //搜索回调时间
  499. oncheckTimeStart(){
  500. // checkTimeStart:"",
  501. // checkTimeEnd:"",
  502. let callbackTimeStart =this.callbackTimeEnd
  503. this.body.callbackTimeStart= callbackTimeStart[0]
  504. this.body.callbackTimeEnd =callbackTimeStart[1]
  505. },
  506. //搜索状态
  507. changeScope(){
  508. console.log(this.body.status)
  509. },
  510. //运营商
  511. changeoperator(){
  512. console.log(this.body.mobileOperator)
  513. },
  514. //搜索
  515. handleSearch(){
  516. this.body.page = 1
  517. if(this.applyDateStart == null){ //发送时间为空时清空 body 里的发送时间
  518. this.body.applyDateEnd = ""
  519. this.body.applyDateStart = ""
  520. }
  521. if(this.callbackTimeEnd == null){ //回调时间
  522. this.body.callbackTimeStart = ""
  523. this.body.callbackTimeEnd = ""
  524. }
  525. //面额前后为空判断
  526. let flowAmount=this.flowAmount * 10000;
  527. let flowAmount1=this.flowAmount1 * 10000;
  528. if(this.flowAmount1 != "" && this.flowAmount != ""){ //面额
  529. this.body.flowAmount = flowAmount + "-" + flowAmount1
  530. }
  531. if(this.flowAmount == "" && this.flowAmount1 == ""){
  532. this.body.flowAmount = ""
  533. // console.log(this.body.flowAmount)
  534. }
  535. else if(this.flowAmount == ""){ //面额
  536. this.body.flowAmount = 0 + "-" + flowAmount1
  537. }
  538. else if(this.flowAmount1 == ""){
  539. this.body.flowAmount = flowAmount + "-" + 10000000
  540. }
  541. this.currentPage="1"
  542. this.getTenantList()
  543. },
  544. //
  545. handleReset(){
  546. },
  547. //分页
  548. handleSizeChange:function(val){
  549. this.body.size=val
  550. this.getTenantList()
  551. },
  552. // 换页
  553. handleCurrentChange: function(val) {
  554. this.body.page = val
  555. this.getTenantList()
  556. },
  557. },
  558. }
  559. </script>
  560. <style scoped>
  561. .textSpan{
  562. position: relative;
  563. top: 0;
  564. font-size: 14px;
  565. font-weight: 600;
  566. color:rgb(87, 86, 86)
  567. }
  568. .stylephone{
  569. display: flex;
  570. }
  571. .marginphone{
  572. padding-top: 9px;
  573. }
  574. .flex{
  575. width: 100%;
  576. display: flex;
  577. flex-direction: row;
  578. margin-bottom: 10px;
  579. /* flex-wrap: wrap; */
  580. /* justify-content: space-evenly; */
  581. }
  582. .w_date{
  583. width: 66%;
  584. }
  585. .w_input{
  586. width:33.33%;
  587. }
  588. .flexend{
  589. display: flex;
  590. justify-content: flex-end;
  591. padding-top:20px;
  592. padding-right: 40px;
  593. }
  594. .phone{
  595. width:66.5% !important ;
  596. z-index: 100;
  597. }
  598. /* .classitem{
  599. background: salmon;
  600. } */
  601. </style>