sale-client 3.5.251 → 3.5.253

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "3.5.251",
3
+ "version": "3.5.253",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -91,8 +91,8 @@
91
91
  <th>
92
92
  <nobr>上期结余</nobr>
93
93
  </th>
94
- <th>
95
- <nobr v-if="!$parent.$parent.$parent.isIot">应交金额</nobr>
94
+ <th v-if="!$parent.$parent.$parent.isIot">
95
+ <nobr>应交金额</nobr>
96
96
  </th>
97
97
  <th>
98
98
  <nobr>实收金额</nobr>
@@ -287,11 +287,14 @@
287
287
  :show-reset-button="true">
288
288
  </datepicker>
289
289
  </div>
290
- <div class="col-sm-4 form-group">
290
+ <div class="col-sm-4 form-group" :class="[$m.fee.required ? 'select-error' : '']">
291
291
  <label for="gasmodel" class="font_normal_body">&ensp;垃&ensp;圾&ensp;费</label>
292
292
  <v-select :value.sync="row.f_garbage_fee" :options='garbagefee' placeholder='垃圾费' close-on-select
293
293
  :value-single="true"
294
- v-model='row.f_garbage_fee'></v-select>
294
+ v-model='row.f_garbage_fee'
295
+ v-ref:fee >
296
+ </v-select>
297
+ <input type="text" v-show="false" v-model="$refs.fee.selectedItems" v-validate:fee='{required: true }'>
295
298
  </div>
296
299
  <div class="col-sm-4 form-group">
297
300
  <label class="font_normal_body">&ensp;抄&ensp;表&ensp;员</label>
@@ -2,6 +2,7 @@
2
2
  <div class="auto">
3
3
  <div style="float: right">
4
4
  <button @click="getQueryData()" class="button_search" >获取数据</button>
5
+ <button @click="changeChoose()" class="button_search" >历史卡表收费</button>
5
6
  </div>
6
7
  <validator name='v'>
7
8
  <form novalidate class="form-horizontal">
@@ -183,6 +184,9 @@
183
184
  })
184
185
  this.$dispatch('success')
185
186
  },
187
+ changeChoose () {
188
+ this.$dispatch('changeChoose')
189
+ },
186
190
  async getQueryData () {
187
191
  await this.$resetpost('rs/sql/machineRefundQuery', {
188
192
  data: {
@@ -1,7 +1,8 @@
1
1
  <template>
2
2
  <div class="auto">
3
3
  <card-refund v-if="row.f_meter_type.indexOf( '卡表')>0" :data="row"></card-refund>
4
- <iot-refund v-if="row.f_meter_type === '物联网表'" :data="row"></iot-refund>
4
+ <card-history-refund v-if="row.f_meter_type === '物联网表' && all == 'history'" :data="row"></card-history-refund>
5
+ <iot-refund v-if="row.f_meter_type === '物联网表' && all == 'now'" :data="row"></iot-refund>
5
6
  <machine-Refund v-if="row.f_meter_type === '机表'" :data="row"></machine-Refund>
6
7
  </div>
7
8
 
@@ -10,21 +11,28 @@
10
11
  import IotRefund from './IOTRefund'
11
12
  import machineRefund from './machineRefund'
12
13
  import cardRefund from './cardRefund'
14
+ import cardHistoryRefund from './cardHistoryRefund'
13
15
 
14
16
  export default {
15
17
  title: '退费管理',
16
18
  components: {
17
19
  IotRefund,
18
20
  machineRefund,
19
- cardRefund
21
+ cardRefund,
22
+ cardHistoryRefund
20
23
  },
21
24
  data () {
22
25
  return {
23
-
26
+ all: 'now'
24
27
  }
25
28
  },
26
29
  ready () {
27
30
 
31
+ },
32
+ events: {
33
+ changeChoose () {
34
+ this.all = 'history'
35
+ }
28
36
  },
29
37
  props: ['row']
30
38
  }
@@ -0,0 +1,215 @@
1
+ <template>
2
+ <div class="auto">
3
+ <div style="float: right">
4
+ <button @click="getQueryData()" class="button_search" >获取数据</button>
5
+ </div>
6
+ <validator name='v'>
7
+ <form novalidate class="form-horizontal">
8
+ <div class="row">
9
+ <div class="col-sm-4 form-group">
10
+ <label class="font_normal_body">开始时间</label>
11
+ <datepicker :format="'yyyy-MM-dd HH:mm:ss'" :value.sync="model.f_start_date"
12
+ class="datepicker"
13
+ placeholder="起始时间"
14
+ style="width:60%"
15
+ v-model="model.f_start_date"
16
+ v-ref:f_start_date
17
+ ></datepicker>
18
+ </div>
19
+ <div class="col-sm-4 form-group" >
20
+ <label class="font_normal_body" >结束时间</label>
21
+ <datepicker :format="'yyyy-MM-dd HH:mm:ss'" :value.sync="model.f_end_date"
22
+ class="datepicker"
23
+ placeholder="结束时间"
24
+ style="width:60%"
25
+ v-model="model.f_end_date"
26
+ v-ref:f_end_date
27
+ ></datepicker>
28
+ </div>
29
+
30
+
31
+ </div>
32
+
33
+ <div class="row">
34
+ <div class="col-sm-4">
35
+ <label for="f_paper_account" class="font_normal_body ">累购金额</label>
36
+ <input class="input_search" style="width:60%" disabled v-model="model.f_preamount">
37
+ </div>
38
+ <div class="col-sm-4">
39
+ <label for="f_paper_account" class="font_normal_body ">累购气量</label>
40
+ <input class="input_search" style="width:60%" disabled v-model="model.f_pregas">
41
+ </div>
42
+
43
+ <div class="col-sm-4">
44
+ <label for="f_paper_account" class="font_normal_body ">待退金额</label>
45
+ <input class="input_search" style="width:60%" disabled v-model="model.f_refund_fee">
46
+ </div>
47
+ <div class="col-sm-4">
48
+ <label for="f_paper_account" class="font_normal_body ">已退金额</label>
49
+ <input class="input_search" style="width:60%" disabled v-model="model.f_refunded_fee">
50
+ </div>
51
+ <div class="col-sm-8">
52
+ <label for="f_paper_account" class="font_normal_body ">备&emsp;&emsp;注</label>
53
+ <input class="input_search" style="width:60%" v-model="model.f_comments">
54
+ </div>
55
+ <div class="col-sm-4 form-group">
56
+ <label class="font_normal_body">退费金额</label>
57
+ <input class="input_search" style="width:60%"
58
+ type="number" v-model="model.f_refund_fee"
59
+ disabled
60
+ placeholder="退费金额">
61
+ </div>
62
+ <div class="col-sm-8">
63
+ <label for="f_paper_account" class="font_normal_body ">收款事由</label>
64
+ <input class="input_search" style="width:60%" v-model="model.f_reason">
65
+ </div>
66
+ </div>
67
+ </form>
68
+ <validate-bill v-if="hasValidateBill" :data="model" @validate-bill="validateBill"></validate-bill>
69
+ <print-bill :show="print" :bill-config='config' :bill-data='billData' :data='data' @toggle="close" @printok="printok" v-ref:printbill></print-bill>
70
+ <div style="text-align:right;">
71
+ <button class="button_search btn-gn" @click="confirm()" :disabled='!$v.valid'>确认</button>
72
+ <button class="button_clear btn-gn" @click="clean()">取消</button>
73
+ </div>
74
+ </validator>
75
+ </div>
76
+
77
+ <upload :blodid="data.f_userinfo_id" isremark="true" fusetype="退费管理"></upload>
78
+ </template>
79
+
80
+
81
+ <script>
82
+ let readyGen = async function (self) {
83
+ self.$refs.f_start_date.value = self.$login.toStandardTimeString()
84
+ self.$refs.f_end_date.value = self.$login.toStandardTimeString()
85
+ }
86
+
87
+ export default {
88
+ title: '卡表退费',
89
+ data () {
90
+ return {
91
+ model: {
92
+ f_refunded_fee: '',
93
+ f_refund_fee: '',
94
+ f_comments: '',
95
+ f_reason: '',
96
+ f_pregas: '',
97
+ f_preamount: '',
98
+ f_price: 0
99
+ },
100
+
101
+ validateBill (val) {
102
+ this.validateOk = !val.isOk
103
+ this.billData.bill = val.bill
104
+ },
105
+ config: {
106
+ notShowFormula: false, // 不显示计算公式,默认显示
107
+ priceCalculation: false, // 划气量控制
108
+ showupload: true, // 默认显示附件上传组件
109
+ hasPrint: true, // 默认打票
110
+ floor: true, // 是否取整收费
111
+ hasBillManage: false, // 默认不启用发票管理
112
+ billType: '燃气费', // 票据类型(燃气费,其他费用,调用的发票代码不同)
113
+ printType: '普通收据', // 收据/电子票/专用发票/国税发票
114
+ payment: '现金缴费'
115
+ },
116
+ blodid: '',
117
+ hasValidateBill: false,
118
+ validateOk: false,
119
+ printModel: {},
120
+ print: false,
121
+ billUrl: '',
122
+ billData: {
123
+ url: 'rs/report/refund_sell',
124
+ operator: this.$login.f.name,
125
+ billnumber: '',
126
+ bill: ''
127
+ }
128
+ }
129
+ },
130
+ props: ['data'],
131
+ ready () {
132
+ readyGen(this)
133
+ },
134
+ methods: {
135
+ async confirm () {
136
+ let param = {
137
+ f_user_id: this.data.f_user_id,
138
+ f_userfiles_id: this.data.f_userfiles_id,
139
+ f_userinfo_id: this.data.f_userinfo_id,
140
+ version: this.data.version,
141
+ f_refund_gas: 0,
142
+ f_refund_fee: this.model.f_refund_fee,
143
+ f_comments: this.model.f_comments,
144
+ f_reason: this.model.f_reason,
145
+ f_balance: this.data.f_balance,
146
+ f_start_date: this.model.f_start_date,
147
+ f_end_date: this.model.f_end_date,
148
+ f_price_id: this.data.f_price_id,
149
+ f_total_gas: parseFloat(this.data.f_total_gas) - 0,
150
+ f_total_fee: parseFloat(this.data.f_total_fee) - parseFloat(this.model.f_refund_fee),
151
+ f_stairprice_id: this.data.f_stairprice_id,
152
+ operInfo: {
153
+ f_operator: this.$login.f.name,
154
+ f_operatorid: this.$login.f.id,
155
+ f_orgid: this.$login.f.orgid,
156
+ f_orgname: this.$login.f.orgs,
157
+ f_depid: this.$login.f.depids,
158
+ f_depname: this.$login.f.deps
159
+ }
160
+ }
161
+ console.log('退费传参', param)
162
+ let res = await this.$resetpost('rs/logic/cardHistoryRefund', {data: param}, {warnMsg: `确定要对用户${this.data.f_user_name}进行退费吗?`, resolveMsg: '退费成功!!', rejectMsg: '退费失败!!请重试!!'}).then((res) => {
163
+ if (this.config.hasPrint) {
164
+ if (this.config.hasBillManage) {
165
+ // 启用发票管理,获取票据管理中的票号并存储记录
166
+ this.data.id = res.data.id
167
+ this.data.f_bill_type = '退费'
168
+ this.print = true
169
+ } else {
170
+ this.data.id = res.data.id
171
+ this.print = true
172
+ }
173
+ } else {
174
+ this.$dispatch('success')
175
+ }
176
+ })
177
+ },
178
+ async getQueryData () {
179
+ await this.$resetpost('rs/sql/cardRefundQuery', {
180
+ data: {
181
+ condition: `sg.f_userinfo_id='${this.data.f_userinfo_id}' and sg.f_operate_date >= '${this.model.f_start_date}' and
182
+ sg.f_operate_date <= '${this.model.f_end_date}' and sg.f_type = '卡表收费'`
183
+ }
184
+ }, {resolveMsg: null, rejectMsg: '获取数据失败!'}).then((res) => {
185
+ this.model.f_refunded_fee = res.data[0].f_refunded_fee
186
+ this.model.f_refund_fee = res.data[0].f_refund_fee
187
+ this.model.f_pregas = res.data[0].f_pregas
188
+ this.model.f_preamount = res.data[0].f_preamount
189
+ if(res.data[0].f_refund_fee) {
190
+ this.model.f_comments = '退费时间周期以及一共退费' + res.data[0].f_refund_fee + '元'
191
+ }
192
+ })
193
+ },
194
+ refundChange () {
195
+ this.model.f_refund_fee = (this.model.f_refund_gas - 0) * (this.model.f_price - 0)
196
+ },
197
+ close () {
198
+ this.print = false
199
+ this.clean()
200
+ },
201
+ printok () {
202
+ // 收据打完,判断是否还有其他票据进行请求
203
+ for (let i = 0; i < this.model.f_print.length; i++) {
204
+ if (this.model.f_print[i] === '电子发票') {
205
+ this.$CommonService.openEticket(this.row.id, '售气收费')
206
+ }
207
+ }
208
+ this.$dispatch('success')
209
+ },
210
+ clean () {
211
+ this.$dispatch('refresh')
212
+ }
213
+ }
214
+ }
215
+ </script>
package/src/main.js CHANGED
@@ -3,7 +3,7 @@ import all from 'vue-client/src/all'
3
3
  import App from './App'
4
4
  import system from 'system-clients/src/system'
5
5
  import sale from './sale'
6
- import wenxi from './filiale/kelai/sale'
6
+ import wenxi from './filiale/fugu/sale'
7
7
  // import FilialeSale from './filiale/yuansheng/sale'
8
8
  import address from 'address-client/src/address'
9
9
  import ldap from 'ldap-clients/src/ldap'