作者 shenhailong

用户水费充值 生成订单

@@ -30,31 +30,25 @@ @@ -30,31 +30,25 @@
30 style="width: 100%"> 30 style="width: 100%">
31 <el-table-column prop="ordernumber" label="订单号" width="180"> 31 <el-table-column prop="ordernumber" label="订单号" width="180">
32 </el-table-column> 32 </el-table-column>
33 - <el-table-column  
34 - prop="payuserid"  
35 - label="用户编号"  
36 - width="100"> 33 +
  34 + <el-table-column prop="payuserid" label="用户编号" width="100">
37 </el-table-column> 35 </el-table-column>
38 - <el-table-column  
39 - prop="payusername"  
40 - label="用户名称"  
41 - width="90"> 36 +
  37 + <el-table-column prop="payusername" label="缴费用户" width="100">
42 </el-table-column> 38 </el-table-column>
43 - <el-table-column  
44 - prop="paylocationname"  
45 - label="房间号码"  
46 - width="100"> 39 +
  40 + <el-table-column prop="paylocationname" label="房间号码" width="150">
47 </el-table-column> 41 </el-table-column>
48 - <el-table-column  
49 - prop="paytime"  
50 - label="充值日期"  
51 - width="160"> 42 +
  43 + <el-table-column prop="paytypeaddress" label="房间号码" width="200">
52 </el-table-column> 44 </el-table-column>
53 - <el-table-column  
54 - prop="payfees"  
55 - label="充值金额"  
56 - width="100"> 45 +
  46 + <el-table-column prop="paytime" label="充值日期" width="160">
  47 + </el-table-column>
  48 +
  49 + <el-table-column prop="payfees" label="充值金额" width="100">
57 </el-table-column> 50 </el-table-column>
  51 +
58 <el-table-column prop="paytype" label="充值类型" width="100"> 52 <el-table-column prop="paytype" label="充值类型" width="100">
59 <template slot-scope="scope"> 53 <template slot-scope="scope">
60 <div v-if="scope.row.paytype === false" style="color:#20a0ff">水</div> 54 <div v-if="scope.row.paytype === false" style="color:#20a0ff">水</div>
@@ -62,12 +56,6 @@ @@ -62,12 +56,6 @@
62 </template> 56 </template>
63 </el-table-column> 57 </el-table-column>
64 58
65 - <el-table-column prop="payfesstype" label="支付方式" width="100">  
66 - <template slot-scope="scope">  
67 - <div v-if="scope.row.payfesstype === false" style="color:#42d885">微信</div>  
68 - <div v-else="scope.row.payfesstype === true" style="color: #20a0ff">支付宝</div>  
69 - </template>  
70 - </el-table-column>  
71 <el-table-column prop="paystatus" label="支付状态" width="100"> 59 <el-table-column prop="paystatus" label="支付状态" width="100">
72 <template slot-scope="scope"> 60 <template slot-scope="scope">
73 <div v-if="scope.row.payfesstype === false" style="color:#ff4d51">未完成</div> 61 <div v-if="scope.row.payfesstype === false" style="color:#ff4d51">未完成</div>
@@ -76,10 +64,9 @@ @@ -76,10 +64,9 @@
76 </el-table-column> 64 </el-table-column>
77 <el-table-column 65 <el-table-column
78 fixed="right" 66 fixed="right"
79 - label="操作"  
80 - > 67 + label="操作">
81 <template slot-scope="scope" align="center" class-name="small-padding fixed-width" > 68 <template slot-scope="scope" align="center" class-name="small-padding fixed-width" >
82 - <el-button @click="Pay(scope.row)" type="primary" size="mini">去完成</el-button> 69 + <!--<el-button @click="Pay(scope.row)" type="primary" size="mini">去完成</el-button>-->
83 <el-button type="primary" @click="payDelete(scope.$index,scope.row)" size="small">移除订单</el-button> 70 <el-button type="primary" @click="payDelete(scope.$index,scope.row)" size="small">移除订单</el-button>
84 </template> 71 </template>
85 </el-table-column> 72 </el-table-column>
@@ -43,6 +43,7 @@ @@ -43,6 +43,7 @@
43 </el-col> 43 </el-col>
44 </el-form> 44 </el-form>
45 45
  46 +
46 <el-form :model="waterForm" :rules="rules" ref="waterForm" label-width="180px" :label-position="labelPosition"> 47 <el-form :model="waterForm" :rules="rules" ref="waterForm" label-width="180px" :label-position="labelPosition">
47 <input type="hidden" v-model="waterForm.wmId" /> 48 <input type="hidden" v-model="waterForm.wmId" />
48 <el-col :span="24"> 49 <el-col :span="24">
@@ -87,7 +88,6 @@ @@ -87,7 +88,6 @@
87 import loginUserInfo from '@/api/base' 88 import loginUserInfo from '@/api/base'
88 import {getList, add} from '../../api/empt/userPayOrder'; 89 import {getList, add} from '../../api/empt/userPayOrder';
89 import ElCol from "element-ui/packages/col/src/col"; 90 import ElCol from "element-ui/packages/col/src/col";
90 -  
91 export default { 91 export default {
92 components: {ElCol}, 92 components: {ElCol},
93 data() { 93 data() {
@@ -106,7 +106,9 @@ @@ -106,7 +106,9 @@
106 payTime:'', 106 payTime:'',
107 subtraction:'', 107 subtraction:'',
108 wmId:'', 108 wmId:'',
109 - payFees:'' 109 + payFees:'',
  110 + realName:'',
  111 + userId:''
110 }, 112 },
111 rules:{ 113 rules:{
112 payType: [ 114 payType: [
@@ -144,6 +146,8 @@ @@ -144,6 +146,8 @@
144 } else { 146 } else {
145 this.waterForm = resData[i]; 147 this.waterForm = resData[i];
146 this.waterForm.payTime = new Date(); 148 this.waterForm.payTime = new Date();
  149 + this.waterForm.realName = JSON.parse(sessionStorage.getItem('user')).realname;
  150 + this.waterForm.userId = JSON.parse(sessionStorage.getItem('user')).userId;
147 } 151 }
148 } 152 }
149 } else { 153 } else {
@@ -182,8 +186,6 @@ @@ -182,8 +186,6 @@
182 this.$confirm('确认充值吗?', '提示', {}).then(() => { 186 this.$confirm('确认充值吗?', '提示', {}).then(() => {
183 let para = Object.assign({}, this.waterForm); 187 let para = Object.assign({}, this.waterForm);
184 add(para).then((res) => { 188 add(para).then((res) => {
185 - console.log(res.data.code)  
186 - console.log(res)  
187 this.addLoading = false; 189 this.addLoading = false;
188 if (res.data.code == 200) { 190 if (res.data.code == 200) {
189 this.$message({ 191 this.$message({