orderDetails.vue 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  1. <template>
  2. <div>
  3. <div class="container normal-panel">
  4. <el-row :gutter="20">
  5. <el-col :sapn="24">
  6. <span class="title-style">订单详情</span>
  7. </el-col>
  8. <el-col :span="6" class="span-top">
  9. <span>付费订单号:{{list.orderno || '--'}}</span>
  10. </el-col>
  11. <el-col :span="6" class="span-top">
  12. <span >付费状态:
  13. <span v-if="list.ispaid == '0'" style="color: red">未付费</span>
  14. <span v-else-if="list.ispaid == '3'" style="color: #afb0be">已取消</span>
  15. <span v-else-if="list.ispaid == '4'" style="color: #afb0be">已退款</span>
  16. <span v-else-if="list.ispaid == '1'" style="color: green">已付费</span>
  17. </span>
  18. </el-col>
  19. <el-col :span="6" class="span-top">
  20. <span >付费金额(元):
  21. <span style="color: red">{{tool.formatAmount(list.amount,2) || '--'}}</span>
  22. </span>
  23. </el-col>
  24. <el-col :span="6" class="span-top">
  25. <span>付费类型:{{list.sys_payincidence == '1'?'按账号付费':'按主体付费'}}</span>
  26. </el-col>
  27. <el-col :span="6" class="span-top">
  28. <span>付费时间:{{list.paytime || '--'}}</span>
  29. </el-col>
  30. <el-col :span="6" class="span-top">
  31. <span>付费人:{{list.createby || '--'}}</span>
  32. </el-col>
  33. <el-col :span="6" class="span-top">
  34. <span>付款渠道:{{list.paymode || '--'}}</span>
  35. </el-col>
  36. <el-col :span="6" class="span-top">
  37. <span>备注:{{list.remarks || '--'}}</span>
  38. </el-col>
  39. </el-row>
  40. </div>
  41. <div class="container normal-panel" style="margin-top: 20px">
  42. <el-row :gutter="20">
  43. <el-col :sapn="24">
  44. <span class="title-style">付费订单列表</span>
  45. </el-col>
  46. <el-col :span="24" v-if="list.sys_payincidence == '1'">
  47. <el-table
  48. class="table-style"
  49. :data="accountList"
  50. style="width: 100%;margin-top: 20px" border
  51. :height="height ? height : accountList.length <= 4?'260px':accountList.length <= 20?'calc(100vh - 420px)':'calc(100vh - 220px)'"
  52. :cell-style="{height:'40px',color:'#666666',fontWeight:'400'}"
  53. :header-cell-style="{height:'40px',color:'#333',fontWeight:'400',fontSize:'14px',background:'#EEEEEE'}">
  54. <el-table-column
  55. prop="name"
  56. label="账号名称"
  57. >
  58. </el-table-column>
  59. <el-table-column
  60. prop="accountno"
  61. label="账号"
  62. >
  63. </el-table-column>
  64. <el-table-column
  65. prop="partitionname"
  66. label="付费版本"
  67. >
  68. <template slot-scope="scope">
  69. <span >
  70. {{scope.row.partitionname}}
  71. </span>
  72. </template>
  73. </el-table-column>
  74. <el-table-column
  75. prop="price"
  76. label="单价"
  77. >
  78. <template slot-scope="scope">
  79. <span style="color: red">
  80. {{tool.formatAmount(scope.row.price,2)}}
  81. </span>
  82. <el-tag size="small" v-if="scope.row.price === 0" type="warning">优惠抵扣</el-tag>
  83. </template>
  84. </el-table-column>
  85. <el-table-column
  86. prop="begdate"
  87. label="生效时间"
  88. >
  89. </el-table-column>
  90. <el-table-column
  91. prop="enddate"
  92. label="到期时间"
  93. >
  94. </el-table-column>
  95. </el-table>
  96. <div class="container normal-panel" style="text-align:right">
  97. <el-pagination
  98. background
  99. @size-change="handleSizeChange"
  100. @current-change="handleCurrentChange"
  101. :current-page="currentPage"
  102. :page-sizes="[20, 50, 100, 200]"
  103. :page-size="20"
  104. layout="total,sizes, prev, pager, next, jumper"
  105. :total="total">
  106. </el-pagination>
  107. </div>
  108. </el-col>
  109. <el-col :span="24" v-else>
  110. <el-table
  111. class="table-style"
  112. :data="accountList"
  113. style="width: 100%;margin-top: 20px" border
  114. :height="height ? height : accountList.length <= 4?'260px':accountList.length <= 20?'calc(100vh - 420px)':'calc(100vh - 220px)'"
  115. :cell-style="{height:'40px',color:'#666666',fontWeight:'400'}"
  116. :header-cell-style="{height:'40px',color:'#333',fontWeight:'400',fontSize:'14px',background:'#EEEEEE'}">
  117. <el-table-column
  118. prop="agentname"
  119. label="付费主体"
  120. >
  121. </el-table-column>
  122. <el-table-column
  123. prop="partitionname"
  124. label="付费版本"
  125. >
  126. <template slot-scope="scope">
  127. <span >
  128. {{scope.row.partitionname}}
  129. </span>
  130. </template>
  131. </el-table-column>
  132. <el-table-column
  133. prop="price"
  134. label="单价"
  135. >
  136. <template slot-scope="scope">
  137. <span style="color: red">
  138. {{tool.formatAmount(scope.row.price,2)}}
  139. </span>
  140. <el-tag size="small" v-if="scope.row.price === 0" type="warning">优惠抵扣</el-tag>
  141. </template>
  142. </el-table-column>
  143. <el-table-column
  144. prop="begdate"
  145. label="生效时间"
  146. >
  147. </el-table-column>
  148. <el-table-column
  149. prop="enddate"
  150. label="到期时间"
  151. >
  152. </el-table-column>
  153. </el-table>
  154. <div class="container normal-panel" style="text-align:right">
  155. <el-pagination
  156. background
  157. @size-change="handleSizeChange"
  158. @current-change="handleCurrentChange"
  159. :current-page="currentPage"
  160. :page-sizes="[20, 50, 100, 200]"
  161. :page-size="20"
  162. layout="total,sizes, prev, pager, next, jumper"
  163. :total="total">
  164. </el-pagination>
  165. </div>
  166. </el-col>
  167. </el-row>
  168. </div>
  169. </div>
  170. </template>
  171. <script>
  172. export default {
  173. name: "orderDetails",
  174. props:["id"],
  175. data() {
  176. return {
  177. onPayment:true,
  178. list:{},
  179. accountList:[],
  180. height:'',
  181. total:0,
  182. currentPage:0,
  183. auth_data:'',
  184. param:{
  185. "classname": "system.payorder.payorder",
  186. "method": "detail_userlist",
  187. "content": {
  188. "sys_payorderid": "",
  189. "pageNumber": 1,
  190. "pageSize": 20,
  191. "where": {
  192. "nocache":true,
  193. "condition": ""
  194. }
  195. }
  196. }
  197. }
  198. },
  199. methods:{
  200. /*获取订单详情*/
  201. async queryData(){
  202. console.log(this.id)
  203. const res = await this.$api.requested({
  204. "classname": "system.payorder.payorder",
  205. "method": "detail",
  206. "content": {
  207. "nocache":true,
  208. "sys_payorderid": this.id
  209. },
  210. })
  211. console.log(res,'订单详情')
  212. this.list = res.data
  213. },
  214. /*获取账号列表*/
  215. async queryAccount(){
  216. this.param.content.sys_payorderid = this.id
  217. const res = await this.$api.requested(this.param)
  218. console.log(res,'账号列表')
  219. this.accountList = res.data
  220. this.total = res.total
  221. this.currentPage = res.pageNumber
  222. },
  223. handleSizeChange(val) {
  224. // console.log(`每页 ${val} 条`);
  225. this.param.content.pageSize = val
  226. this.queryAccount()
  227. },
  228. handleCurrentChange(val) {
  229. // console.log(`当前页: ${val}`);
  230. this.param.content.pageNumber = val
  231. this.queryAccount()
  232. },
  233. onPay(){
  234. let that = this
  235. that.$refs.payment.dialogVisible = true
  236. this.$refs.payment.queryAccount()
  237. this.$refs.payment.queryData()
  238. this.$refs.payment.queryCode(this.list.orderno)
  239. console.log(this)
  240. this.payChangeFun(function(a) {
  241. console.log(a)
  242. a.result = () => {
  243. that.$refs.payment.dialogVisible = false
  244. /*this.$router.push('/main')*/
  245. that.queryAuth()
  246. that.queryData()
  247. }
  248. })
  249. },
  250. async queryAuth(){
  251. const res = await this.$api.requested({
  252. "classname": "system.payorder.payorder",
  253. "method": "query_userauth",
  254. "content": {
  255. "nocache":true
  256. }
  257. })
  258. this.auth_data = res.data
  259. console.log(this.auth_data)
  260. sessionStorage.setItem('module_info', JSON.stringify(this.auth_data))
  261. }
  262. },
  263. mounted() {
  264. /* this.queryData()
  265. this.queryAccount()*/
  266. }
  267. }
  268. </script>
  269. <style scoped>
  270. .title-style{
  271. font-weight: bold;
  272. font-size: 15px;
  273. }
  274. .span-top{
  275. margin-top: 20px;
  276. font-size: 15px;
  277. }
  278. </style>