setPas.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <template>
  2. <div class="order-wrapper">
  3. <!-- <breadcrumb :item-name="['订单管理', '订单列表']"></breadcrumb> -->
  4. <el-card >
  5. <div class="wrap">
  6. <el-form :model="form" style="width: 500px;">
  7. <el-form-item label="新交易密码" :label-width="formLabelWidth">
  8. <el-input v-model="form.newpassword" type="password" maxlength="30" minlength="6" placeholder="请输入新交易密码(6~30位任意字符)" width="300px"></el-input>
  9. </el-form-item>
  10. <el-form-item label="旧交易密码" :label-width="formLabelWidth">
  11. <el-input v-model="form.oldpassword" type="password" maxlength="30" minlength="6" placeholder="请输入旧交易密码(如无则不需要填写)"></el-input>
  12. </el-form-item>
  13. </el-form>
  14. <div class="dialog-footer">
  15. <el-button @click="dialogTableVisible = false">取 消</el-button>
  16. <el-button type="primary" @click="goBuy">确 定</el-button>
  17. </div>
  18. </div>
  19. </el-card>
  20. </div>
  21. </template>
  22. <script>
  23. import { setTransaction } from '@/request/agent.js'
  24. export default {
  25. name: 'Order',
  26. data() {
  27. return {
  28. formLabelWidth: '120px',
  29. form: {
  30. newpassword: '',
  31. oldpassword: ''
  32. },
  33. dialogTableVisible: false,
  34. queryInfo: {
  35. keyword: '',
  36. page: 1,
  37. limit: 10
  38. },
  39. list: [],
  40. total: 0,
  41. loading: false,
  42. }
  43. },
  44. created() {
  45. },
  46. methods: {
  47. openBuy() {
  48. this.dialogTableVisible = true
  49. },
  50. goBuy() {
  51. let that = this
  52. if(!that.form.newpassword) {
  53. return that.$msg.error('请输入新交易密码')
  54. }
  55. // if(!that.transaction) {
  56. // return that.$msg.error('请输入交易密码')
  57. // }
  58. setTransaction(that.form).then(res => {
  59. console.log(res);
  60. return that.$msg.success('交易密码设置成功')
  61. })
  62. },
  63. getList() {
  64. let that = this
  65. if (that.loading) {
  66. return
  67. }
  68. that.loading = true
  69. },
  70. handleSizeChange(newPageSize) {
  71. this.queryInfo.limit = newPageSize
  72. this.getList()
  73. },
  74. handleCurrentChange(newPageNum) {
  75. this.queryInfo.page = newPageNum
  76. this.getList()
  77. },
  78. },
  79. }
  80. </script>
  81. <style scoped>
  82. .dialog-footer {
  83. display: flex;
  84. justify-content: flex-end;
  85. width: 500px;
  86. }
  87. /deep/ .el-card__body {
  88. display: flex;
  89. justify-content: center;
  90. align-items: center;
  91. }
  92. </style>