index1.vue 23 KB

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