|
@@ -1,38 +1,88 @@
|
1
|
1
|
<template>
|
2
|
|
- <el-dialog width="854px" title="收费单" class="chargeDialog" :visible.sync="visibility" :close-on-click-modal="isClose"
|
3
|
|
- :close-on-press-escape="isClose">
|
4
|
|
-
|
5
|
|
- <el-form :model="form" ref="formValue" label-width="100px">
|
6
|
|
-
|
7
|
|
- <el-form-item label="日期:" style="width:100%;">
|
8
|
|
- <div>{{record_date}}</div>
|
|
2
|
+ <el-dialog
|
|
3
|
+ width="854px"
|
|
4
|
+ title="收费单"
|
|
5
|
+ class="chargeDialog"
|
|
6
|
+ :visible.sync="visibility"
|
|
7
|
+ :close-on-click-modal="isClose"
|
|
8
|
+ :close-on-press-escape="isClose"
|
|
9
|
+ >
|
|
10
|
+ <el-form :model="form" ref="formValue" label-width="100px">
|
|
11
|
+ <el-form-item label="日期:" style="width: 100%">
|
|
12
|
+ <div>{{ record_date }}</div>
|
9
|
13
|
</el-form-item>
|
10
|
14
|
|
11
|
|
- <el-form-item label="总计:" prop="name" :validate-event="is_Name" style="width:33%;">
|
12
|
|
- <el-input style="color: black" type="number" v-model="form.total" :disabled="true"></el-input>
|
|
15
|
+ <el-form-item
|
|
16
|
+ label="总计:"
|
|
17
|
+ prop="name"
|
|
18
|
+ :validate-event="is_Name"
|
|
19
|
+ style="width: 33%"
|
|
20
|
+ >
|
|
21
|
+ <el-input
|
|
22
|
+ style="color: black"
|
|
23
|
+ type="number"
|
|
24
|
+ v-model="form.total"
|
|
25
|
+ :disabled="true"
|
|
26
|
+ ></el-input>
|
13
|
27
|
</el-form-item>
|
14
|
|
- <el-form-item label="医保:" prop="name" :validate-event="is_Name" style="width:33%;">
|
15
|
|
- <el-input style="color: black" type="number" v-model="form.medical_insurance_price" :disabled="true"></el-input>
|
|
28
|
+ <el-form-item
|
|
29
|
+ label="医保:"
|
|
30
|
+ prop="name"
|
|
31
|
+ :validate-event="is_Name"
|
|
32
|
+ style="width: 33%"
|
|
33
|
+ >
|
|
34
|
+ <el-input
|
|
35
|
+ style="color: black"
|
|
36
|
+ type="number"
|
|
37
|
+ v-model="form.medical_insurance_price"
|
|
38
|
+ :disabled="true"
|
|
39
|
+ ></el-input>
|
16
|
40
|
</el-form-item>
|
17
|
41
|
|
18
|
|
-
|
19
|
|
- <el-form-item label="自费:" prop="age" :validate-event="is_Name" style="width:33%;">
|
20
|
|
- <el-input style="color: black" type="number" v-model="form.private_price" :disabled="true"></el-input>
|
|
42
|
+ <el-form-item
|
|
43
|
+ label="自费:"
|
|
44
|
+ prop="age"
|
|
45
|
+ :validate-event="is_Name"
|
|
46
|
+ style="width: 33%"
|
|
47
|
+ >
|
|
48
|
+ <el-input
|
|
49
|
+ style="color: black"
|
|
50
|
+ type="number"
|
|
51
|
+ v-model="form.private_price"
|
|
52
|
+ :disabled="true"
|
|
53
|
+ ></el-input>
|
21
|
54
|
</el-form-item>
|
22
|
55
|
|
23
|
|
- <el-form-item label="个账支出:" prop="age" :validate-event="is_Name" style="width:33%;">
|
24
|
|
- <el-input style="color: black" type="number" v-model="form.acct_pay" :disabled="true"></el-input>
|
|
56
|
+ <el-form-item
|
|
57
|
+ label="个账支出:"
|
|
58
|
+ prop="age"
|
|
59
|
+ :validate-event="is_Name"
|
|
60
|
+ style="width: 33%"
|
|
61
|
+ >
|
|
62
|
+ <el-input
|
|
63
|
+ style="color: black"
|
|
64
|
+ type="number"
|
|
65
|
+ v-model="form.acct_pay"
|
|
66
|
+ :disabled="true"
|
|
67
|
+ ></el-input>
|
25
|
68
|
</el-form-item>
|
26
|
69
|
|
27
|
|
-
|
28
|
|
- <el-form-item label="个人现金支出:" prop="age" :validate-event="is_Name" style="width:33%;">
|
29
|
|
- <el-input style="color: black" type="number" v-model="form.psn_pay" :disabled="true"></el-input>
|
|
70
|
+ <el-form-item
|
|
71
|
+ label="个人现金支出:"
|
|
72
|
+ prop="age"
|
|
73
|
+ :validate-event="is_Name"
|
|
74
|
+ style="width: 33%"
|
|
75
|
+ >
|
|
76
|
+ <el-input
|
|
77
|
+ style="color: black"
|
|
78
|
+ type="number"
|
|
79
|
+ v-model="form.psn_pay"
|
|
80
|
+ :disabled="true"
|
|
81
|
+ ></el-input>
|
30
|
82
|
</el-form-item>
|
31
|
83
|
|
32
|
|
-
|
33
|
|
-
|
34
|
|
- <el-form-item label="支付方式:" style="width:100%;">
|
35
|
|
- <!-- <el-select v-model="form.pay_way" placeholder="请选择">
|
|
84
|
+ <!-- <el-form-item label="支付方式:" style="width:100%;"> -->
|
|
85
|
+ <!-- <el-select v-model="form.pay_way" placeholder="请选择">
|
36
|
86
|
<el-option
|
37
|
87
|
v-for="(item,index) in payWays"
|
38
|
88
|
:key="index"
|
|
@@ -40,234 +90,283 @@
|
40
|
90
|
:value="item.value">
|
41
|
91
|
</el-option>
|
42
|
92
|
</el-select> -->
|
43
|
|
- <el-radio-group v-model="form.pay_way">
|
|
93
|
+ <!-- <el-input v-model="pay_way_index" placeholder="请输入内容" @change=""></el-input> -->
|
|
94
|
+ <!-- <el-radio-group v-model="form.pay_way">
|
44
|
95
|
<el-radio :label="index" v-for="(item,index) in payWays" :key="index">{{ item.label }}</el-radio>
|
45
|
96
|
</el-radio-group>
|
|
97
|
+ </el-form-item> -->
|
|
98
|
+
|
|
99
|
+ <el-form-item label="个人现金支付方式:" style="width: 100%">
|
|
100
|
+ <el-checkbox v-model="form.dec_way" @change="changedecimal">
|
|
101
|
+ 使用押金余额抵扣(当前押金余额为¥{{ decimal }})
|
|
102
|
+ </el-checkbox>
|
|
103
|
+ <span v-if="form.dec_way == true">
|
|
104
|
+ <el-form-item class="specialFormItem">
|
|
105
|
+ <div style="display: flex">
|
|
106
|
+ <!-- 这里不要改成el-input,因为使用el-input会导致一个奇怪的bug,千万不要改!!!!!!!!!!!!!!!!!!!!-->
|
|
107
|
+ <el-input v-model="form.tmp_decimal" onkeyup="this.value = this.value.replace(/[^\d.]/g,'');" @change="lilili">
|
|
108
|
+
|
|
109
|
+ </el-input>元
|
|
110
|
+ </div>
|
|
111
|
+ </el-form-item>
|
|
112
|
+ </span>
|
46
|
113
|
</el-form-item>
|
47
|
114
|
|
48
|
|
-
|
49
|
115
|
<el-form-item label="付款金额:" prop="id_card" :validate-event="is_Name">
|
50
|
|
- <el-input style="color: black" type="number" v-model="form.pay_price" :disabled="true"></el-input>
|
|
116
|
+ <el-input
|
|
117
|
+ style="color: black"
|
|
118
|
+ type="number"
|
|
119
|
+ v-model="form.pay_price"
|
|
120
|
+ :disabled="true"
|
|
121
|
+ ></el-input>
|
51
|
122
|
</el-form-item>
|
52
|
123
|
|
53
|
|
-
|
54
|
124
|
<el-form-item label="付款卡号:" prop="id_card" :validate-event="is_Name">
|
55
|
125
|
<el-input v-model="form.pay_card_no"></el-input>
|
56
|
126
|
</el-form-item>
|
57
|
127
|
|
58
|
128
|
<el-form-item class="specialFormItem" label="折扣金额:">
|
59
|
|
- <div style="display:flex;">
|
60
|
|
- <el-input style="color: black" v-model="form.discount_price" :disabled="form.preferential_price != 0" @change="changeDiscountPrice"></el-input>
|
|
129
|
+ <div style="display: flex">
|
|
130
|
+ <el-input
|
|
131
|
+ style="color: black"
|
|
132
|
+ v-model="form.discount_price"
|
|
133
|
+ :disabled="form.preferential_price != 0"
|
|
134
|
+ @change="changeDiscountPrice"
|
|
135
|
+ ></el-input>
|
61
|
136
|
</div>
|
62
|
137
|
</el-form-item>
|
63
|
138
|
<el-form-item class="specialFormItem" label="优惠金额:">
|
64
|
|
- <div style="display:flex;">
|
65
|
|
- <el-input style="color: black" v-model="form.preferential_price" :disabled="form.discount_price != 0" @change="changePreferentialPrice"></el-input>
|
|
139
|
+ <div style="display: flex">
|
|
140
|
+ <el-input
|
|
141
|
+ style="color: black"
|
|
142
|
+ v-model="form.preferential_price"
|
|
143
|
+ :disabled="form.discount_price != 0"
|
|
144
|
+ @change="changePreferentialPrice"
|
|
145
|
+ ></el-input>
|
66
|
146
|
</div>
|
67
|
147
|
</el-form-item>
|
68
|
148
|
<el-form-item label="实收金额:">
|
69
|
|
- <div style="display:flex;">
|
70
|
|
- <el-input style="color: black" v-model="form.reality_price" @change="realityPrice"></el-input>
|
|
149
|
+ <div style="display: flex">
|
|
150
|
+ <el-input
|
|
151
|
+ style="color: black"
|
|
152
|
+ v-model="form.reality_price"
|
|
153
|
+ @change="realityPrice"
|
|
154
|
+ ></el-input>
|
71
|
155
|
</div>
|
72
|
156
|
</el-form-item>
|
73
|
157
|
<el-form-item label="找回金额:">
|
74
|
|
- <div style="display:flex;">
|
75
|
|
- <el-input style="color: black" v-model.number="form.found_price"></el-input>
|
|
158
|
+ <div style="display: flex">
|
|
159
|
+ <el-input
|
|
160
|
+ style="color: black"
|
|
161
|
+ v-model.number="form.found_price"
|
|
162
|
+ ></el-input>
|
76
|
163
|
</div>
|
77
|
164
|
</el-form-item>
|
78
|
165
|
|
79
|
166
|
<el-form-item label="发票编码:">
|
80
|
|
- <div style="display:flex;">
|
|
167
|
+ <div style="display: flex">
|
81
|
168
|
<el-input v-model.number="form.fapiao_code"></el-input>
|
82
|
169
|
</div>
|
83
|
170
|
</el-form-item>
|
84
|
171
|
|
85
|
|
-
|
86
|
172
|
<el-form-item label="发票号码:">
|
87
|
|
- <div style="display:flex;">
|
|
173
|
+ <div style="display: flex">
|
88
|
174
|
<el-input v-model.number="form.fapiao_number"></el-input>
|
89
|
175
|
</div>
|
90
|
176
|
</el-form-item>
|
91
|
|
-
|
92
|
177
|
</el-form>
|
93
|
178
|
|
94
|
179
|
<span slot="footer" class="dialog-footer">
|
95
|
|
- <el-button @click="cancel('formValue')">取 消</el-button>
|
96
|
|
- <el-button type="primary" @click="confirm('formValue')">确 定</el-button>
|
97
|
|
- </span>
|
|
180
|
+ <el-button @click="cancel('formValue')">取 消</el-button>
|
|
181
|
+ <el-button type="primary" @click="confirm('formValue')">确 定</el-button>
|
|
182
|
+ </span>
|
98
|
183
|
</el-dialog>
|
99
|
|
-
|
100
|
184
|
</template>
|
101
|
185
|
|
102
|
186
|
<script>
|
103
|
|
- import { uParseTime } from '@/utils/tools'
|
104
|
|
- const moment = require('moment')
|
105
|
|
- export default {
|
106
|
|
- name: 'chargeDialog',
|
107
|
|
-
|
108
|
|
- data() {
|
109
|
|
-
|
110
|
|
- return {
|
111
|
|
- record_date:'',
|
112
|
|
- form: {
|
113
|
|
- medical_insurance_price:0,
|
114
|
|
- private_price:'',
|
115
|
|
- pay_way:'',
|
116
|
|
- pay_price:'',
|
117
|
|
- pay_card_no:'',
|
118
|
|
- discount_price:'',
|
119
|
|
- preferential_price:'',
|
120
|
|
- reality_price:'',
|
121
|
|
- found_price:'',
|
122
|
|
- total:0,
|
123
|
|
- fapiao_code:"",
|
124
|
|
- fapiao_number:"",
|
125
|
|
- order:null,
|
126
|
|
- acct_pay:'',
|
127
|
|
- psn_pay:'',
|
128
|
|
-
|
129
|
|
-
|
130
|
|
- },
|
131
|
|
- payWays: [
|
132
|
|
- {value: 1, label: '现金'},
|
133
|
|
- {value: 2, label: '银行卡'},
|
134
|
|
- {value: 3, label: '微信'},
|
135
|
|
- {value: 4, label: '支付宝'},
|
136
|
|
- {value: 5, label: '医保卡'},
|
137
|
|
-
|
138
|
|
- ],
|
139
|
|
- total:"",
|
140
|
|
-
|
141
|
|
- visibility: false,
|
142
|
|
- labelPosition: 'right',
|
143
|
|
- isClose: false,
|
144
|
|
-
|
145
|
|
- resetForm: {
|
146
|
|
- medical_insurance_price:'',
|
147
|
|
- private_price:'',
|
148
|
|
- pay_way:'',
|
149
|
|
- pay_price:'',
|
150
|
|
- pay_card_no:'',
|
151
|
|
- discount_price:'',
|
152
|
|
- preferential_price:'',
|
153
|
|
- reality_price:'',
|
154
|
|
- found_price:'',
|
155
|
|
- fapiao_code:"",
|
156
|
|
- fapiao_number:"",
|
157
|
|
- acct_pay:"",
|
158
|
|
- psn_pay:"",
|
159
|
|
- },
|
160
|
|
-
|
161
|
|
- }
|
162
|
|
- },
|
163
|
|
- props: {
|
164
|
|
-
|
165
|
|
- titles: {
|
166
|
|
- type: String,
|
167
|
|
- default: ''
|
168
|
|
- },
|
169
|
|
- formValue: {
|
170
|
|
- type: Object
|
|
187
|
+import { uParseTime } from "@/utils/tools";
|
|
188
|
+const moment = require("moment");
|
|
189
|
+export default {
|
|
190
|
+ name: "chargeDialog",
|
|
191
|
+
|
|
192
|
+ data() {
|
|
193
|
+ return {
|
|
194
|
+ record_date: "",
|
|
195
|
+ form: {
|
|
196
|
+ medical_insurance_price: 0,
|
|
197
|
+ private_price: "",
|
|
198
|
+ pay_way: "",
|
|
199
|
+ pay_price: "",
|
|
200
|
+ pay_card_no: "",
|
|
201
|
+ discount_price: "",
|
|
202
|
+ preferential_price: "",
|
|
203
|
+ reality_price: "",
|
|
204
|
+ found_price: "",
|
|
205
|
+ total: 0,
|
|
206
|
+ fapiao_code: "",
|
|
207
|
+ fapiao_number: "",
|
|
208
|
+ order: null,
|
|
209
|
+ acct_pay: "",
|
|
210
|
+ psn_pay: "",
|
171
|
211
|
},
|
172
|
|
- type: {
|
173
|
|
- type: Number,
|
174
|
|
- default: 1
|
175
|
|
-
|
|
212
|
+ pay_way_index: "",
|
|
213
|
+ payWays: [
|
|
214
|
+ { value: 1, label: "现金" },
|
|
215
|
+ { value: 2, label: "银行卡" },
|
|
216
|
+ { value: 3, label: "微信" },
|
|
217
|
+ { value: 4, label: "支付宝" },
|
|
218
|
+ { value: 5, label: "医保卡" },
|
|
219
|
+ ],
|
|
220
|
+ total: "",
|
|
221
|
+
|
|
222
|
+ visibility: false,
|
|
223
|
+ labelPosition: "right",
|
|
224
|
+ isClose: false,
|
|
225
|
+
|
|
226
|
+ resetForm: {
|
|
227
|
+ medical_insurance_price: "",
|
|
228
|
+ private_price: "",
|
|
229
|
+ pay_way: "",
|
|
230
|
+ pay_price: "",
|
|
231
|
+ pay_card_no: "",
|
|
232
|
+ discount_price: "",
|
|
233
|
+ preferential_price: "",
|
|
234
|
+ reality_price: "",
|
|
235
|
+ found_price: "",
|
|
236
|
+ fapiao_code: "",
|
|
237
|
+ fapiao_number: "",
|
|
238
|
+ acct_pay: "",
|
|
239
|
+ psn_pay: "",
|
176
|
240
|
},
|
177
|
|
- isCreated: {
|
178
|
|
- type: Number,
|
179
|
|
- default: 1
|
180
|
|
-
|
181
|
|
- }
|
|
241
|
+ };
|
|
242
|
+ },
|
|
243
|
+ props: {
|
|
244
|
+ titles: {
|
|
245
|
+ type: String,
|
|
246
|
+ default: "",
|
182
|
247
|
},
|
183
|
|
- methods: {
|
184
|
|
- show: function (total,order) {
|
185
|
|
- this.record_date = moment(new Date()).add('year',0).format("YYYY-MM-DD HH:mm")
|
186
|
|
- this.form.total = total
|
187
|
|
- this.form.private_price = total
|
188
|
|
- this.form.pay_price = total
|
189
|
|
- this.form.total = total + this.form.medical_insurance_price
|
190
|
|
- this.form.discount_price = 0.0
|
191
|
|
- this.form.preferential_price = 0.0
|
192
|
|
-
|
193
|
|
- this.form.fapiao_code =""
|
194
|
|
- this.form.fapiao_number = ""
|
195
|
|
- this.order = order
|
196
|
|
-
|
197
|
|
- if(this.order && this.order.id > 0){
|
198
|
|
- this.form.acct_pay = this.order.acct_pay
|
199
|
|
- this.form.psn_pay = this.order.psn_cash_pay
|
200
|
|
- this.form.total = this.order.medfee_sumamt
|
201
|
|
- this.form.pay_price = this.order.medfee_sumamt
|
202
|
|
- this.form.medical_insurance_price = this.order.fund_pay_sumamt
|
203
|
|
- this.form.private_price = this.order.psn_part_amt
|
204
|
|
- }
|
205
|
|
-
|
206
|
|
- this.visibility = true
|
|
248
|
+ formValue: {
|
|
249
|
+ type: Object,
|
|
250
|
+ },
|
|
251
|
+ type: {
|
|
252
|
+ type: Number,
|
|
253
|
+ default: 1,
|
|
254
|
+ },
|
|
255
|
+ isCreated: {
|
|
256
|
+ type: Number,
|
|
257
|
+ default: 1,
|
|
258
|
+ },
|
|
259
|
+ },
|
|
260
|
+ methods: {
|
|
261
|
+ show: function (total, order) {
|
|
262
|
+ this.record_date = moment(new Date())
|
|
263
|
+ .add("year", 0)
|
|
264
|
+ .format("YYYY-MM-DD HH:mm");
|
|
265
|
+ this.form.total = total;
|
|
266
|
+ this.form.private_price = total;
|
|
267
|
+ this.form.pay_price = total;
|
|
268
|
+ this.form.total = total + this.form.medical_insurance_price;
|
|
269
|
+ this.form.discount_price = 0.0;
|
|
270
|
+ this.form.preferential_price = 0.0;
|
|
271
|
+
|
|
272
|
+ this.form.fapiao_code = "";
|
|
273
|
+ this.form.fapiao_number = "";
|
|
274
|
+ this.order = order;
|
|
275
|
+
|
|
276
|
+ if (this.order && this.order.id > 0) {
|
|
277
|
+ this.form.acct_pay = this.order.acct_pay;
|
|
278
|
+ this.form.psn_pay = this.order.psn_cash_pay;
|
|
279
|
+ this.form.total = this.order.medfee_sumamt;
|
|
280
|
+ this.form.pay_price = this.order.medfee_sumamt;
|
|
281
|
+ this.form.medical_insurance_price = this.order.fund_pay_sumamt;
|
|
282
|
+ this.form.private_price = this.order.psn_part_amt;
|
|
283
|
+ }
|
207
|
284
|
|
208
|
|
- }, hide: function () {
|
209
|
|
- this.form = Object.assign({}, this.resetForm);
|
210
|
|
- this.loadingtwo = false;
|
211
|
|
- this.visibility = false
|
212
|
|
- }, cancel: function (formName) {
|
213
|
|
- this.$emit('cancel', this.getValue());
|
214
|
|
- this.$refs['formValue'].resetFields()
|
215
|
|
- },
|
216
|
|
- confirm: function (formName) {
|
217
|
|
- this.$refs['formValue'].validate((valid) => {
|
218
|
|
- if (valid) {
|
219
|
|
- let value = {};
|
220
|
|
- value = this.getValue();
|
221
|
|
- this.$emit('confirm', value);
|
222
|
|
- this.loadingtwo = true
|
223
|
|
- }
|
224
|
|
- })
|
225
|
|
- },
|
226
|
|
- getValue: function () {
|
227
|
|
- let form = {};
|
228
|
|
- form = this.form;
|
229
|
|
- return form
|
230
|
|
- },
|
231
|
|
- realityPrice(val){
|
232
|
|
- if(val < (this.form.total - this.form.discount_price - this.form.preferential_price)){
|
233
|
|
- this.$message.error('实收金额不能小于收费金额');
|
234
|
|
- return
|
235
|
|
- }
|
236
|
|
- this.form.found_price = parseInt(val) - parseInt(this.form.total) + parseInt(this.form.discount_price) + parseInt(this.form.preferential_price)
|
237
|
|
- },
|
238
|
|
- changeDiscountPrice(val){
|
239
|
|
- if(val > this.form.total){
|
240
|
|
- this.$message.error('折扣金额不能超过费用总额');
|
241
|
|
- return
|
242
|
|
- }
|
243
|
|
- this.form.reality_price = parseInt(this.form.total) - parseInt(val) - parseInt(this.form.preferential_price)
|
244
|
|
- },
|
245
|
|
- changePreferentialPrice(val){
|
246
|
|
- if(val > this.form.total){
|
247
|
|
- this.$message.error('优惠金额不能超过费用总额');
|
248
|
|
- return
|
|
285
|
+ this.visibility = true;
|
|
286
|
+ },
|
|
287
|
+ hide: function () {
|
|
288
|
+ this.form = Object.assign({}, this.resetForm);
|
|
289
|
+ this.loadingtwo = false;
|
|
290
|
+ this.visibility = false;
|
|
291
|
+ },
|
|
292
|
+ cancel: function (formName) {
|
|
293
|
+ this.$emit("cancel", this.getValue());
|
|
294
|
+ this.$refs["formValue"].resetFields();
|
|
295
|
+ },
|
|
296
|
+ confirm: function (formName) {
|
|
297
|
+ this.$refs["formValue"].validate((valid) => {
|
|
298
|
+ if (valid) {
|
|
299
|
+ let value = {};
|
|
300
|
+ value = this.getValue();
|
|
301
|
+ this.$emit("confirm", value);
|
|
302
|
+ this.loadingtwo = true;
|
249
|
303
|
}
|
250
|
|
- this.form.reality_price = parseInt(this.form.total) - parseInt(val) - parseInt(this.form.discount_price)
|
|
304
|
+ });
|
|
305
|
+ },
|
|
306
|
+ getValue: function () {
|
|
307
|
+ let form = {};
|
|
308
|
+ form = this.form;
|
|
309
|
+ return form;
|
|
310
|
+ },
|
|
311
|
+ realityPrice(val) {
|
|
312
|
+ if (
|
|
313
|
+ val <
|
|
314
|
+ this.form.total -
|
|
315
|
+ this.form.discount_price -
|
|
316
|
+ this.form.preferential_price
|
|
317
|
+ ) {
|
|
318
|
+ this.$message.error("实收金额不能小于收费金额");
|
|
319
|
+ return;
|
251
|
320
|
}
|
252
|
|
- },mounted() {
|
253
|
|
- var nowDate = new Date();
|
254
|
|
- var nowYear = nowDate.getFullYear();
|
255
|
|
- var nowMonth = nowDate.getMonth() + 1;
|
256
|
|
- var nowDay = nowDate.getDate();
|
257
|
|
-
|
258
|
|
- var nowHours = nowDate.getHours();
|
259
|
|
- var nowMin = nowDate.getMinutes();
|
260
|
|
- var nowSecond = nowDate.getSeconds();
|
261
|
|
-
|
262
|
|
- this.record_date =
|
263
|
|
- nowYear +
|
264
|
|
- '-' +
|
265
|
|
- (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
|
266
|
|
- '-' +
|
267
|
|
- (nowDay < 10 ? '0' + nowDay : nowDay)+" "+(nowHours < 10 ? '0' + nowHours : nowHours)+":"+(nowMin < 10 ? '0' + nowMin : nowMin)
|
268
|
|
- }
|
269
|
|
-
|
270
|
|
- }
|
|
321
|
+ this.form.found_price =
|
|
322
|
+ parseInt(val) -
|
|
323
|
+ parseInt(this.form.total) +
|
|
324
|
+ parseInt(this.form.discount_price) +
|
|
325
|
+ parseInt(this.form.preferential_price);
|
|
326
|
+ },
|
|
327
|
+ changeDiscountPrice(val) {
|
|
328
|
+ if (val > this.form.total) {
|
|
329
|
+ this.$message.error("折扣金额不能超过费用总额");
|
|
330
|
+ return;
|
|
331
|
+ }
|
|
332
|
+ this.form.reality_price =
|
|
333
|
+ parseInt(this.form.total) -
|
|
334
|
+ parseInt(val) -
|
|
335
|
+ parseInt(this.form.preferential_price);
|
|
336
|
+ },
|
|
337
|
+ changePreferentialPrice(val) {
|
|
338
|
+ if (val > this.form.total) {
|
|
339
|
+ this.$message.error("优惠金额不能超过费用总额");
|
|
340
|
+ return;
|
|
341
|
+ }
|
|
342
|
+ this.form.reality_price =
|
|
343
|
+ parseInt(this.form.total) -
|
|
344
|
+ parseInt(val) -
|
|
345
|
+ parseInt(this.form.discount_price);
|
|
346
|
+ },
|
|
347
|
+ },
|
|
348
|
+ mounted() {
|
|
349
|
+ var nowDate = new Date();
|
|
350
|
+ var nowYear = nowDate.getFullYear();
|
|
351
|
+ var nowMonth = nowDate.getMonth() + 1;
|
|
352
|
+ var nowDay = nowDate.getDate();
|
|
353
|
+
|
|
354
|
+ var nowHours = nowDate.getHours();
|
|
355
|
+ var nowMin = nowDate.getMinutes();
|
|
356
|
+ var nowSecond = nowDate.getSeconds();
|
|
357
|
+
|
|
358
|
+ this.record_date =
|
|
359
|
+ nowYear +
|
|
360
|
+ "-" +
|
|
361
|
+ (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
|
|
362
|
+ "-" +
|
|
363
|
+ (nowDay < 10 ? "0" + nowDay : nowDay) +
|
|
364
|
+ " " +
|
|
365
|
+ (nowHours < 10 ? "0" + nowHours : nowHours) +
|
|
366
|
+ ":" +
|
|
367
|
+ (nowMin < 10 ? "0" + nowMin : nowMin);
|
|
368
|
+ },
|
|
369
|
+};
|
271
|
370
|
</script>
|
272
|
371
|
|
273
|
372
|
|
|
@@ -277,17 +376,17 @@
|
277
|
376
|
font-size: 15px;
|
278
|
377
|
}
|
279
|
378
|
|
280
|
|
- /deep/.el-input__inner {
|
281
|
|
- background-color: transparent !important;
|
282
|
|
- border: 1px solid red;
|
283
|
|
- }
|
284
|
|
-.chargeDialog{
|
285
|
|
- .el-form{
|
|
379
|
+/deep/.el-input__inner {
|
|
380
|
+ background-color: transparent !important;
|
|
381
|
+ border: 1px solid red;
|
|
382
|
+}
|
|
383
|
+.chargeDialog {
|
|
384
|
+ .el-form {
|
286
|
385
|
display: flex;
|
287
|
386
|
flex-wrap: wrap;
|
288
|
387
|
}
|
289
|
|
- .el-form-item{
|
290
|
|
- width:50%;
|
|
388
|
+ .el-form-item {
|
|
389
|
+ width: 50%;
|
291
|
390
|
}
|
292
|
391
|
}
|
293
|
392
|
</style>
|