10.10综合交易所原始源码-管理后台
admin
2026-01-06 a3cc41349752d6fb067df2a58e4e4b723a915f21
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
<template>
  <el-dialog
    title="手动转账"
    :close-on-click-modal="false"
    :visible.sync="visible"
    :append-to-body="true"
    width="700px"
    @close="handClose"
  >
    <el-form
      :model="dataForm"
      :rules="dataRule"
      ref="dataForm"
      @keyup.enter.native="dataFormSubmit()"
      label-width="130px"
      label-position="left"
    >
    <el-form-item label="选择用户支付方式" prop="id">
        <el-select
          v-model="uuid"
          class="speacSelect"
          @change="changeVal"
          placeholder="请选择"
        >
          <el-option
            v-for="item in payments"
            :key="item.uuid"
            :label="item.methodName + '['+item.paramValue1+']'"
            :value="item.uuid"
          >
          </el-option>
        </el-select>
      </el-form-item>
      <div v-for="(item,index) in payments" :key="index" v-show="item.uuid == uuid">
        <el-form-item label="支付方式类型" prop="">
        <el-input v-model="item.methodTypeName" disabled
                  placeholder="支付方式类型">
        </el-input>
      </el-form-item>
      <el-form-item label="支付方式名称" prop="">
        <el-input v-model="item.methodName" disabled
                  placeholder="支付方式名称">
        </el-input>
      </el-form-item>
      <el-form-item label="支付方式图片" prop="">
        <img :src="item.methodImg" alt="" width="100">
      </el-form-item>
      <el-form-item label="真实姓名" prop="">
        <el-input v-model="item.realName" disabled
                  placeholder="真实姓名">
        </el-input>
      </el-form-item>
      <el-form-item :label="item.paramName1" v-if ='item.paramValue1' prop="">
        <el-input v-model="item.paramValue1" disabled
                  placeholder="">
        </el-input>
      </el-form-item>
      <el-form-item :label="item.paramName2" v-if ='item.paramValue2' prop="">
        <el-input v-model="item.paramValue2" disabled
                  placeholder="">
        </el-input>
      </el-form-item>
      <el-form-item :label="item.paramName3" v-if ='item.paramValue3' prop="">
        <el-input v-model="item.paramValue3" disabled
                  placeholder="">
        </el-input>
      </el-form-item>
      <el-form-item :label="item.paramName4" v-if ='item.paramValue4' prop="">
        <el-input v-model="item.paramValue4" disabled
                  placeholder="">
        </el-input>
      </el-form-item>
      <el-form-item :label="item.paramName5" v-if ='item.paramValue5' prop="">
        <el-input v-model="item.paramValue5" disabled
                  placeholder="">
        </el-input>
      </el-form-item>
      <el-form-item :label="item.paramName6" v-if ='item.paramValue6' prop="">
        <el-input v-model="item.paramValue6" disabled
                  placeholder="">
        </el-input>
      </el-form-item>
      <el-form-item :label="item.paramName7" v-if ='item.paramValue7' prop="">
        <el-input v-model="item.paramValue7" disabled
                  placeholder="">
        </el-input>
      </el-form-item>
      <el-form-item :label="item.paramName8" v-if ='item.paramValue8' prop="">
        <el-input v-model="item.paramValue8" disabled
                  placeholder="">
        </el-input>
      </el-form-item>
      <el-form-item :label="item.paramName9" v-if ='item.paramValue9' prop="">
        <el-input v-model="item.paramValue9" disabled
                  placeholder="">
        </el-input>
      </el-form-item>
      <el-form-item :label="item.paramName10" v-if ='item.paramValue10' prop="">
        <el-input v-model="item.paramValue10" disabled
                  placeholder="">
        </el-input>
      </el-form-item>
      <el-form-item :label="item.paramName11" v-if ='item.paramValue11' prop="">
        <el-input v-model="item.paramValue11" disabled
                  placeholder="">
        </el-input>
      </el-form-item>
      <el-form-item :label="item.paramName12" v-if ='item.paramValue12' prop="">
        <el-input v-model="item.paramValue12" disabled
                  placeholder="">
        </el-input>
      </el-form-item>
      <el-form-item :label="item.paramName13" v-if ='item.paramValue13' prop="">
        <el-input v-model="item.paramValue13" disabled
                  placeholder="">
        </el-input>
      </el-form-item>
      <el-form-item :label="item.paramName14" v-if ='item.paramValue14' prop="">
        <el-input v-model="item.paramValue14" disabled
                  placeholder="">
        </el-input>
      </el-form-item>
      <el-form-item :label="item.paramName15" v-if ='item.paramValue15' prop="">
        <el-input v-model="item.paramValue15" disabled
                  placeholder="">
        </el-input>
      </el-form-item>
      </div>
      <el-form-item label="支付金额" prop="">
        <el-input v-model="dataForm.amount" disabled
                  placeholder="支付金额">
                  <template v-slot:append>
                <span>{{dataForm.currency}}</span>
              </template>
        </el-input>
      </el-form-item>
      <el-form-item label="到账数量" prop="">
        <el-input v-model="dataForm.coin_amount" disabled
                  placeholder="到账数量">
                  <template v-slot:append>
                <span>{{dataForm.symbol}}</span>
              </template>
        </el-input>
      </el-form-item>
      <el-form-item label-position="left" label="登录人资金密码" prop="safeword">
        <el-input v-model="dataForm.safeword" type="password"
                  placeholder="登录人资金密码">
        </el-input>
      </el-form-item>
    </el-form>
    <span slot="footer" class="dialog-footer">
      <el-button @click="visible = false">关闭</el-button>
      <el-button type="primary" @click="dataFormSubmit()">确定</el-button>
    </span>
  </el-dialog>
</template>
 
<script>
import { Debounce } from "@/utils/debounce";
import { encrypt } from '@/utils/crypto'
export default {
  data() {
    return {
      stock: "",
      visible: false,
      dialogFormVisible: true,
      paramsDelet: false,
      parameters: false,
      payments:[],
      order_no:'',
      methodConfigId:'',
      type: "", //type:'forex', //forex->外汇,commodities->大宗商品,指数/ETF->indices, A-stocks->A股, HK-stocks->港股.US-stocks->美股,cryptos->虚拟货币
      menuList: [],
      options: [],
      row: "",
      uuid:'',
      dataForm: {
        safeword: "",
        amount:'',
        coin_amount:'',
        currency:'',
        symbol:'',
      },
      dataRule: {
        safeword:[
          { required: true, message: '资金密码不能为空', trigger: 'blur' },
          ],
      },
      page: {
        total: 0, // 总页数
        currentPage: 1, // 当前页数
        pageSize: 10, // 每页显示多少条
      },
      dataList: [],
      data: {},
    };
  },
  created() {},
  components: {},
  methods: {
    init(row) {
      this.order_no = row.order_no
      this.dataForm.amount = row.amount
      this.dataForm.coin_amount = row.coin_amount
      this.dataForm.currency = row.currency
      this.dataForm.symbol = row.symbol
      //this.dataForm = { ...row };
      this.getOrderPayments()
      this.visible = true;
      // this.dialogFormVisible = false
    },
    handClose() {
      //this.tableOption = {};
      this.$data.dataForm=JSON.parse(JSON.stringify(this.$options.data().dataForm))
      this.$nextTick(() => {
          this.$refs['dataForm'].clearValidate() // 清除表单验证
        })
      // this.optionsTwo.value = ''
      // this.options.value = ''
    },
 
    changeVal(val) {
      //console.log(val)
      this.$forceUpdate(); 
      //this.uid = data.data
    },
    getOrderPayments(){
      this.$http({
          url: this.$http.adornUrl(`/c2cOrder/getOrderPayments`),
          method:'post',
          data: this.$http.adornData({
            //safeword:encrypt(this.dataForm.safeword),
            order_no:this.order_no,
          })
        }).then(({ data }) => {
          if(data.code==0){
            this.payments = data.data.payments
            this.uuid=this.payments[0].uuid
          }else{
            this.$message({
            message: data.msg,
            type: 'error',
            duration: 1500,
            onClose: () => {
            }
          })
          }
 
        })
    },
        // 表单提交
        dataFormSubmit: Debounce(function () {
        this.$refs['dataForm'].validate((valid) => {
        if (!valid) {
          return
        }
        this.$http({
          url: this.$http.adornUrl(`/c2cOrder/orderPay`),
          method:'post',
          data: this.$http.adornData({
            safeword:encrypt(this.dataForm.safeword),
            order_no:this.order_no,
            payment_method_id_order_pay:this.uuid
          })
        }).then(({ data }) => {
          if(data.code==0){
            this.$message({
            message: '操作成功',
            type: 'success',
            duration: 1500,
            onClose: () => {
              this.visible = false
              this.$emit('refreshDataList', this.page)
            }
          })
          }else{
            this.$message({
            message: data.msg,
            type: 'error',
            duration: 1500,
            onClose: () => {
            }
          })
          }
 
        })
      })
    }),
  },
};
</script>
 
<style scoped>
 
.speacSelect{
  width: 530px;
}
</style>