doum
昨天 b29d7b6bbe8256d5e95fb878adf06ffa9abb449a
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
<template>
  <GlobalWindow
    :title="title"
    width="60%"
    :visible.sync="visible"
    :confirm-working="isWorking"
    @confirm="confirm"
  >
    <div class="header">
      <div  class="header-b">订单信息</div>
      <div class="info-item"  >
        <div class="info-item-a">订单金额:<span class="orange"> ¥{{((form.order.money||0)/100).toFixed(2)}}元</span></div>
        <div class="info-item-a">订单编号:<span>{{form.order.id }}</span></div>
        <div class="info-item-a">付款人:<span>{{form.order.name +'-' + form.order.phone}}</span></div>
      </div>
    </div>
    <el-form :model="form" ref="form" :rules="rules">
      <p class="tip-warn" ><i class="el-icon-warning"></i>说明:操作当前可退金额<span class="red">¥{{((form.balance||0)/100).toFixed(2)}}元</span>,请谨慎操作!</p>
      <el-form-item label="退款金额" prop="money">
        <el-input v-model="form.money" type="number" placeholder="退款金额" v-trim><template s></template></el-input>
      </el-form-item>
      <el-form-item label="备注" prop="remark">
        <el-input v-model="form.remark" type="textarea" placeholder="请输入备注" v-trim/>
      </el-form-item>
    </el-form>
  </GlobalWindow>
</template>
 
<script>
import BaseOpera from '@/components/base/BaseOpera'
import GlobalWindow from '@/components/common/GlobalWindow'
export default {
  name: 'OperaOrdersWindow',
  extends: BaseOpera,
  components: { GlobalWindow },
  data () {
    return {
      // 表单数据
      form: {
        id: null,
        money: '',
        remark: '',
        orderId: '',
        balance: 0,
        order:{}
      },
      // 验证规则
      rules: {
        money: [{ required: true, message: '请输入退款金额' }]
      }
    }
  },
  created () {
    this.config({
      api: '/business/refund',
      'field.id': 'id'
    })
  }
}
</script>
 
<style scoped  lang="scss">
.table-pagination{
  position: fixed !important;
  bottom: 50px;
}
.header-b{
  display: inline-block;
  font-size: 16px;
  font-weight: bold;
}
.header-red-btn{
  display: inline-block;
  font-size: 12px;
  background-color:  red;
  padding: 2px 10px 3px 10px;
  margin-left: 20px;
  color: white;
  cursor: pointer;
  border-radius: 5px ;
}
.header-blue-btn{
  display: inline-block;
  font-size: 12px;
  background-color:  #216EEE;
  padding: 2px 10px 3px 10px;
  margin-left: 20px;
  color: white;
  cursor: pointer;
  border-radius: 5px ;
}
.header-grey{
  display: inline-block;
  font-size: 12px;
  border: 1px solid grey;
  padding: 2px 10px;
  margin-left: 20px;
  color: grey;
  border-radius: 5px ;
}
.header-orange{
  display: inline-block;
  font-size: 12px;
  border: 1px solid orange;
  padding: 2px 10px;
  margin-left: 20px;
  color: orange;
  border-radius: 5px ;
}
.header-btn{
  display: inline-block;
  border: none;
  padding: 2px 10px;
  margin-left: 20px;
}
.info-item{
  display: flex;
  width: 100%;
  margin: 15px;
}
.info-item-a{
  flex: 1;
  font-size: 14px;
 
}
.info-item-a span{
}
.info-item-a  .btn{
  font-size: 12px !important;
  cursor: pointer !important;
}
</style>