sale-client 3.6.182 → 3.6.183

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.6.182",
3
+ "version": "3.6.183",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -158,7 +158,7 @@
158
158
 
159
159
  <export-excel
160
160
  :isshow="false" :data="getCondition" :field="getfield"
161
- :defaultselect="defaultselect"
161
+ :defaultselect="defaultselect" :footer="footer" :header="other"
162
162
  :header="excelhead" :choose-col="true" v-ref:excel
163
163
  sqlurl="rs/logic/saleExport" sql-name="batchOweQuery" template-name='团体欠费明细导出'>
164
164
  </export-excel>
@@ -180,6 +180,8 @@ export default {
180
180
  // 公司下拉
181
181
  curorgid: [this.$login.f.orgid],
182
182
  f_orgid: '',
183
+ other:[],
184
+ footer:[],
183
185
  f_civill_id: null,
184
186
  oweShow: false,
185
187
  getCondition: null,
@@ -222,7 +224,8 @@ export default {
222
224
  'f_oughtfee'
223
225
  ],
224
226
  printModel: new PagedList('rs/sql/batchOweQuery', 20, {}, {f_oughtfee: 0}),
225
- row: null
227
+ row: null,
228
+ starthead: ''
226
229
  }
227
230
  },
228
231
  title: '档案查询',
@@ -336,8 +339,8 @@ export default {
336
339
  let condition = `p.f_civill_id = ${row.id}`
337
340
  await this.printModel.search(condition)
338
341
  this.starthead = `<div style="display: inline-block;width: 100%;">
339
- <div style="text-align: left;display: inline-block;width: 49%;float: left;">&nbsp;团缴编号${row.id}</div>
340
- <div style="text-align: right;display: inline-block;width: width: 49%;float: right;">总欠费金额${row.f_oughtfee_all}元&nbsp;</div>
342
+ <div style="text-align: left;display: inline-block;width: 49%;float: left;">&nbsp;团缴编号: ${row.f_customer}</div>
343
+ <div style="text-align: right;display: inline-block;width: width: 49%;float: right;">总欠费金额: ${row.f_oughtfee_all}元&nbsp;</div>
341
344
  </div>`
342
345
  this.$refs.printdata.printData()
343
346
  },
@@ -346,7 +349,7 @@ export default {
346
349
  this.row = row
347
350
  this.getotherfooter(row)
348
351
  this.getCondition = {condition: `p.f_civill_id = ${row.id}`}
349
- this.starthead = `团缴编号${row.id},总欠费金额${row.f_oughtfee_all}元`
352
+ this.starthead = `团缴编号: ${row.f_customer},总欠费金额: ${row.f_oughtfee_all}元`
350
353
  this.excelhead = []
351
354
  let headData = []
352
355
  headData.push(this.starthead)
@@ -0,0 +1,251 @@
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">用户编号</label>
8
+ <input class="input_search" style="width:60%" type="text" placeholder='目标用户编号'
9
+ v-model="model.f_userinfo_code" @blur="getuser(model.f_userinfo_code)">
10
+ </div>
11
+ <div class="col-sm-4 form-group" >
12
+ <label for="f_user_name" class="font_normal_body">用户姓名</label>
13
+ <input class="input_search" style="width:60%" type="text" placeholder='目标用户姓名'
14
+ v-model="model.f_user_name" readonly >
15
+ </div>
16
+
17
+ <div class="col-sm-4 form-group" >
18
+ <label class="font_normal_body">气表类型</label>
19
+ <input class="input_search" style="width:60%" type="text" placeholder='目标用户气表类型'
20
+ v-model="model.f_meter_type" readonly >
21
+ </div>
22
+ </div>
23
+ <div class="row">
24
+
25
+ <div class="col-sm-4 form-group" v-if="row.f_meter_type =='机表'" >
26
+ <label class="font_normal_body">当前余额</label>
27
+ <input class="input_search" style="width:60%" type="text" placeholder='当前余额'
28
+ v-model="row.f_balance" readonly >
29
+ </div>
30
+ <div class="col-sm-4 form-group" v-if="row.f_meter_type =='物联网表'" >
31
+ <label class="font_normal_body">当前余额</label>
32
+ <input class="input_search" style="width:60%" type="text" placeholder='当前余额'
33
+ v-model="row.f_balance_amount" readonly >
34
+ </div>
35
+ <div class="col-sm-4 form-group" v-if="row.f_meter_type == '气量卡表' || row.f_meter_type == '金额卡表'"
36
+ :class="[$v.f_meter_base.required || $v.f_meter_base.dctest ? 'has-error' : 'has-success']">
37
+ <label class="font_normal_body">当前底数</label>
38
+ <input class="input_search" style="width:60%" type="text" placeholder='当前表已用气量'
39
+ @blur="meterBaseChange()"
40
+ v-validate:f_meter_base='{required: true}' v-model="model.f_meter_base" >
41
+ </div>
42
+ <div class="col-sm-4 form-group" v-if="model.f_meter_type!='' && model.f_meter_type!='气量卡表'"
43
+ :class="[$v.f_move_fee.required || $v.f_move_fee.dctest ? 'has-error' : 'has-success']">
44
+ <label class="font_normal_body">转气金额</label>
45
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_move_fee"
46
+ @blur="preamount()"
47
+ v-validate:f_move_fee='{required: true}' placeholder="转气金额">
48
+ </div>
49
+ <div class="col-sm-4 form-group" v-if="model.f_meter_type!='' && model.f_meter_type=='气量卡表'"
50
+ :class="[$v.f_move_fee.required || $v.f_move_fee.dctest ? 'has-error' : 'has-success']">
51
+ <label class="font_normal_body">转气金额</label>
52
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_move_fee"
53
+
54
+ v-validate:f_move_fee='{required: true}' placeholder="转气金额">
55
+ </div>
56
+ <div class="col-sm-4 form-group" v-if="model.f_meter_type!='' && model.f_meter_type=='气量卡表'"
57
+ :class="[$v.f_move_gas.required || $v.f_move_gas.dctest ? 'has-error' : 'has-success']">
58
+ <label class="font_normal_body">转气气量</label>
59
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_move_gas"
60
+ @blur="pregas()"
61
+ v-validate:f_move_gas='{required: true}' placeholder="转气气量">
62
+ </div>
63
+ <div class="col-sm-4 form-group" v-if="model.f_meter_type!='' && model.f_meter_type!='气量卡表'"
64
+ :class="[$v.f_move_gas.required || $v.f_move_gas.dctest ? 'has-error' : 'has-success']">
65
+ <label class="font_normal_body">转气气量</label>
66
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_move_gas"
67
+ v-validate:f_move_gas='{required: true}' placeholder="转气气量">
68
+ </div>
69
+ </div>
70
+
71
+ <div class="row">
72
+ <div class="col-sm-8">
73
+ <label for="f_paper_account" class="font_normal_body ">&nbsp;&nbsp;&nbsp;备注&nbsp;&nbsp;&nbsp;</label>
74
+ <input class="input_search" style="width:80%" v-model="model.f_comments">
75
+ </div>
76
+
77
+ </div>
78
+ </form>
79
+ <div style="text-align:right;">
80
+ <button class="button_search btn-gn" @click="confirm()" :disabled='!$v.valid'>确认</button>
81
+ <button class="button_clear btn-gn" @click="clean()">取消</button>
82
+ </div>
83
+ </validator>
84
+ <!--<print-bill :show="print" :bill-manager='config.hasBillManage' v-ref:printbill :bill-url='billUrl' v-on:toggle="clean" @printok="printok" :data='printModel'></print-bill>-->
85
+ </div>
86
+ </template>
87
+
88
+
89
+ <script>
90
+ let preamountGen = async function (self) {
91
+ let calFee = self.model.f_move_fee
92
+ if (self.firstPrice) {
93
+ self.model.f_move_gas = (calFee / self.firstPrice).toFixed(2)
94
+ }
95
+ }
96
+ let pregasGen = async function (self) {
97
+ self.model.f_move_gas = (self.model.f_move_gas - 0).toFixed(2)
98
+ self.model.f_move_fee = (self.model.f_move_gas * self.firstPrice).toFixed(2)
99
+ }
100
+ export default {
101
+ title: '转气',
102
+ data () {
103
+ return {
104
+ model: {
105
+ f_refund_fee: '',
106
+ f_comments: '',
107
+ f_meter_type: '',
108
+ f_user_name: '',
109
+ f_userfiles_id: '',
110
+ f_move_fee: 0,
111
+ f_move_gas: 0
112
+ },
113
+
114
+ blodid: '',
115
+ hasValidateBill: false,
116
+ validateOk: false,
117
+
118
+ printModel: {},
119
+ firstPrice: '',
120
+ print: false,
121
+ billUrl: '',
122
+ billData: {
123
+ url: 'rs/report/refund_sell',
124
+ bill: ''
125
+ },
126
+
127
+ // 下拉框值
128
+ paytype: this.$appdata.getParam('付款方式'),
129
+ printstyle: this.$appdata.getParam('打印格式')
130
+ }
131
+ },
132
+ props: ['row'],
133
+ ready () {
134
+ let self = this
135
+ this.$resetpost('rs/logic/getFirstPrice', {f_stairprice_id: this.row.f_stairprice_id}, {resolveMsg: '获取一阶气价成功', rejectMsg: '获取一阶气价失败'}).then((res)=> {
136
+ self.firstPrice = res.data
137
+ })
138
+ console.log(this.firstPrice)
139
+ },
140
+ methods: {
141
+ meterBaseChange () {
142
+ if (this.model.f_meter_base && this.model.f_meter_base > 0 && this.model.f_meter_base <= this.row.f_total_gas) {
143
+ this.model.f_move_gas = (this.row.f_total_gas - this.model.f_meter_base).toFixed(2)
144
+ }
145
+ if (this.model.f_meter_base > this.row.f_total_gas) {
146
+ this.$showAlert('转气底数不能大于总购气量', 'warning', 1500)
147
+ this.model.f_meter_base = ''
148
+ return
149
+ }
150
+ if (this.model.f_move_gas && this.model.f_move_gas > 0) {
151
+ try {
152
+ pregasGen(this)
153
+ } catch (error) {
154
+ this.$showAlert(`划价错误,错误类型:${error}`, 'danger', 0)
155
+ }
156
+ } else {
157
+ this.model.f_move_gas = 0
158
+ }
159
+ },
160
+ preamount () {
161
+ try {
162
+ preamountGen(this)
163
+ } catch (error) {
164
+ this.$showAlert(`发卡售气划价错误,错误类型:${error}`, 'danger', 0)
165
+ }
166
+ },
167
+ pregas () {
168
+ if (this.model.f_move_gas && this.model.f_move_gas > 0) {
169
+ try {
170
+ pregasGen(this)
171
+ } catch (error) {
172
+ this.$showAlert(`划价错误,错误类型:${error}`, 'danger', 0)
173
+ }
174
+ } else {
175
+ this.model.f_move_gas = 0
176
+ }
177
+ },
178
+ async getuser (val) {
179
+ if (val == this.row.f_userinfo_code) {
180
+ this.$showAlert('不能给自己转气', 'warning', 1500)
181
+ return
182
+ }
183
+ let res = await this.$resetpost('rs/sql/sale_getUser',
184
+ {data: {condition: `i.f_userinfo_code='${val}' and i.f_orgid='${this.$login.f.orgid}'`}}, {resolveMsg: null, rejectMsg: null})
185
+ console.log(res.data)
186
+ if (res.data.length > 0) {
187
+ this.model.f_user_name = res.data[0].f_user_name
188
+ this.model.f_meter_type = res.data[0].f_meter_type
189
+ this.model.f_userfiles_id = res.data[0].f_userfiles_id
190
+ } else {
191
+ this.$showAlert('输入的用户编号不正确', 'warning', 1500)
192
+ }
193
+ },
194
+ async confirm () {
195
+ if (this.model.f_move_fee <= 0) {
196
+ this.$showAlert('转气金额和气量不能为0或小于0', 'warning', 1500)
197
+ return
198
+ }
199
+ if (this.row.f_meter_type == '机表' && this.row.f_balance < this.model.f_move_fee) {
200
+ this.$showAlert('转气金额不能大于余额', 'warning', 1500)
201
+ return
202
+ }
203
+ if (this.row.f_meter_type == '物联网表' && this.row.f_balance_amount < this.model.f_move_fee) {
204
+ this.$showAlert('转气金额不能大于余额', 'warning', 1500)
205
+ return
206
+ }
207
+ if (!this.model.f_meter_type) {
208
+ this.$showAlert('请先输入目标用户信息', 'warning', 1500)
209
+ return
210
+ }
211
+
212
+ let param = {
213
+ f_user_id: this.row.f_user_id,
214
+ f_userfiles_id: this.row.f_userfiles_id,
215
+ userfilesid: this.model.f_userfiles_id,
216
+ version: this.row.version,
217
+ f_move_fee: this.model.f_move_fee,
218
+ f_meter_base: this.model.f_meter_base,
219
+ f_move_gas: this.model.f_move_gas,
220
+ f_comments: this.model.f_comments,
221
+ f_billing: this.row.f_billing,
222
+ f_userinfo_code: this.model.f_userinfo_code,
223
+ f_price_id: this.row.f_price_id,
224
+ f_orgid: this.$login.f.orgid,
225
+ f_stairprice_id: this.row.f_stairprice_id,
226
+ operInfo: {
227
+ f_operator: this.$login.f.name,
228
+ f_operatorid: this.$login.f.id,
229
+ f_orgid: this.$login.f.orgid,
230
+ f_orgname: this.$login.f.orgs,
231
+ f_depid: this.$login.f.depids,
232
+ f_depname: this.$login.f.deps
233
+ }
234
+ }
235
+
236
+ let res = await this.$resetpost('rs/logic/movegas', {data: param}, {warnMsg: `确定要进行转气吗?`, resolveMsg: '转气成功!!', rejectMsg: '转气失败!!请重试!!'})
237
+ this.$dispatch('success')
238
+ },
239
+ clean () {
240
+ this.$dispatch('refresh')
241
+ },
242
+ printok () {
243
+ this.$dispatch('success')
244
+ },
245
+ validateBill (val) {
246
+ this.validateOk = !val.isOk
247
+ this.billData.bill = val.bill
248
+ }
249
+ }
250
+ }
251
+ </script>
@@ -111,4 +111,6 @@ export default function () {
111
111
  Vue.component('charge-modal', (resolve) => { require(['./ChargeModal'], resolve) })
112
112
  // 表具停用
113
113
  Vue.component('disable-manage', (resolve) => { require(['./business/MeterDisable/DisableManage'], resolve) })
114
+ // 转气(荣成转气按一阶计算)
115
+ Vue.component('gas-move', (resolve) => { require(['./gasmove'], resolve) })
114
116
  }