payment.vue 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. <template>
  2. <div>
  3. <el-dialog
  4. title="待付费订单"
  5. :visible.sync="dialogVisible"
  6. width="900px"
  7. @close="onClose">
  8. <el-row :gutter="20" style="margin-top: -20px">
  9. <el-col :span="24" >
  10. <span class="span_title">订单信息</span>
  11. </el-col>
  12. <el-col :span="24">
  13. <div class="div_border">
  14. <el-col :span="6" class="div_span_top">
  15. <span>付费订单号:{{list.orderno}}</span>
  16. </el-col>
  17. <el-col :span="6" class="div_span_top">
  18. <span>付费状态:
  19. <span v-if="list.ispaid == '0' || list.ispaid == '2'" style="color: red">未付费</span>
  20. <span v-else>已付费</span>
  21. </span>
  22. </el-col>
  23. <el-col :span="6" class="div_span_top">
  24. <span>付费金额(元):
  25. <span style="color: red"> {{tool.formatAmount(list.amount,2)}}</span>
  26. </span>
  27. </el-col>
  28. <el-col :span="6" class="div_span_top">
  29. <span>付费版本:{{list.partitionname}}</span>
  30. </el-col>
  31. <el-col :span="6" class="div_span_top">
  32. <span>付费类型:{{list.sys_payincidence == '1'?'按账号付费':'按主体付费'}}</span>
  33. </el-col>
  34. <el-col :span="12" class="div_span_top">
  35. <span>备注:{{list.remarks}}</span>
  36. </el-col>
  37. </div>
  38. </el-col>
  39. </el-row>
  40. <el-row :gutter="20" style="margin-top: 20px">
  41. <el-col :span="24" >
  42. <span class="span_title">付费版本:
  43. <span style="color: #4f7bfd;font-weight: bold;font-size: 17px">{{list.partitionname}}</span>
  44. </span>
  45. </el-col>
  46. <el-col :span="24" class="div_span_top">
  47. <tableLayout :layout="tablecolsModule" :data="moduleList" :opwidth="200" :custom="true" :height="200 + 'px'" >
  48. <template v-slot:customcol="scope">
  49. <p >{{scope.column.data[scope.column.columnname] || '--'}}</p>
  50. </template>
  51. </tableLayout>
  52. </el-col>
  53. </el-row>
  54. <el-row :gutter="20" style="margin-top: 20px">
  55. <el-col :span="24" >
  56. <span class="span_title">付费账号:
  57. </span>
  58. </el-col>
  59. <el-col :span="24" class="div_span_top" v-if="list.sys_payincidence == '1'">
  60. <tableLayout :layout="tablecolsAccount" :data="accountList" :opwidth="200" :custom="true" :height="200 + 'px'">
  61. <template v-slot:customcol="scope">
  62. <p >{{scope.column.data[scope.column.columnname] || '--'}}</p>
  63. </template>
  64. </tableLayout>
  65. </el-col>
  66. <el-col :span="24" class="div_span_top" v-else>
  67. <tableLayout :layout="tablecolsMain" :data="accountList" :opwidth="200" :custom="true" :height="200 + 'px'" >
  68. <template v-slot:customcol="scope">
  69. <p >{{scope.column.data[scope.column.columnname] || '--'}}</p>
  70. </template>
  71. </tableLayout>
  72. </el-col>
  73. </el-row>
  74. <el-row :gutter="20" style="margin-top: 20px">
  75. <el-col :span="24" >
  76. <span class="span_title">付费二维码
  77. </span>
  78. </el-col>
  79. <el-col :span="24">
  80. <vue-qr style="margin-left: 35%" :text="code_url" :size="200"></vue-qr>
  81. </el-col>
  82. </el-row>
  83. <span slot="footer" class="dialog-footer ">
  84. <el-button style="margin-right: 45% !important;" @click="onClose" size="small" class="normal-btn-width">取 消</el-button>
  85. </span>
  86. </el-dialog>
  87. </div>
  88. </template>
  89. <script>
  90. import tableLayout from '@/components/table/index2.vue'
  91. import vueQr from 'vue-qr'
  92. export default {
  93. name: "payment",
  94. props:['data'],
  95. components:{tableLayout,vueQr},
  96. data() {
  97. return {
  98. dialogVisible:false,
  99. list:{},
  100. accountList:[],
  101. param:{
  102. "classname": "system.payorder.payorder",
  103. "method": "detail_userlist",
  104. "content": {
  105. "sys_payorderid": '',
  106. "pageNumber": 1,
  107. "pageSize": 99,
  108. "where": {
  109. "condition": ""
  110. }
  111. }
  112. },
  113. tablecolsModule:[],
  114. moduleList:[],
  115. tablecolsAccount:[],
  116. tablecolsMain:[],
  117. code_url:''
  118. }
  119. },
  120. methods:{
  121. /*获取订单详情*/
  122. async queryData(id){
  123. const res = await this.$api.requested({
  124. "classname": "system.payorder.payorder",
  125. "method": "detail",
  126. "content": {
  127. "sys_payorderid": this.$route.query.id || id
  128. },
  129. })
  130. console.log(res,'订单详情付款')
  131. this.list = res.data
  132. this.moduleList = res.data.systemapp
  133. },
  134. /*获取账号列表*/
  135. async queryAccount(id){
  136. this.param.content.sys_payorderid = this.$route.query.id || id
  137. const res = await this.$api.requested(this.param)
  138. console.log(res,'账号列表付款')
  139. this.accountList = res.data
  140. },
  141. /*获取付费二维码*/
  142. async queryCode(orderno){
  143. const res = await this.$api.requested({
  144. "classname": "system.payment.wechatpay",
  145. "method": "createNativeWechatOrder",
  146. "content": {
  147. "orderno": orderno
  148. },
  149. })
  150. console.log(res,'付费二维码')
  151. this.code_url = res.data.code_url
  152. },
  153. onClose(){
  154. this.dialogVisible = false
  155. this.$emit('closeSuccess')
  156. }
  157. },
  158. mounted() {
  159. },
  160. created() {
  161. this.tablecolsModule = this.tool.tabelCol(this.$route.name).moduleTable.tablecols
  162. this.tablecolsAccount = this.tool.tabelCol(this.$route.name).payAccountTable.tablecols
  163. this.tablecolsMain = this.tool.tabelCol(this.$route.name).payMainbodyTable.tablecols
  164. }
  165. }
  166. </script>
  167. <style scoped>
  168. /deep/ .el-dialog__title {
  169. line-height: 24px;
  170. font-size: 15px;
  171. color: #303133;
  172. font-weight: bold;
  173. }
  174. .span_title{
  175. font-weight: bold;
  176. color: #303133;
  177. }
  178. .div_border{
  179. margin-top: 20px;
  180. border: 2px dashed #c9c3c3;
  181. width: 100%;
  182. height: 100px;
  183. border-radius: 5px;
  184. }
  185. .div_span_top{
  186. margin-top: 20px;
  187. }
  188. </style>