telephone-clients 4.0.0-1-89 → 4.0.0-1-91

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.
Files changed (32) hide show
  1. package/package.json +2 -2
  2. package/src/components/pc/MaintenanceWorker.vue +152 -0
  3. package/src/components/pc/NewRepairPaper.vue +704 -704
  4. package/src/components/pc/NewRepairTablePaper.vue +442 -442
  5. package/src/components/pc/WorkHistory.vue +650 -650
  6. package/src/components/pc/WorkListNew.vue +838 -838
  7. package/src/components/sendsingle/onlinecharge.vue +424 -424
  8. package/src/components/workorder/ChangeMeterPageNew.vue +663 -663
  9. package/src/components/workorder/ChangeMeterUserInfo.vue +130 -130
  10. package/src/components/workorder/RepairFirstV.vue +736 -736
  11. package/src/components/workorder/RepairInfo.vue +178 -178
  12. package/src/components/workorder/RepairOrderT.vue +713 -713
  13. package/src/components/workorder/oldMeterPage.vue +104 -104
  14. package/src/components/workorder/repairFirstTable.vue +715 -715
  15. package/src/filiale/jinhong/android/FaultAll.vue +936 -936
  16. package/src/filiale/jinhong/android/ZHihuanFirst.vue +540 -540
  17. package/src/filiale/jinhong/pc/WorkListAllNew.vue +884 -884
  18. package/src/filiale/jinhong/telephone.js +10 -10
  19. package/src/filiale/jinhong/telephoneAndroid.js +13 -13
  20. package/src/filiale/meihekou/android/Othercharge.vue +454 -454
  21. package/src/filiale/meihekou/android/PhoneStandWorkNew.vue +692 -692
  22. package/src/filiale/meihekou/android/ServiceOnlineQuery.vue +477 -477
  23. package/src/filiale/meihekou/pc/WorkListAllNew.vue +925 -901
  24. package/src/filiale/meihekou/pc/WorkListNew.vue +1113 -1049
  25. package/src/filiale/meihekou/telephoneAndroid.js +26 -26
  26. package/src/filiale/xinjiangdexin/telephone.js +16 -16
  27. package/src/filiale/xinliansihui/android/FaultAll.vue +923 -923
  28. package/src/filiale/xinliansihui/android/RepairFirstV.vue +734 -734
  29. package/src/filiale/xinliansihui/android/RepairOrderT.vue +713 -713
  30. package/src/main.js +1 -1
  31. package/src/telephone-android.js +425 -425
  32. package/src/telephone.js +799 -796
@@ -1,663 +1,663 @@
1
- <template>
2
- <div>
3
- <div style="height: auto;width: 100%">
4
- <div v-if="!showTable">
5
- <div class="row app-row">
6
- <div class="col-xs-4" style="margin-top: 5px">
7
- <img src="../../assets/换表.png" style="width: 20px;margin-bottom: 5px" alt="">
8
- <label class="font text-left">表底数</label>
9
- </div>
10
- <div class="col-xs-7">
11
- <input type="text" class ="input_search input_ys" placeholder="请输入表底数..." v-model="f_meter_base">
12
- </div>
13
- </div>
14
- <div class="row app-row" v-if="item.f_meter_type == '金额卡表'">
15
- <div class="col-xs-4" style="margin-top: 5px">
16
- <img src="../../assets/换表.png" style="width: 20px;margin-bottom: 5px" alt="">
17
- <label class="font text-left">剩余金额</label>
18
- </div>
19
- <div class="col-xs-7">
20
- <input type="text" class ="input_search input_ys" placeholder="请输入剩余金额..." v-model="f_remanent_money">
21
- </div>
22
- </div>
23
- <div class="row text-center" >
24
- <button type="button" style="width: 28%;" @click="ConfirmOk()">确认</button>
25
- </div>
26
- </div>
27
- <div v-if="showTable">
28
- <div class="row app-row" style="margin-top: 10px">
29
- <div class="col-xs-4" style="margin-top: 5px;">
30
- <img src="../../assets/换表.png" style="width: 20px;margin-bottom: 5px" alt="">
31
- <label class="font text-left">换表类型</label>
32
- </div>
33
- <v-select
34
- :value.sync="model.f_type"
35
- :options='changetypes'
36
- placeholder='请选择'
37
- close-on-select
38
- :search="false"
39
- value-single
40
- style="margin-bottom: 10px;"
41
- v-model="model.f_type"
42
- ></v-select>
43
- </div>
44
- <div class="row app-row" v-if="model.f_type==='换新表'">
45
- <div class="col-xs-4" style="margin-top: 5px;">
46
- <img src="../../assets/换表.png" style="width: 20px;margin-bottom: 5px" alt="">
47
- <label class="font text-left" >是否同步</label>
48
- </div>
49
- <v-select
50
- :value.sync="model.f_ladder_sync"
51
- :options='isSync'
52
- placeholder='请选择'
53
- close-on-select
54
- :search="false"
55
- value-single
56
- style="margin-bottom: 10px;"
57
- v-model="model.f_ladder_sync"
58
- ></v-select>
59
- </div>
60
- <div class="row app-row" v-if="model.f_type==='换新表'">
61
- <div class="col-xs-4" style="margin-top: 5px;">
62
- <img src="../../assets/换表.png" style="width: 20px;margin-bottom: 5px" alt="">
63
- <label class="font text-left" >新表品牌</label>
64
- </div>
65
- <v-select
66
- :value.sync="model.f_gasbrand_id"
67
- :options='allBrandList'
68
- placeholder='请选择'
69
- close-on-select
70
- :search="false"
71
- value-single
72
- style="margin-bottom: 10px;"
73
- v-model="model.f_gasbrand_id"
74
- ></v-select>
75
- </div>
76
- <div class="row app-row" v-if="model.f_type==='换新表'">
77
- <div class="col-xs-4" style="margin-top: 5px;">
78
- <img src="../../assets/换表.png" style="width: 20px;margin-bottom: 5px" alt="">
79
- <label class="font text-left" >新表型号</label>
80
- </div>
81
- <v-select
82
- :value.sync="model.f_gasmold_id"
83
- :options='newModelList'
84
- placeholder='请选择'
85
- close-on-select
86
- style="margin-bottom: 10px;"
87
- value-single
88
- :search="false"
89
- v-model="model.f_gasmold_id"
90
- ></v-select>
91
- </div>
92
- <div class="row app-row" v-if="model.f_type==='换新表' && isOpenType">
93
- <div class="col-xs-4" style="margin-top: 5px">
94
- <img src="../../assets/换表.png" style="width: 20px;margin-bottom: 5px" alt="">
95
- <label class="font text-left">开户方式</label>
96
- </div>
97
- <v-select
98
- :value.sync="model.f_open_type"
99
- :options='openTypes'
100
- placeholder='请选择开户方式'
101
- close-on-select
102
- style="margin-bottom: 10px;"
103
- value-single
104
- :search="false"
105
- v-model="model.f_open_type"
106
- ></v-select>
107
- </div>
108
- <div class="row app-row" v-if="model.f_type==='换新表'">
109
- <div class="col-xs-4" style="margin-top: 5px">
110
- <img src="../../assets/换表.png" style="width: 20px;margin-bottom: 5px" alt="">
111
- <label class="font text-left">新表表号</label>
112
- </div>
113
- <div class="col-xs-7">
114
- <input type="text" class ="input_search input_ys" placeholder="请输入新表表号..." v-model="model.f_meternumber">
115
- </div>
116
- </div>
117
- <div class="row app-row" v-if="model.f_type==='换新表'">
118
- <div class="col-xs-4" style="margin-top: 5px">
119
- <img src="../../assets/换表.png" style="width: 20px;margin-bottom: 5px" alt="">
120
- <label class="font text-left">新表底数</label>
121
- </div>
122
- <div class="col-xs-7">
123
- <input type="number" class ="input_search input_ys" placeholder="请输入新表底数..." v-model="model.f_meter_base">
124
- </div>
125
- </div>
126
- <div class="row app-row" v-if="model.f_type==='换新表'">
127
- <div class="col-xs-4" style="margin-top: 5px">
128
- <img src="../../assets/换表.png" style="width: 20px;margin-bottom: 5px" alt="">
129
- <label class="font text-left">新表封号</label>
130
- </div>
131
- <div class="col-xs-7">
132
- <input type="text" class ="input_search input_ys" placeholder="请输入新表封号..." v-model="model.f_metertitles">
133
- </div>
134
- </div>
135
- <div class="row app-row">
136
- <div class="col-xs-4" style="margin-top: 5px">
137
- <img src="../../assets/换表.png" style="width: 20px;margin-bottom: 5px" alt="">
138
- <label class="font text-left">换表原因</label>
139
- </div>
140
- <v-select
141
- :value.sync="model.f_comments"
142
- :options='comments'
143
- placeholder='请选择换表原因'
144
- close-on-select
145
- style="margin-bottom: 10px;"
146
- value-single
147
- :search="false"
148
- v-model="model.f_comments"
149
- ></v-select>
150
- <!-- <div class="col-xs-7">-->
151
- <!-- <input type="text" class ="input_search input_ys" placeholder="请输入换表原因..." v-model="model.f_comments">-->
152
- <!-- </div>-->
153
- </div>
154
- <div class="row app-row">
155
- <div class="col-xs-4" style="margin-top: 5px">
156
- <img src="../../assets/换表.png" style="width: 20px;margin-bottom: 5px" alt="">
157
- <label class="font text-left">换表人</label>
158
- </div>
159
- <div class="col-xs-7">
160
- <input type="text" class ="input_search input_ys" placeholder="请输入换表人..." v-model="model.f_operator">
161
- </div>
162
- </div>
163
- <div class="row app-row">
164
- <div class="col-xs-4" style="margin-top: 5px">
165
- <img src="../../assets/换表.png" style="width: 20px;margin-bottom: 5px" alt="">
166
- <label class="font text-left">服务费</label>
167
- </div>
168
- <div class="col-xs-7">
169
- <input type="text" class ="input_search input_ys" placeholder="请输入服务费..." v-model="model.f_service_fee">
170
- </div>
171
- </div>
172
-
173
- <div class="row app-row">
174
- <div class="col-xs-4" style="margin-top: 5px">
175
- <img src="../../assets/换表.png" style="width: 20px;margin-bottom: 5px" alt="">
176
- <label class="font text-left" >旧表底数</label>
177
- </div>
178
- <div class="col-xs-7">
179
- <input type="text" class ="input_search input_ys" placeholder="请输入转移气量..." readonly v-model="model.f_using_base_old"></div>
180
- </div>
181
- <div class="row app-row" v-if="model.f_balance">
182
- <div class="col-xs-4" style="margin-top: 5px">
183
- <img src="../../assets/换表.png" style="width: 20px;margin-bottom: 5px" alt="">
184
- <label class="font text-left" >账户余额</label>
185
- </div>
186
- <div class="col-xs-7">
187
- <input type="text" class ="input_search input_ys" v-model="model.f_balance" readonly></div>
188
- </div>
189
- <div class="row app-row">
190
- <div class="col-xs-4" style="margin-top: 5px">
191
- <img src="../../assets/换表.png" style="width: 20px;margin-bottom: 5px" alt="">
192
- <label class="font text-left" >补气气量</label>
193
- </div>
194
- <div class="col-xs-7">
195
- <input type="text" class ="input_search input_ys" placeholder="请输入转移气量..." v-model="model.f_remanent_gas" ></div>
196
- </div>
197
- <div class="row app-row">
198
- <div class="col-xs-4" style="margin-top: 5px">
199
- <img src="../../assets/换表.png" style="width: 20px;margin-bottom: 5px" alt="">
200
- <label class="font text-left" >补气金额</label>
201
- </div><div class="col-xs-7">
202
- <input type="text" class ="input_search input_ys" placeholder="请输入转移金额..." v-model="model.f_remanent_money" ></div>
203
- </div>
204
- <div class="row app-row">
205
- <div class="col-xs-4" style="margin-top: 5px">
206
- <img src="../../assets/换表.png" style="width: 20px;margin-bottom: 5px" alt="">
207
- <label class="font text-left" >补气单价</label>
208
- </div><div class="col-xs-7">
209
- <input type="text" class ="input_search input_ys" placeholder="请输入补气单价..." v-model="model.f_remanent_price"></div>
210
- </div>
211
- <div class="row app-row" v-if="model.f_ladder_sync==='同步'">
212
- <div class="col-xs-4" style="margin-top: 5px">
213
- <img src="../../assets/换表.png" style="width: 20px;margin-bottom: 5px" alt="">
214
- <label class="font text-left" >阶梯使用量</label>
215
- </div><div class="col-xs-7">
216
- <input type="text" class ="input_search input_ys" placeholder="请输入阶梯使用量..." v-model="model.f_stair_use" ></div>
217
- </div>
218
- <div class="row auto" style="margin: 5px 0" v-if="img_upload">
219
- <p class="panel-title text-left font" style="text-align: center;font-weight: bold;">新表照片:</p>
220
- <div class="panel" style="padding: 7px 20px 0px 23px;">
221
- <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 100%;height: 200px;position: relative">
222
- <img-self :src="f_table_path_new" alt="新表照片" :width="120" :height="150" capture="camera" type="file" ></img-self>
223
- <div class="row text-right div-photo" style="height: 27px;margin-top: -30px">
224
- <img src="../../assets/remove.png" @click="delfile('f_table_path_new', f_table_path_new)" alt=""></img>
225
- <button type="button" name="button"style="height: 32px;" class="btn btn-primary btn-photo" @click="takePic('f_table_path_new','新表照片')" >拍照</button>
226
- </div>
227
- </div>
228
- </div>
229
- </div>
230
- <div class="row auto" style="margin: 5px 0" v-if="img_upload">
231
- <p class="panel-title text-left font" style="text-align: center;font-weight: bold;">旧表照片:</p>
232
- <div class="panel" style="padding: 7px 20px 0px 23px;">
233
- <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 100%;height: 200px;position: relative">
234
- <img-self :src="f_table_path_old" alt="旧表照片" :width="120" :height="150" capture="camera" type="file" ></img-self>
235
- <div class="row text-right div-photo" style="height: 27px;margin-top: -30px">
236
- <img src="../../assets/remove.png" @click="delfile2('f_table_path_old', f_table_path_old)" alt=""></img>
237
- <button type="button" name="button"style="height: 32px;" class="btn btn-primary btn-photo" @click="takePic2('f_table_path_old','旧表照片')" >拍照</button>
238
- </div>
239
- </div>
240
- </div>
241
- </div>
242
- <div class="row text-center" style="margin-top: 25px;margin-bottom: 30px">
243
- <button type="button" class="btn btn-lg btn-font btn-color" style="width: 28%;" @click="confirm()">确认</button>
244
- </div>
245
- </div>
246
- </div>
247
- <work-busy :is-busy="isBusy"></work-busy>
248
- </div>
249
- </template>
250
- <script>
251
- import Vue from 'vue'
252
- import {HttpResetClass} from "vue-client";
253
- import * as Util from '../Util'
254
- import {isEmpty} from "../Util";
255
- import ReadCardPage from '../workorder/ReadCardPage'
256
- export default {
257
- title: '在线换表',
258
- props: ['service'],
259
- data() {
260
- return {
261
- showTable:false,
262
- isBusy:false,
263
- item:{},
264
- remanent:{},
265
- img_upload:this.$appdata.getSingleValue('在线换表是否上传图片') || false,
266
- f_table_path_new:'',
267
- f_table_path_old:'',
268
- model:{
269
- f_change_cost:0,
270
- f_table_path_new:'',
271
- f_table_path_old:'',
272
- f_stair_use:0,
273
- f_ladder_sync:'', //是否同步
274
- f_using_base_old:'',//旧表底数
275
- f_type: '',//换表类型
276
- f_comments: '',// 备注
277
- f_gasbrand_id: null, //新表品牌id
278
- f_gasmold_id: null, //新表型号id
279
- f_balance:'', //账户余额
280
- f_remanent_gas:'', // 补气量
281
- f_remanent_money:'', // 补气金额
282
- f_remanent_price: '', // 补气单价
283
- f_userfiles_id:'',
284
- f_open_type:'',
285
- f_depname: Vue.user.deps,
286
- f_depid : Vue.user.depids,
287
- f_orgid : Vue.user.orgid,
288
- f_orgname : Vue.user.orgs,
289
- f_operator: Vue.user.name,
290
- f_operatorid: Vue.user.id,
291
- f_meternumber:"",
292
- f_meter_base:null,
293
- f_metertitles:"",
294
- f_service_fee:0,
295
- },
296
- comments:this.$appdata.getParam('在线换表原因'),
297
- openTypes:[{label: "指令开户", value: "指令开户"}, {label: "发卡开户", value: "发卡开户"}],
298
- changetypes: [{label: "换新表", value: "换新表"}, {label: "气表清零", value: "气表清零"}],
299
- changeReasonList: [{label: "漏气", value: "漏气"}, {label: "燃气表损坏", value: "燃气表损坏"}],
300
- changeReason2List: [{label: "表计量异常", value: "表计量异常"}, {label: "表不走", value: "表不走"}],
301
- changeTypeList: [{label: "换新表", value: "换新表"}, {label: "清零", value: "清零"}],
302
- originalTypeList: [{label: "请选择。。。", value: ""},{label: "物联网表", value: "物联网表"}, {label: "金额卡表", value: "金额卡表"}, {label: "气量卡表", value: "气量卡表"}, {label: "机表", value: "机表"}, {label: "远传表", value: "远传表"}],
303
- newBrandList: [{label: "111", value: "111"}, {label: "222", value: "222"}],
304
- newTypeList: [{label: "G2.5", value: "G2.5"}, {label: "G4", value: "G4"}],
305
- avoidReasonList: [{label: "原因1", value: "原因1"}, {label: "原因2", value: "原因2"}],
306
- switchTypeList: [{label: "金额", value: "金额"}, {label: "气量", value: "气量"}],
307
- // filialeid: Vue.user.orgid,
308
- row:{}, //用户信息
309
- model1: {},// 换表的model值
310
- isSync:[{label: "同步", value: "同步"},{label: "不同步", value: "不同步"}],
311
- allBrandList: [],//所有表品牌
312
- allModelList: [],//所有表型号
313
- newModelList: [],
314
- imgArr:{},
315
- gasbrands:[],
316
- isOpenType:false,
317
- f_userinfo_code: '',
318
- f_orgid: '',
319
- f_userfiles_id: '', //新表档案id
320
- islot: false
321
- }
322
- },
323
- methods: {
324
- async ConfirmOk() {
325
- if (!this.f_meter_base) {
326
- this.$showMessage('请填写表底数后在点击换表')
327
- return
328
- }
329
- if (this.service.f_meter_type == '金额卡表' && !this.f_remanent_money) {
330
- this.$showMessage('请填写剩余金额后在点击换表')
331
- return
332
- }
333
- let http1 = new HttpResetClass()
334
- let con = {
335
- condition: ` ui.f_userinfo_id = '${this.service.f_userinfo_id}' `
336
- }
337
- let resp = await http1.load('POST', `${this.$androidUtil.getProxyUrl()}/af-telephone/rs/sql/onlinequeryuser`, {data: con}, {
338
- resolveMsg: null,
339
- rejectMsg: null
340
- })
341
- if (resp.data.length > 0) {
342
- this.item = resp.data[0]
343
- }
344
- this.getallBrandList()
345
- this.model.f_userfiles_id = this.item.f_userfiles_id
346
- let param = {}
347
- if (this.item.f_meter_type == '金额卡表') {
348
- param = {
349
- "f_userfiles_id": this.item.f_userfiles_id,
350
- "f_meter_base": this.f_meter_base,
351
- "f_remanent_money": this.f_remanent_money
352
- }
353
- } else {
354
- param = {
355
- "f_userfiles_id": this.item.f_userfiles_id,
356
- "f_meter_base": this.f_meter_base
357
- }
358
- }
359
- let http2= new HttpResetClass()
360
- let res = await http2.load('POST',`${this.$androidUtil.getProxyUrl()}/api/af-revenue/logic/third_meter_base_check`, {data: param}, {
361
- resolveMsg: null,
362
- rejectMsg: null
363
- }).then(async (res) => {
364
- if (res.data) {
365
- this.remanent = Object.assign({}, res.data.data, {f_using_base_old: param.f_meter_base})
366
- this.model.f_balance = this.remanent.f_balance?res.data.data.f_balance:0
367
- this.model.f_remanent_gas = this.remanent.f_remanent_gas?res.data.data.f_remanent_gas:0
368
- this.model.f_remanent_money = this.remanent.f_remanent_money?res.data.data.f_remanent_money:0
369
- this.model.f_remanent_price = this.remanent.f_remanent_price?res.data.data.f_remanent_price:0
370
- this.model.f_using_base_old = this.remanent.f_using_base_old
371
- this.showTable = true
372
- } else {
373
- this.$showMessage(res.data.msg)
374
- return
375
- }
376
- })
377
- },
378
- uploadfile(){
379
- const fileUpData = HostApp.bzLogic({
380
- 'logic': 'imgUpload',
381
- 'data': this.imgArr
382
- })
383
- this.$showMessage(fileUpData.msg)
384
- },
385
- cameraCallBack(prop, fileName) {
386
- HostApp.__this__.f_table_path_new = fileName
387
- HostApp.__callback__ = null
388
- HostApp.__this__ = null
389
- },
390
- takePic(prop, title) {
391
- this.delfile('f_table_path_new', this.f_table_path_new)
392
- HostApp.__callback__ = this.cameraCallBack
393
- HostApp.__this__ = this
394
- let fileName
395
- if (!this.f_table_path_new || this.f_table_path_new.includes("nopic.png")) {
396
- fileName = Util.guid() + '-' + prop + '.jpg'
397
- } else {
398
- fileName = Util.getFileName(this.f_table_path_new)
399
- }
400
- HostApp._open_a_page({
401
- type: 'boomerang',
402
- page: 'com.aofeng.hybrid.android.peripheral.CameraActivity',
403
- param: {
404
- file: fileName,
405
- requestCode: 111,
406
- callback: 'javascript:HostApp.__callback__("' + prop + '", "%s");',
407
- watermark: title + '\t时间:' + Util.toStandardTimeString()
408
- }
409
- })
410
- },
411
- cameraCallBack2(prop, fileName) {
412
- console.log('fileName=', fileName)
413
- console.log('prop=', prop)
414
- HostApp.__this__.f_table_path_old = fileName
415
- HostApp.__callback__ = null
416
- HostApp.__this__ = null
417
- },
418
- takePic2(prop, title) {
419
- this.delfile2('f_table_path_old', this.f_table_path_old)
420
- HostApp.__callback__ = this.cameraCallBack2
421
- HostApp.__this__ = this
422
- let fileName
423
- if (!this.f_table_path_old || this.f_table_path_old.includes("nopic.png")) {
424
- fileName = Util.guid() + '-' + prop + '.jpg'
425
- } else {
426
- fileName = Util.getFileName(this.f_table_path_old)
427
- }
428
- HostApp._open_a_page({
429
- type: 'boomerang',
430
- page: 'com.aofeng.hybrid.android.peripheral.CameraActivity',
431
- param: {
432
- file: fileName,
433
- requestCode: 111,
434
- callback: 'javascript:HostApp.__callback__("' + prop + '", "%s");',
435
- watermark: title + '\t时间:' + Util.toStandardTimeString()
436
- }
437
- })
438
- },
439
- delfile2(prop, fileName) {
440
- if (fileName == Vue.nopic)
441
- return
442
- else {
443
- HostApp.delfile(fileName)
444
- this.f_table_path_old = Vue.nopic
445
- }
446
- },
447
- delfile(prop, fileName) {
448
- if (fileName == Vue.nopic)
449
- return
450
- else {
451
- HostApp.delfile(fileName)
452
- this.f_table_path_new = Vue.nopic
453
- }
454
- },
455
- getStairGas(){
456
- this.$resetpost(`${this.$androidUtil.getProxyUrl()}/api/af-revenue/logic/commonCal`, {data: {model: this.item, isGasValue: 0, value: 0}}, {resolveMsg: null, rejectMsg: '获取阶梯使用情况出错'}).then((res)=>{
457
- this.model.f_stair_use = res.data.sumamount?res.data.sumamount:0
458
- })
459
- },
460
- getallBrandList() {
461
- //tag
462
- this.$resetpost(`${this.$androidUtil.getProxyUrl()}/api/af-revenue/logic/getSaleInitData`, {data: {f_orgid: this.item.f_orgid}},{resolveMsg: null, rejectMsg: null}).then((row) => {
463
- //tag
464
- //tag)
465
- if(row.data.gasbrands) {
466
- this.gasbrands = row.data.gasbrands
467
- row.data.gasbrands.forEach((item) => {
468
- let BrandList = {label: item.f_meter_brand, value: item.id}
469
- this.allBrandList.push(BrandList)
470
- item.gasmodel.forEach(item=>{
471
- this.allModelList.push({label: item.f_meter_style, value: item.id,f_gasbrand_id: item.f_gasbrand_id})
472
- })
473
- })
474
- }else {
475
- this.$showMessage('表品牌获取失败!')
476
- }
477
- //获取阶梯使用量
478
- this.getStairGas()
479
- })
480
- },
481
- async writeCard(cardParams) {
482
- try {
483
- //tag
484
- let fengongsi = this.$appdata.getSingleValue('分公司')
485
- if (!fengongsi) {
486
- this.$showMessage('分公司获取失败!')
487
- this.isBusy = false
488
- return
489
- }
490
- let posinfo2 = HostApp.read(fengongsi)
491
- //tag)
492
- cardParams = Object.assign({},cardParams,{AREA:fengongsi,ulen:0})
493
- //tag)
494
- const writeResult = HostApp.issue(JSON.stringify(cardParams))
495
- //tag
496
- //tag
497
- if(writeResult.code === 200){
498
- this.$showMessage('换表成功')
499
- this.isBusy = false
500
- }else{
501
- this.$showMessage('换表成功,写卡失败')
502
- this.isBusy = false
503
- }
504
- }catch (e) {
505
- this.$showMessage('换表成功,写卡失败,请联系营业厅处理')
506
- this.isBusy = false
507
- }
508
- },
509
- confirmCheck(){
510
- if(!this.model.f_type){
511
- return '请选择换表类型'
512
- }
513
- //tag
514
- if(this.model.f_type === '换新表'){
515
- if(!this.model.f_ladder_sync){
516
- return '请选择是否同步'
517
- }
518
- if(!this.model.f_gasbrand_id){
519
- return '请选择新表品牌'
520
- }
521
- if(!this.model.f_gasmold_id){
522
- return '请选择新表型号'
523
- }
524
- if(!this.model.f_meternumber){
525
- return '请输入新表表号'
526
- }
527
- if(!this.model.f_meter_base){
528
- return '请输入新表底数'
529
- }
530
- // //tag
531
- if(this.isOpenType && (!this.model.f_open_type)){
532
- return '请选择开户方式'
533
- }
534
- }else if (this.model.f_type === '气表清零') {
535
- this.model = Object.assign({},this.model,
536
- {f_ladder_sync:"",
537
- f_gasbrand_id: null,
538
- f_gasmold_id: null,
539
- f_meternumber: '',
540
- f_meter_base: null,
541
- f_open_type: ''
542
- })
543
- return ''
544
- }
545
- return ''
546
- },
547
- async confirm () {
548
- const error = this.confirmCheck()
549
- if(error){
550
- this.$showMessage(error)
551
- return
552
- }
553
- let newnumberdata = {
554
- f_meternumber:this.model.f_meternumber,
555
- f_gasbrand_id:this.model.f_gasbrand_id
556
- }
557
- let checknumber = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/api/af-revenue/logic/third_meter_number_check`, {data: newnumberdata},{resolveMsg: null, rejectMsg: null})
558
- if(checknumber.data){
559
- if(checknumber.data.code != '0000'){
560
- this.$showMessage(checknumber.data.msg)
561
- return
562
- }
563
- }else{
564
- this.$showMessage('网络异常,请稍后再试!')
565
- return
566
- }
567
- this.model.f_table_path_new=this.extractFileName(this.f_table_path_new)
568
- this.model.f_table_path_old=this.extractFileName(this.f_table_path_old)
569
- this.isBusy = true
570
- let _this = this
571
- _this.$resetpost(`${_this.$androidUtil.getProxyUrl()}/api/af-revenue/logic/third_change_meter`, {data: this.model},{resolveMsg: null, rejectMsg: null}).then((res) => {
572
- if(res.data){
573
- if (this.f_table_path_new || this.f_table_path_old){
574
- this.imgArr = {
575
- new_path: this.f_table_path_new || '',
576
- old_path: this.f_table_path_old || '',
577
- fusetype:'换表_清零',
578
- f_userinfo_id:this.item.f_userinfo_id
579
- }
580
- this.uploadfile()
581
- }
582
- if(res.data.code === "0000"){
583
- this.$root.$emit('tableChenge', res.data.changemeter_id.id || '');
584
- if(this.model.f_type !== '换新表'){
585
- this.isBusy = false
586
- this.$showMessage('换表成功')
587
- return
588
- }
589
- const arr =this.gasbrands.filter(res => res.id === this.model.f_gasbrand_id)
590
- if(arr[0].f_meter_type.indexOf('卡表') !==-1 || this.model.f_open_type === '发卡开户'){
591
- const cardParams = res.data.cardParams
592
- this.writeCard(cardParams)
593
- }else{
594
- this.isBusy = false
595
- this.$showMessage('换表成功')
596
- }
597
- }else if(res.data.code === "9990"){
598
- this.isBusy = false
599
- this.$showMessage('换表失败'+res.data.msg)
600
- }
601
- }else {
602
- this.$showMessage('请求出错!!!')
603
- this.isBusy = false
604
- }
605
- }).catch(e=>{
606
- this.$showMessage('请求异常!!!'+ e)
607
- this.isBusy = false
608
- })
609
- },
610
- extractFileName(filePath) {
611
- if (!filePath) return '';
612
- // 从完整路径中提取文件名
613
- return filePath.substring(filePath.lastIndexOf('/') + 1);
614
- },
615
- },
616
- ready () {
617
- // this.getallBrandList()
618
- },
619
- watch: {
620
- 'model.f_gasbrand_id' (val) {
621
- if(val){
622
- const arr = this.gasbrands.filter(res=>res.id === val)
623
- if(arr.length>0 && arr[0].f_hascard === '是'){
624
- this.isOpenType = true
625
- }else{
626
- this.isOpenType = false
627
- }
628
- this.newModelList = Object.assign([],this.allModelList.filter(res=>res.f_gasbrand_id === val))
629
- }
630
- }
631
- }
632
-
633
- }
634
- </script>
635
-
636
- <style scoped>
637
- .app-row {
638
- background-color: white;
639
- padding: 5px 10px 0 10px;
640
- border-bottom: 1px solid rgba(235, 235, 235, 0.7);
641
- }
642
- .btn-color{
643
- background-color: #FFFFFF;
644
- border-radius: 10px ;
645
- border: 1px solid #499EDF;
646
- }
647
- .input_ys {
648
- /*border: 1px solid #93B2D3 !important;*/
649
- border: none !important;
650
- width: 220px;
651
- height: 35px;
652
- }
653
- .btn_cz {
654
- background-color: #499edf;
655
- color:#FFFFFF;
656
- width: 65px;
657
- height: 40px;
658
- border-radius: 8px;
659
- font: 600 16px PingFang-SC-Bold;
660
- float: right;
661
- margin-right: 10px;
662
- }
663
- </style>
1
+ <template>
2
+ <div>
3
+ <div style="height: auto;width: 100%">
4
+ <div v-if="!showTable">
5
+ <div class="row app-row">
6
+ <div class="col-xs-4" style="margin-top: 5px">
7
+ <img src="../../assets/换表.png" style="width: 20px;margin-bottom: 5px" alt="">
8
+ <label class="font text-left">表底数</label>
9
+ </div>
10
+ <div class="col-xs-7">
11
+ <input type="text" class ="input_search input_ys" placeholder="请输入表底数..." v-model="f_meter_base">
12
+ </div>
13
+ </div>
14
+ <div class="row app-row" v-if="item.f_meter_type == '金额卡表'">
15
+ <div class="col-xs-4" style="margin-top: 5px">
16
+ <img src="../../assets/换表.png" style="width: 20px;margin-bottom: 5px" alt="">
17
+ <label class="font text-left">剩余金额</label>
18
+ </div>
19
+ <div class="col-xs-7">
20
+ <input type="text" class ="input_search input_ys" placeholder="请输入剩余金额..." v-model="f_remanent_money">
21
+ </div>
22
+ </div>
23
+ <div class="row text-center" >
24
+ <button type="button" style="width: 28%;" @click="ConfirmOk()">确认</button>
25
+ </div>
26
+ </div>
27
+ <div v-if="showTable">
28
+ <div class="row app-row" style="margin-top: 10px">
29
+ <div class="col-xs-4" style="margin-top: 5px;">
30
+ <img src="../../assets/换表.png" style="width: 20px;margin-bottom: 5px" alt="">
31
+ <label class="font text-left">换表类型</label>
32
+ </div>
33
+ <v-select
34
+ :value.sync="model.f_type"
35
+ :options='changetypes'
36
+ placeholder='请选择'
37
+ close-on-select
38
+ :search="false"
39
+ value-single
40
+ style="margin-bottom: 10px;"
41
+ v-model="model.f_type"
42
+ ></v-select>
43
+ </div>
44
+ <div class="row app-row" v-if="model.f_type==='换新表'">
45
+ <div class="col-xs-4" style="margin-top: 5px;">
46
+ <img src="../../assets/换表.png" style="width: 20px;margin-bottom: 5px" alt="">
47
+ <label class="font text-left" >是否同步</label>
48
+ </div>
49
+ <v-select
50
+ :value.sync="model.f_ladder_sync"
51
+ :options='isSync'
52
+ placeholder='请选择'
53
+ close-on-select
54
+ :search="false"
55
+ value-single
56
+ style="margin-bottom: 10px;"
57
+ v-model="model.f_ladder_sync"
58
+ ></v-select>
59
+ </div>
60
+ <div class="row app-row" v-if="model.f_type==='换新表'">
61
+ <div class="col-xs-4" style="margin-top: 5px;">
62
+ <img src="../../assets/换表.png" style="width: 20px;margin-bottom: 5px" alt="">
63
+ <label class="font text-left" >新表品牌</label>
64
+ </div>
65
+ <v-select
66
+ :value.sync="model.f_gasbrand_id"
67
+ :options='allBrandList'
68
+ placeholder='请选择'
69
+ close-on-select
70
+ :search="false"
71
+ value-single
72
+ style="margin-bottom: 10px;"
73
+ v-model="model.f_gasbrand_id"
74
+ ></v-select>
75
+ </div>
76
+ <div class="row app-row" v-if="model.f_type==='换新表'">
77
+ <div class="col-xs-4" style="margin-top: 5px;">
78
+ <img src="../../assets/换表.png" style="width: 20px;margin-bottom: 5px" alt="">
79
+ <label class="font text-left" >新表型号</label>
80
+ </div>
81
+ <v-select
82
+ :value.sync="model.f_gasmold_id"
83
+ :options='newModelList'
84
+ placeholder='请选择'
85
+ close-on-select
86
+ style="margin-bottom: 10px;"
87
+ value-single
88
+ :search="false"
89
+ v-model="model.f_gasmold_id"
90
+ ></v-select>
91
+ </div>
92
+ <div class="row app-row" v-if="model.f_type==='换新表' && isOpenType">
93
+ <div class="col-xs-4" style="margin-top: 5px">
94
+ <img src="../../assets/换表.png" style="width: 20px;margin-bottom: 5px" alt="">
95
+ <label class="font text-left">开户方式</label>
96
+ </div>
97
+ <v-select
98
+ :value.sync="model.f_open_type"
99
+ :options='openTypes'
100
+ placeholder='请选择开户方式'
101
+ close-on-select
102
+ style="margin-bottom: 10px;"
103
+ value-single
104
+ :search="false"
105
+ v-model="model.f_open_type"
106
+ ></v-select>
107
+ </div>
108
+ <div class="row app-row" v-if="model.f_type==='换新表'">
109
+ <div class="col-xs-4" style="margin-top: 5px">
110
+ <img src="../../assets/换表.png" style="width: 20px;margin-bottom: 5px" alt="">
111
+ <label class="font text-left">新表表号</label>
112
+ </div>
113
+ <div class="col-xs-7">
114
+ <input type="text" class ="input_search input_ys" placeholder="请输入新表表号..." v-model="model.f_meternumber">
115
+ </div>
116
+ </div>
117
+ <div class="row app-row" v-if="model.f_type==='换新表'">
118
+ <div class="col-xs-4" style="margin-top: 5px">
119
+ <img src="../../assets/换表.png" style="width: 20px;margin-bottom: 5px" alt="">
120
+ <label class="font text-left">新表底数</label>
121
+ </div>
122
+ <div class="col-xs-7">
123
+ <input type="number" class ="input_search input_ys" placeholder="请输入新表底数..." v-model="model.f_meter_base">
124
+ </div>
125
+ </div>
126
+ <div class="row app-row" v-if="model.f_type==='换新表'">
127
+ <div class="col-xs-4" style="margin-top: 5px">
128
+ <img src="../../assets/换表.png" style="width: 20px;margin-bottom: 5px" alt="">
129
+ <label class="font text-left">新表封号</label>
130
+ </div>
131
+ <div class="col-xs-7">
132
+ <input type="text" class ="input_search input_ys" placeholder="请输入新表封号..." v-model="model.f_metertitles">
133
+ </div>
134
+ </div>
135
+ <div class="row app-row">
136
+ <div class="col-xs-4" style="margin-top: 5px">
137
+ <img src="../../assets/换表.png" style="width: 20px;margin-bottom: 5px" alt="">
138
+ <label class="font text-left">换表原因</label>
139
+ </div>
140
+ <v-select
141
+ :value.sync="model.f_comments"
142
+ :options='comments'
143
+ placeholder='请选择换表原因'
144
+ close-on-select
145
+ style="margin-bottom: 10px;"
146
+ value-single
147
+ :search="false"
148
+ v-model="model.f_comments"
149
+ ></v-select>
150
+ <!-- <div class="col-xs-7">-->
151
+ <!-- <input type="text" class ="input_search input_ys" placeholder="请输入换表原因..." v-model="model.f_comments">-->
152
+ <!-- </div>-->
153
+ </div>
154
+ <div class="row app-row">
155
+ <div class="col-xs-4" style="margin-top: 5px">
156
+ <img src="../../assets/换表.png" style="width: 20px;margin-bottom: 5px" alt="">
157
+ <label class="font text-left">换表人</label>
158
+ </div>
159
+ <div class="col-xs-7">
160
+ <input type="text" class ="input_search input_ys" placeholder="请输入换表人..." v-model="model.f_operator">
161
+ </div>
162
+ </div>
163
+ <div class="row app-row">
164
+ <div class="col-xs-4" style="margin-top: 5px">
165
+ <img src="../../assets/换表.png" style="width: 20px;margin-bottom: 5px" alt="">
166
+ <label class="font text-left">服务费</label>
167
+ </div>
168
+ <div class="col-xs-7">
169
+ <input type="text" class ="input_search input_ys" placeholder="请输入服务费..." v-model="model.f_service_fee">
170
+ </div>
171
+ </div>
172
+
173
+ <div class="row app-row">
174
+ <div class="col-xs-4" style="margin-top: 5px">
175
+ <img src="../../assets/换表.png" style="width: 20px;margin-bottom: 5px" alt="">
176
+ <label class="font text-left" >旧表底数</label>
177
+ </div>
178
+ <div class="col-xs-7">
179
+ <input type="text" class ="input_search input_ys" placeholder="请输入转移气量..." readonly v-model="model.f_using_base_old"></div>
180
+ </div>
181
+ <div class="row app-row" v-if="model.f_balance">
182
+ <div class="col-xs-4" style="margin-top: 5px">
183
+ <img src="../../assets/换表.png" style="width: 20px;margin-bottom: 5px" alt="">
184
+ <label class="font text-left" >账户余额</label>
185
+ </div>
186
+ <div class="col-xs-7">
187
+ <input type="text" class ="input_search input_ys" v-model="model.f_balance" readonly></div>
188
+ </div>
189
+ <div class="row app-row">
190
+ <div class="col-xs-4" style="margin-top: 5px">
191
+ <img src="../../assets/换表.png" style="width: 20px;margin-bottom: 5px" alt="">
192
+ <label class="font text-left" >补气气量</label>
193
+ </div>
194
+ <div class="col-xs-7">
195
+ <input type="text" class ="input_search input_ys" placeholder="请输入转移气量..." v-model="model.f_remanent_gas" ></div>
196
+ </div>
197
+ <div class="row app-row">
198
+ <div class="col-xs-4" style="margin-top: 5px">
199
+ <img src="../../assets/换表.png" style="width: 20px;margin-bottom: 5px" alt="">
200
+ <label class="font text-left" >补气金额</label>
201
+ </div><div class="col-xs-7">
202
+ <input type="text" class ="input_search input_ys" placeholder="请输入转移金额..." v-model="model.f_remanent_money" ></div>
203
+ </div>
204
+ <div class="row app-row">
205
+ <div class="col-xs-4" style="margin-top: 5px">
206
+ <img src="../../assets/换表.png" style="width: 20px;margin-bottom: 5px" alt="">
207
+ <label class="font text-left" >补气单价</label>
208
+ </div><div class="col-xs-7">
209
+ <input type="text" class ="input_search input_ys" placeholder="请输入补气单价..." v-model="model.f_remanent_price"></div>
210
+ </div>
211
+ <div class="row app-row" v-if="model.f_ladder_sync==='同步'">
212
+ <div class="col-xs-4" style="margin-top: 5px">
213
+ <img src="../../assets/换表.png" style="width: 20px;margin-bottom: 5px" alt="">
214
+ <label class="font text-left" >阶梯使用量</label>
215
+ </div><div class="col-xs-7">
216
+ <input type="text" class ="input_search input_ys" placeholder="请输入阶梯使用量..." v-model="model.f_stair_use" ></div>
217
+ </div>
218
+ <div class="row auto" style="margin: 5px 0" v-if="img_upload">
219
+ <p class="panel-title text-left font" style="text-align: center;font-weight: bold;">新表照片:</p>
220
+ <div class="panel" style="padding: 7px 20px 0px 23px;">
221
+ <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 100%;height: 200px;position: relative">
222
+ <img-self :src="f_table_path_new" alt="新表照片" :width="120" :height="150" capture="camera" type="file" ></img-self>
223
+ <div class="row text-right div-photo" style="height: 27px;margin-top: -30px">
224
+ <img src="../../assets/remove.png" @click="delfile('f_table_path_new', f_table_path_new)" alt=""></img>
225
+ <button type="button" name="button"style="height: 32px;" class="btn btn-primary btn-photo" @click="takePic('f_table_path_new','新表照片')" >拍照</button>
226
+ </div>
227
+ </div>
228
+ </div>
229
+ </div>
230
+ <div class="row auto" style="margin: 5px 0" v-if="img_upload">
231
+ <p class="panel-title text-left font" style="text-align: center;font-weight: bold;">旧表照片:</p>
232
+ <div class="panel" style="padding: 7px 20px 0px 23px;">
233
+ <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 100%;height: 200px;position: relative">
234
+ <img-self :src="f_table_path_old" alt="旧表照片" :width="120" :height="150" capture="camera" type="file" ></img-self>
235
+ <div class="row text-right div-photo" style="height: 27px;margin-top: -30px">
236
+ <img src="../../assets/remove.png" @click="delfile2('f_table_path_old', f_table_path_old)" alt=""></img>
237
+ <button type="button" name="button"style="height: 32px;" class="btn btn-primary btn-photo" @click="takePic2('f_table_path_old','旧表照片')" >拍照</button>
238
+ </div>
239
+ </div>
240
+ </div>
241
+ </div>
242
+ <div class="row text-center" style="margin-top: 25px;margin-bottom: 30px">
243
+ <button type="button" class="btn btn-lg btn-font btn-color" style="width: 28%;" @click="confirm()">确认</button>
244
+ </div>
245
+ </div>
246
+ </div>
247
+ <work-busy :is-busy="isBusy"></work-busy>
248
+ </div>
249
+ </template>
250
+ <script>
251
+ import Vue from 'vue'
252
+ import {HttpResetClass} from "vue-client";
253
+ import * as Util from '../Util'
254
+ import {isEmpty} from "../Util";
255
+ import ReadCardPage from '../workorder/ReadCardPage'
256
+ export default {
257
+ title: '在线换表',
258
+ props: ['service'],
259
+ data() {
260
+ return {
261
+ showTable:false,
262
+ isBusy:false,
263
+ item:{},
264
+ remanent:{},
265
+ img_upload:this.$appdata.getSingleValue('在线换表是否上传图片') || false,
266
+ f_table_path_new:'',
267
+ f_table_path_old:'',
268
+ model:{
269
+ f_change_cost:0,
270
+ f_table_path_new:'',
271
+ f_table_path_old:'',
272
+ f_stair_use:0,
273
+ f_ladder_sync:'', //是否同步
274
+ f_using_base_old:'',//旧表底数
275
+ f_type: '',//换表类型
276
+ f_comments: '',// 备注
277
+ f_gasbrand_id: null, //新表品牌id
278
+ f_gasmold_id: null, //新表型号id
279
+ f_balance:'', //账户余额
280
+ f_remanent_gas:'', // 补气量
281
+ f_remanent_money:'', // 补气金额
282
+ f_remanent_price: '', // 补气单价
283
+ f_userfiles_id:'',
284
+ f_open_type:'',
285
+ f_depname: Vue.user.deps,
286
+ f_depid : Vue.user.depids,
287
+ f_orgid : Vue.user.orgid,
288
+ f_orgname : Vue.user.orgs,
289
+ f_operator: Vue.user.name,
290
+ f_operatorid: Vue.user.id,
291
+ f_meternumber:"",
292
+ f_meter_base:null,
293
+ f_metertitles:"",
294
+ f_service_fee:0,
295
+ },
296
+ comments:this.$appdata.getParam('在线换表原因'),
297
+ openTypes:[{label: "指令开户", value: "指令开户"}, {label: "发卡开户", value: "发卡开户"}],
298
+ changetypes: [{label: "换新表", value: "换新表"}, {label: "气表清零", value: "气表清零"}],
299
+ changeReasonList: [{label: "漏气", value: "漏气"}, {label: "燃气表损坏", value: "燃气表损坏"}],
300
+ changeReason2List: [{label: "表计量异常", value: "表计量异常"}, {label: "表不走", value: "表不走"}],
301
+ changeTypeList: [{label: "换新表", value: "换新表"}, {label: "清零", value: "清零"}],
302
+ originalTypeList: [{label: "请选择。。。", value: ""},{label: "物联网表", value: "物联网表"}, {label: "金额卡表", value: "金额卡表"}, {label: "气量卡表", value: "气量卡表"}, {label: "机表", value: "机表"}, {label: "远传表", value: "远传表"}],
303
+ newBrandList: [{label: "111", value: "111"}, {label: "222", value: "222"}],
304
+ newTypeList: [{label: "G2.5", value: "G2.5"}, {label: "G4", value: "G4"}],
305
+ avoidReasonList: [{label: "原因1", value: "原因1"}, {label: "原因2", value: "原因2"}],
306
+ switchTypeList: [{label: "金额", value: "金额"}, {label: "气量", value: "气量"}],
307
+ // filialeid: Vue.user.orgid,
308
+ row:{}, //用户信息
309
+ model1: {},// 换表的model值
310
+ isSync:[{label: "同步", value: "同步"},{label: "不同步", value: "不同步"}],
311
+ allBrandList: [],//所有表品牌
312
+ allModelList: [],//所有表型号
313
+ newModelList: [],
314
+ imgArr:{},
315
+ gasbrands:[],
316
+ isOpenType:false,
317
+ f_userinfo_code: '',
318
+ f_orgid: '',
319
+ f_userfiles_id: '', //新表档案id
320
+ islot: false
321
+ }
322
+ },
323
+ methods: {
324
+ async ConfirmOk() {
325
+ if (!this.f_meter_base) {
326
+ this.$showMessage('请填写表底数后在点击换表')
327
+ return
328
+ }
329
+ if (this.service.f_meter_type == '金额卡表' && !this.f_remanent_money) {
330
+ this.$showMessage('请填写剩余金额后在点击换表')
331
+ return
332
+ }
333
+ let http1 = new HttpResetClass()
334
+ let con = {
335
+ condition: ` ui.f_userinfo_id = '${this.service.f_userinfo_id}' `
336
+ }
337
+ let resp = await http1.load('POST', `${this.$androidUtil.getProxyUrl()}/af-telephone/rs/sql/onlinequeryuser`, {data: con}, {
338
+ resolveMsg: null,
339
+ rejectMsg: null
340
+ })
341
+ if (resp.data.length > 0) {
342
+ this.item = resp.data[0]
343
+ }
344
+ this.getallBrandList()
345
+ this.model.f_userfiles_id = this.item.f_userfiles_id
346
+ let param = {}
347
+ if (this.item.f_meter_type == '金额卡表') {
348
+ param = {
349
+ "f_userfiles_id": this.item.f_userfiles_id,
350
+ "f_meter_base": this.f_meter_base,
351
+ "f_remanent_money": this.f_remanent_money
352
+ }
353
+ } else {
354
+ param = {
355
+ "f_userfiles_id": this.item.f_userfiles_id,
356
+ "f_meter_base": this.f_meter_base
357
+ }
358
+ }
359
+ let http2= new HttpResetClass()
360
+ let res = await http2.load('POST',`${this.$androidUtil.getProxyUrl()}/api/af-revenue/logic/third_meter_base_check`, {data: param}, {
361
+ resolveMsg: null,
362
+ rejectMsg: null
363
+ }).then(async (res) => {
364
+ if (res.data) {
365
+ this.remanent = Object.assign({}, res.data.data, {f_using_base_old: param.f_meter_base})
366
+ this.model.f_balance = this.remanent.f_balance?res.data.data.f_balance:0
367
+ this.model.f_remanent_gas = this.remanent.f_remanent_gas?res.data.data.f_remanent_gas:0
368
+ this.model.f_remanent_money = this.remanent.f_remanent_money?res.data.data.f_remanent_money:0
369
+ this.model.f_remanent_price = this.remanent.f_remanent_price?res.data.data.f_remanent_price:0
370
+ this.model.f_using_base_old = this.remanent.f_using_base_old
371
+ this.showTable = true
372
+ } else {
373
+ this.$showMessage(res.data.msg)
374
+ return
375
+ }
376
+ })
377
+ },
378
+ uploadfile(){
379
+ const fileUpData = HostApp.bzLogic({
380
+ 'logic': 'imgUpload',
381
+ 'data': this.imgArr
382
+ })
383
+ this.$showMessage(fileUpData.msg)
384
+ },
385
+ cameraCallBack(prop, fileName) {
386
+ HostApp.__this__.f_table_path_new = fileName
387
+ HostApp.__callback__ = null
388
+ HostApp.__this__ = null
389
+ },
390
+ takePic(prop, title) {
391
+ this.delfile('f_table_path_new', this.f_table_path_new)
392
+ HostApp.__callback__ = this.cameraCallBack
393
+ HostApp.__this__ = this
394
+ let fileName
395
+ if (!this.f_table_path_new || this.f_table_path_new.includes("nopic.png")) {
396
+ fileName = Util.guid() + '-' + prop + '.jpg'
397
+ } else {
398
+ fileName = Util.getFileName(this.f_table_path_new)
399
+ }
400
+ HostApp._open_a_page({
401
+ type: 'boomerang',
402
+ page: 'com.aofeng.hybrid.android.peripheral.CameraActivity',
403
+ param: {
404
+ file: fileName,
405
+ requestCode: 111,
406
+ callback: 'javascript:HostApp.__callback__("' + prop + '", "%s");',
407
+ watermark: title + '\t时间:' + Util.toStandardTimeString()
408
+ }
409
+ })
410
+ },
411
+ cameraCallBack2(prop, fileName) {
412
+ console.log('fileName=', fileName)
413
+ console.log('prop=', prop)
414
+ HostApp.__this__.f_table_path_old = fileName
415
+ HostApp.__callback__ = null
416
+ HostApp.__this__ = null
417
+ },
418
+ takePic2(prop, title) {
419
+ this.delfile2('f_table_path_old', this.f_table_path_old)
420
+ HostApp.__callback__ = this.cameraCallBack2
421
+ HostApp.__this__ = this
422
+ let fileName
423
+ if (!this.f_table_path_old || this.f_table_path_old.includes("nopic.png")) {
424
+ fileName = Util.guid() + '-' + prop + '.jpg'
425
+ } else {
426
+ fileName = Util.getFileName(this.f_table_path_old)
427
+ }
428
+ HostApp._open_a_page({
429
+ type: 'boomerang',
430
+ page: 'com.aofeng.hybrid.android.peripheral.CameraActivity',
431
+ param: {
432
+ file: fileName,
433
+ requestCode: 111,
434
+ callback: 'javascript:HostApp.__callback__("' + prop + '", "%s");',
435
+ watermark: title + '\t时间:' + Util.toStandardTimeString()
436
+ }
437
+ })
438
+ },
439
+ delfile2(prop, fileName) {
440
+ if (fileName == Vue.nopic)
441
+ return
442
+ else {
443
+ HostApp.delfile(fileName)
444
+ this.f_table_path_old = Vue.nopic
445
+ }
446
+ },
447
+ delfile(prop, fileName) {
448
+ if (fileName == Vue.nopic)
449
+ return
450
+ else {
451
+ HostApp.delfile(fileName)
452
+ this.f_table_path_new = Vue.nopic
453
+ }
454
+ },
455
+ getStairGas(){
456
+ this.$resetpost(`${this.$androidUtil.getProxyUrl()}/api/af-revenue/logic/commonCal`, {data: {model: this.item, isGasValue: 0, value: 0}}, {resolveMsg: null, rejectMsg: '获取阶梯使用情况出错'}).then((res)=>{
457
+ this.model.f_stair_use = res.data.sumamount?res.data.sumamount:0
458
+ })
459
+ },
460
+ getallBrandList() {
461
+ //tag
462
+ this.$resetpost(`${this.$androidUtil.getProxyUrl()}/api/af-revenue/logic/getSaleInitData`, {data: {f_orgid: this.item.f_orgid}},{resolveMsg: null, rejectMsg: null}).then((row) => {
463
+ //tag
464
+ //tag)
465
+ if(row.data.gasbrands) {
466
+ this.gasbrands = row.data.gasbrands
467
+ row.data.gasbrands.forEach((item) => {
468
+ let BrandList = {label: item.f_meter_brand, value: item.id}
469
+ this.allBrandList.push(BrandList)
470
+ item.gasmodel.forEach(item=>{
471
+ this.allModelList.push({label: item.f_meter_style, value: item.id,f_gasbrand_id: item.f_gasbrand_id})
472
+ })
473
+ })
474
+ }else {
475
+ this.$showMessage('表品牌获取失败!')
476
+ }
477
+ //获取阶梯使用量
478
+ this.getStairGas()
479
+ })
480
+ },
481
+ async writeCard(cardParams) {
482
+ try {
483
+ //tag
484
+ let fengongsi = this.$appdata.getSingleValue('分公司')
485
+ if (!fengongsi) {
486
+ this.$showMessage('分公司获取失败!')
487
+ this.isBusy = false
488
+ return
489
+ }
490
+ let posinfo2 = HostApp.read(fengongsi)
491
+ //tag)
492
+ cardParams = Object.assign({},cardParams,{AREA:fengongsi,ulen:0})
493
+ //tag)
494
+ const writeResult = HostApp.issue(JSON.stringify(cardParams))
495
+ //tag
496
+ //tag
497
+ if(writeResult.code === 200){
498
+ this.$showMessage('换表成功')
499
+ this.isBusy = false
500
+ }else{
501
+ this.$showMessage('换表成功,写卡失败')
502
+ this.isBusy = false
503
+ }
504
+ }catch (e) {
505
+ this.$showMessage('换表成功,写卡失败,请联系营业厅处理')
506
+ this.isBusy = false
507
+ }
508
+ },
509
+ confirmCheck(){
510
+ if(!this.model.f_type){
511
+ return '请选择换表类型'
512
+ }
513
+ //tag
514
+ if(this.model.f_type === '换新表'){
515
+ if(!this.model.f_ladder_sync){
516
+ return '请选择是否同步'
517
+ }
518
+ if(!this.model.f_gasbrand_id){
519
+ return '请选择新表品牌'
520
+ }
521
+ if(!this.model.f_gasmold_id){
522
+ return '请选择新表型号'
523
+ }
524
+ if(!this.model.f_meternumber){
525
+ return '请输入新表表号'
526
+ }
527
+ if(!this.model.f_meter_base){
528
+ return '请输入新表底数'
529
+ }
530
+ // //tag
531
+ if(this.isOpenType && (!this.model.f_open_type)){
532
+ return '请选择开户方式'
533
+ }
534
+ }else if (this.model.f_type === '气表清零') {
535
+ this.model = Object.assign({},this.model,
536
+ {f_ladder_sync:"",
537
+ f_gasbrand_id: null,
538
+ f_gasmold_id: null,
539
+ f_meternumber: '',
540
+ f_meter_base: null,
541
+ f_open_type: ''
542
+ })
543
+ return ''
544
+ }
545
+ return ''
546
+ },
547
+ async confirm () {
548
+ const error = this.confirmCheck()
549
+ if(error){
550
+ this.$showMessage(error)
551
+ return
552
+ }
553
+ let newnumberdata = {
554
+ f_meternumber:this.model.f_meternumber,
555
+ f_gasbrand_id:this.model.f_gasbrand_id
556
+ }
557
+ let checknumber = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/api/af-revenue/logic/third_meter_number_check`, {data: newnumberdata},{resolveMsg: null, rejectMsg: null})
558
+ if(checknumber.data){
559
+ if(checknumber.data.code != '0000'){
560
+ this.$showMessage(checknumber.data.msg)
561
+ return
562
+ }
563
+ }else{
564
+ this.$showMessage('网络异常,请稍后再试!')
565
+ return
566
+ }
567
+ this.model.f_table_path_new=this.extractFileName(this.f_table_path_new)
568
+ this.model.f_table_path_old=this.extractFileName(this.f_table_path_old)
569
+ this.isBusy = true
570
+ let _this = this
571
+ _this.$resetpost(`${_this.$androidUtil.getProxyUrl()}/api/af-revenue/logic/third_change_meter`, {data: this.model},{resolveMsg: null, rejectMsg: null}).then((res) => {
572
+ if(res.data){
573
+ if (this.f_table_path_new || this.f_table_path_old){
574
+ this.imgArr = {
575
+ new_path: this.f_table_path_new || '',
576
+ old_path: this.f_table_path_old || '',
577
+ fusetype:'换表_清零',
578
+ f_userinfo_id:this.item.f_userinfo_id
579
+ }
580
+ this.uploadfile()
581
+ }
582
+ if(res.data.code === "0000"){
583
+ this.$root.$emit('tableChenge', res.data.changemeter_id.id || '');
584
+ if(this.model.f_type !== '换新表'){
585
+ this.isBusy = false
586
+ this.$showMessage('换表成功')
587
+ return
588
+ }
589
+ const arr =this.gasbrands.filter(res => res.id === this.model.f_gasbrand_id)
590
+ if(arr[0].f_meter_type.indexOf('卡表') !==-1 || this.model.f_open_type === '发卡开户'){
591
+ const cardParams = res.data.cardParams
592
+ this.writeCard(cardParams)
593
+ }else{
594
+ this.isBusy = false
595
+ this.$showMessage('换表成功')
596
+ }
597
+ }else if(res.data.code === "9990"){
598
+ this.isBusy = false
599
+ this.$showMessage('换表失败'+res.data.msg)
600
+ }
601
+ }else {
602
+ this.$showMessage('请求出错!!!')
603
+ this.isBusy = false
604
+ }
605
+ }).catch(e=>{
606
+ this.$showMessage('请求异常!!!'+ e)
607
+ this.isBusy = false
608
+ })
609
+ },
610
+ extractFileName(filePath) {
611
+ if (!filePath) return '';
612
+ // 从完整路径中提取文件名
613
+ return filePath.substring(filePath.lastIndexOf('/') + 1);
614
+ },
615
+ },
616
+ ready () {
617
+ // this.getallBrandList()
618
+ },
619
+ watch: {
620
+ 'model.f_gasbrand_id' (val) {
621
+ if(val){
622
+ const arr = this.gasbrands.filter(res=>res.id === val)
623
+ if(arr.length>0 && arr[0].f_hascard === '是'){
624
+ this.isOpenType = true
625
+ }else{
626
+ this.isOpenType = false
627
+ }
628
+ this.newModelList = Object.assign([],this.allModelList.filter(res=>res.f_gasbrand_id === val))
629
+ }
630
+ }
631
+ }
632
+
633
+ }
634
+ </script>
635
+
636
+ <style scoped>
637
+ .app-row {
638
+ background-color: white;
639
+ padding: 5px 10px 0 10px;
640
+ border-bottom: 1px solid rgba(235, 235, 235, 0.7);
641
+ }
642
+ .btn-color{
643
+ background-color: #FFFFFF;
644
+ border-radius: 10px ;
645
+ border: 1px solid #499EDF;
646
+ }
647
+ .input_ys {
648
+ /*border: 1px solid #93B2D3 !important;*/
649
+ border: none !important;
650
+ width: 220px;
651
+ height: 35px;
652
+ }
653
+ .btn_cz {
654
+ background-color: #499edf;
655
+ color:#FFFFFF;
656
+ width: 65px;
657
+ height: 40px;
658
+ border-radius: 8px;
659
+ font: 600 16px PingFang-SC-Bold;
660
+ float: right;
661
+ margin-right: 10px;
662
+ }
663
+ </style>