sale-client 3.5.220 → 3.5.221

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,7 @@ var path = require('path')
4
4
  var webpackDevServer = require('webpack-dev-server')
5
5
  var compiler = webpack(config)
6
6
  // 自己改了这里不要提交 来回覆盖挺麻烦的
7
- const [localUrl, serverRul] = ['http://121.36.60.63:8800/', 'http://121.36.60.63:8800/']
7
+ const [localUrl, serverRul] = ['http://127.0.0.1:8080', 'http://192.168.50.4:8400']
8
8
  const port = 8089
9
9
 
10
10
  // eslint-disable-next-line new-cap
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "3.5.220",
3
+ "version": "3.5.221",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -0,0 +1,197 @@
1
+ <template>
2
+ <div class="auto">
3
+ <validator name='v'>
4
+ <form novalidate class="form-horizontal">
5
+ <div class="row">
6
+ <div class="col-sm-4 form-group">
7
+ <label class="font_normal_body" title="参数名称:付款方式">收款方式</label>
8
+ <v-select v-model="f_payment"
9
+ placeholder='请选择'
10
+ style="width:60%"
11
+ :value.sync="model.f_payment"
12
+ :options='paytype'
13
+ close-on-select clear-button></v-select>
14
+ </div>
15
+ <div class="col-sm-4 form-group">
16
+ <label for="f_print" class="font_normal_body">打印格式</label>
17
+ <v-select id="print"
18
+ v-model="f_print"
19
+ style="width:60%"
20
+ placeholder='请选择'
21
+ :value.sync="model.f_print"
22
+ :options='printstyle'
23
+ close-on-select clear-button>
24
+ </v-select>
25
+ </div>
26
+ </div>
27
+
28
+ <div class="row">
29
+ <div class="col-sm-4 form-group" :class="[$v.f_meter_base.required || $v.f_meter_base.dctest ? 'has-error' : 'has-success']">
30
+ <label class="font_normal_body">当前底数</label>
31
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_meter_base"
32
+ v-validate:f_meter_base='{required: true, dctest: [row.f_total_gas, "<=" ]}'/>
33
+ </div>
34
+ <div class="col-sm-4 form-group">
35
+ <label class="font_normal_body">应退气量</label>
36
+ <input class="input_search" style="width:60%" type="number" v-model="f_refund_gas" readonly/>
37
+ </div>
38
+ <div class="col-sm-4 form-group" :class="[$v.f_refund_fee.required || $v.f_refund_fee.dctest ? 'has-error' : 'has-success']">
39
+ <label class="font_normal_body">退费金额</label>
40
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_refund_fee"
41
+ v-validate:f_refund_fee='{required: true, dctest: [row.f_total_fee, "<=" ]}' placeholder="退费金额">
42
+ </div>
43
+ </div>
44
+ <div class="row">
45
+ <div class="col-sm-8">
46
+ <label for="f_paper_account" class="font_normal_body ">&nbsp;&nbsp;&nbsp;备注&nbsp;&nbsp;&nbsp;</label>
47
+ <input class="input_search" style="width:80%" v-model="model.f_comments">
48
+ </div>
49
+ </div>
50
+ <div class="row" style="margin-top:5px;">
51
+ <div class="col-sm-9">
52
+ </div>
53
+ <div class="col-sm-3">
54
+ <span v-if="$v.f_refund_fee.dctest" style="color:red ">退费金额必填且不能大于累购金额</span>
55
+ <br/>
56
+ <span v-if="$v.f_meter_base.dctest" style="color:red ">当前表底数必填且不能大于累购气量</span>
57
+ </div>
58
+ </div>
59
+ </form>
60
+ <div style="text-align:right;">
61
+ <button class="button_search btn-gn" @click="confirm()" :disabled='!$v.valid'>确认</button>
62
+ <button class="button_clear btn-gn" @click="clean()">取消</button>
63
+ </div>
64
+ </validator>
65
+ <validate-bill v-if="hasValidateBill" :data="model" @validate-bill="validateBill"></validate-bill>
66
+ <print-bill :show="print" :bill-config='config' :bill-data='billData' v-on:toggle="clean" @printok="printok" :data='printModel' v-ref:printbill></print-bill>
67
+ </div>
68
+
69
+ <upload :blodid="data.f_userinfo_id" isremark="true" fusetype="退费管理"></upload>
70
+ </template>
71
+
72
+
73
+ <script>
74
+ let readyGen = async function (self) {
75
+ await self.$getConfig(self, 'MachineTRefund')
76
+ console.log('清表退费', self.config)
77
+ // 默认打印格式
78
+ self.blodid = self.row.f_userinfo_id
79
+ self.model.f_print = self.config.printType instanceof Array ? self.config.printType : [self.config.printType]
80
+ self.model.f_payment = [self.config.payment]
81
+
82
+ self.model.f_use_type = self.config.billType
83
+ self.model.f_bill_type = self.model.f_print
84
+ self.hasValidateBill = self.config.hasBillManage
85
+ }
86
+
87
+ export default {
88
+ title: '机表退费',
89
+ data () {
90
+ return {
91
+ config: {
92
+ showupload: false, // 默认不上传附件
93
+ hasPrint: false, // 默认打票
94
+ hasBillManage: false, // 默认不启用发票管理
95
+ overBalance: false, // 为true时退费金额可以大于余额
96
+ printType: '普通收据', // 收据/电子票/专用发票/国税发票
97
+ payment: '现金缴费',
98
+ billType: '燃气费'
99
+ },
100
+ model: {
101
+ f_refund_fee: '',
102
+ f_comments: '',
103
+ f_payment: '',
104
+ f_print: ''
105
+ },
106
+
107
+ blodid: '',
108
+ hasValidateBill: false,
109
+ validateOk: false,
110
+
111
+ printModel: {},
112
+ print: false,
113
+ billUrl: '',
114
+ billData: {
115
+ url: 'rs/report/refund_sell',
116
+ bill: ''
117
+ },
118
+
119
+ // 下拉框值
120
+ paytype: this.$appdata.getParam('付款方式'),
121
+ printstyle: this.$appdata.getParam('打印格式')
122
+ }
123
+ },
124
+ props: ['row'],
125
+ ready () {
126
+ readyGen(this)
127
+ },
128
+ computed: {
129
+ 'f_refund_gas' () {
130
+ if (this.model.f_meter_base > this.row.f_total_gas) return 0
131
+ return Number(((this.row.f_total_gas - 0) - (this.model.f_meter_base - 0)).toFixed(4))
132
+ }
133
+ },
134
+ methods: {
135
+ async confirm () {
136
+ let param = {
137
+ f_user_id: this.row.f_user_id,
138
+ f_userfiles_id: this.row.f_userfiles_id,
139
+ version: this.row.version,
140
+ f_refund_fee: this.model.f_refund_fee,
141
+ f_refund_gas: this.f_refund_gas,
142
+ f_comments: this.model.f_comments,
143
+ f_payment: this.model.f_payment[0],
144
+ f_print: this.model.f_print[0],
145
+ f_price_id: this.row.f_price_id,
146
+
147
+ f_total_fee: parseFloat(this.row.f_total_fee) - parseFloat(this.model.f_refund_fee),
148
+ f_stairprice_id: this.row.f_stairprice_id,
149
+ operInfo: {
150
+ f_operator: this.$login.f.name,
151
+ f_operatorid: this.$login.f.id,
152
+ f_orgid: this.$login.f.orgid,
153
+ f_orgname: this.$login.f.orgs,
154
+ f_depid: this.$login.f.depids,
155
+ f_depname: this.$login.f.deps
156
+ }
157
+ }
158
+
159
+ let res = await this.$resetpost('rs/logic/dropTableRefund', {data: param}, {warnMsg: `确定要对用户${this.row.f_user_name}进行退费吗?`, resolveMsg: '退费成功!!', rejectMsg: '退费失败!!请重试!!'})
160
+
161
+ if (this.model.f_print.indexOf('电子发票') == -1 && this.config.hasPrint && !this.$login.r.includes('不打印发票')) {
162
+ console.log('this.config.hasBillManage', this.config.hasBillManage)
163
+ if (this.config.hasBillManage) {
164
+ // 启用发票管理,获取票据管理中的票号并存储记录
165
+ this.printModel.id = res.data.id
166
+ this.printModel.f_bill_type = '退费'
167
+ this.printModel.f_bill_style = this.model.f_print[0]
168
+ // this.billUrl = 'rs/report/refund_sell'
169
+ this.print = true
170
+ } else {
171
+ this.printModel.id = res.data.id
172
+ // this.billUrl = 'rs/report/refund_sell'
173
+ this.print = true
174
+ }
175
+ } else if (this.config.printType === '国税发票') {
176
+ // TODO
177
+ this.$dispatch('success')
178
+ } else if (this.config.printType === '电子发票') {
179
+ // TODO
180
+ this.$dispatch('success')
181
+ } else {
182
+ this.$dispatch('success')
183
+ }
184
+ },
185
+ clean () {
186
+ this.$dispatch('refresh')
187
+ },
188
+ printok () {
189
+ this.$dispatch('success')
190
+ },
191
+ validateBill (val) {
192
+ this.validateOk = !val.isOk
193
+ this.billData.bill = val.bill
194
+ }
195
+ }
196
+ }
197
+ </script>