readmeter-changan 1.0.33 → 1.0.34

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 (41) hide show
  1. package/.idea/ReadMeterClient.iml +9 -0
  2. package/.idea/workspace.xml +62 -442
  3. package/.npmignore +7 -0
  4. package/build/dev-server.js +132 -132
  5. package/build/webpack.base.conf.js +75 -75
  6. package/hs_err_pid13284.log +207 -0
  7. package/package.json +1 -1
  8. package/package.json.bak +99 -99
  9. package/src/AndroidPlugin.js +28 -28
  10. package/src/App.vue +74 -74
  11. package/src/components/readingmeter/CheckInfo.vue +618 -618
  12. package/src/components/readingmeter/FinishHandInfo.vue +75 -75
  13. package/src/components/readingmeter/FinishHandInfocopy.vue +99 -99
  14. package/src/components/readingmeter/HandInfo.vue +87 -87
  15. package/src/components/readingmeter/HandMessage.vue +40 -40
  16. package/src/components/readingmeter/HistoryHandInfo.vue +114 -114
  17. package/src/components/readingmeter/MeterInfo.vue +183 -183
  18. package/src/components/readingmeter/PhoneHand.vue +93 -93
  19. package/src/components/readingmeter/PhoneHandHome.vue +2 -0
  20. package/src/components/readingmeter/PhoneHandplanInfo.vue +643 -643
  21. package/src/components/readingmeter/PictureArea.vue +156 -156
  22. package/src/components/readingmeter/PlanDown.vue +232 -232
  23. package/src/components/readingmeter/PlanUpdate.vue +186 -186
  24. package/src/components/readingmeter/ReadMeterCenter.vue +325 -325
  25. package/src/components/readingmeter/ReadMeterInfo.vue +349 -349
  26. package/src/components/readingmeter/ReadMeterInfoChangan.vue +1 -1
  27. package/src/components/readingmeter/SellHistory.vue +36 -36
  28. package/src/components/readingmeter/SellInfo.vue +88 -88
  29. package/src/components/readingmeter/UserInfo.vue +1 -0
  30. package/src/components/server/AppHeader.vue +65 -65
  31. package/src/components/server/ReadMeterHome.vue +192 -192
  32. package/src/components/server/ReadMeterLogin.vue +161 -161
  33. package/src/components/server/ReadMeterNavBottom.vue +119 -119
  34. package/src/components/server/ReadMeterRoute.vue +79 -79
  35. package/src/components/server/ReadMeterTop.vue +61 -61
  36. package/src/components/server/ReadMeterTopcopy.vue +53 -53
  37. package/src/expandcss.less +668 -668
  38. package/src/main.js +23 -23
  39. package/src/readmeter-android.js +34 -34
  40. package/src/readmeter.js +54 -54
  41. package/yarn.lock +7818 -0
@@ -1,643 +1,643 @@
1
- <template>
2
- <div class="auto app-text" style="margin-top: 5px;">
3
- <header class="head">
4
- 抄表信息
5
- </header>
6
- <div class="panel" style="padding: 10px 10px 5px 10px;">
7
- <div class="panel-body panel-self">
8
- <div class="row auto app-row col-xs-12 col-sm-6 col-md-6">
9
- <p class="panel-title col-xs-4 col-sm-4 col-md-4 text-left font">上次抄表日期</p>
10
- <p class="panel-title col-xs-8 col-sm-8 col-md-8 text-left font">{{ model.f_last_hand_date }}</p>
11
- </div>
12
- <div class="row auto app-row col-xs-12 col-sm-6 col-md-6">
13
- <p class="panel-title col-xs-4 col-sm-4 col-md-4 text-left font">上次基表底数</p>
14
- <p class="panel-title col-xs-8 col-sm-8 col-md-8 text-left font">{{ model.f_last_tablebase }}</p>
15
- </div>
16
- <div class="row auto app-row col-xs-12 col-sm-6 col-md-6">
17
- <p class="panel-title col-xs-4 col-sm-4 col-md-4 text-left font">上次剩余气量</p>
18
- <p class="panel-title col-xs-8 col-sm-8 col-md-8 text-left font">{{ model.f_last_lcd }}</p>
19
- </div>
20
- <div class="row auto app-row col-xs-12 col-sm-6 col-md-6">
21
- <p class="panel-title col-xs-4 col-sm-4 col-md-4 text-left font">上次剩余金额</p>
22
- <p class="panel-title col-xs-8 col-sm-8 col-md-8 text-left font">{{ parseInt(model.f_iclastmoney) }}</p>
23
- </div>
24
- <div class="row auto app-row col-xs-12 col-sm-12 col-md-12 bg-white ">
25
- <label for="f_sumgas" class="panel-title col-xs-4 col-sm-2 col-md-2 text-left font">总购气量</label>
26
- <div class="col-xs-6 col-sm-4 col-md-4 ">
27
- <input type="number" id="f_sumgas" class="form-control font " v-model="model.f_sumgas" >
28
- </div>
29
- <div class="col-sm-2 col-xs-2 col-sm-offset-1 col-md-2 col-md-offset-1">
30
- <button type="button" name="button" class="btn btn-primary" @click="getSumGas(model.card_id)"
31
- >详情
32
- </button>
33
- </div>
34
- </div>
35
- <div class="row auto app-row col-xs-12 col-sm-6 col-md-6">
36
- <p class="panel-title col-xs-4 col-sm-4 col-md-4 text-left font">期间购气:</p>
37
- <p class="panel-title col-xs-8 col-sm-8 col-md-8 text-left font">{{ model.f_sumgas_moment }}</p>
38
- </div>
39
- <div class="row auto app-row col-xs-12 col-sm-6 col-md-6">
40
- <p class="panel-title col-xs-4 col-sm-4 col-md-4 text-left font">上次未充:</p>
41
- <p class="panel-title col-xs-8 col-sm-8 col-md-8 text-left font">{{ model.f_nogasvalue }}</p>
42
- </div>
43
- <div class="row auto app-row col-xs-12 col-sm-6 col-md-6">
44
- <p class="panel-title col-xs-4 col-sm-4 col-md-4 text-left font">本次已充:</p>
45
- <p class="panel-title col-xs-8 col-sm-8 col-md-8 text-left font">{{ model.f_hascharge}}</p>
46
- </div>
47
- <div class="row auto app-row col-xs-12 col-sm-6 col-md-6">
48
- <p class="panel-title col-xs-4 col-sm-4 col-md-4 text-left font">本次未充:</p>
49
- <p class="panel-title col-xs-8 col-sm-8 col-md-8 text-left font">{{ model.f_hasnotcharge}}</p>
50
- </div>
51
- <div class="col-xs-12 col-sm-12 col-md-12" v-if="!(model.f_weekcheck==='1'||model.f_weekcheck==='true'||model.f_weekcheck==='是')">
52
- <div class="row auto app-row col-xs-12 col-sm-12 col-md-12 bg-white ">
53
- <div class="auto col-xs-12 col-sm-4 col-md-4 bg-white app-row ">
54
- <label for="f_new_tablebase" class="panel-title col-xs-4 col-sm-6 col-md-6 text-left font">基表底数</label>
55
- <div class="col-xs-8 col-sm-6 col-md-6 ">
56
- <input type="number" id="f_new_tablebase" class="form-control font" v-el:f_new_tablebase v-next-el="f_new_lcd" @blur="getMeterMessage()" v-model="model.f_new_tablebase" >
57
- </div>
58
- </div>
59
- <div class="auto col-xs-12 col-sm-4 col-md-4 bg-white app-row ">
60
- <label for="f_tablesnapsgas" class="panel-title col-xs-4 col-sm-6 col-md-6 text-left font">基表走气量</label>
61
- <div class="col-xs-8 col-sm-6 col-md-6 ">
62
- <input type="number" id="f_tablesnapsgas" class="form-control font " v-model="model.f_tablesnapsgas" readonly>
63
- </div>
64
- </div>
65
- <div class="auto col-xs-12 col-sm-4 col-md-4 bg-white app-row ">
66
- <label for="f_meter_repair" class="panel-title col-xs-4 col-sm-6 col-md-6 text-left font">表维修</label>
67
- <div class="col-xs-8 col-sm-6 col-md-6 ">
68
- <input type="number" id="f_meter_repair" class="form-control font " v-model="model.f_meter_repair" readonly>
69
- </div>
70
- </div>
71
- </div>
72
- <div class="row auto app-row col-xs-12 col-sm-12 col-md-12 bg-white ">
73
- <div class="auto col-xs-12 col-sm-4 col-md-4 bg-white app-row " v-if="model.f_meter_classify!=='机表'">
74
- <label for="f_new_tablebase" class="panel-title col-xs-4 col-sm-6 col-md-6 text-left font">卡剩余气量</label>
75
- <div class="col-xs-8 col-sm-6 col-md-6 ">
76
- <input type="number" id="f_new_lcd" class="form-control font " @blur="getCardMessage()" v-el:f_new_lcd v-next-el="f_insflow" v-model="model.f_new_lcd" >
77
- </div>
78
- </div>
79
- <div class="auto col-xs-12 col-sm-4 col-md-4 bg-white app-row " v-if="model.f_meter_classify!=='机表'">
80
- <label for="f_icsnapsgas" class="panel-title col-xs-4 col-sm-6 col-md-6 text-left font">IC卡扣气量</label>
81
- <div class="col-xs-8 col-sm-6 col-md-6 ">
82
- <input type="text" id="f_icsnapsgas" class="form-control font " v-model="model.f_icsnapsgas" readonly>
83
- </div>
84
- </div>
85
- <div class="auto col-xs-12 col-sm-4 col-md-4 bg-white app-row " v-if="model.f_meter_classify!=='机表'">
86
- <label for="f_card_repair" class="panel-title col-xs-4 col-sm-6 col-md-6 text-left font">卡维修</label>
87
- <div class="col-xs-8 col-sm-6 col-md-6 ">
88
- <input type="text" id="f_card_repair" class="form-control font " v-model="model.f_card_repair" readonly>
89
- </div>
90
- </div>
91
- </div>
92
- <div class="row auto app-row col-xs-12 col-sm-12 col-md-12 bg-white ">
93
- <div class="auto col-xs-12 col-sm-4 col-md-4 bg-white app-row " v-if="model.f_meter_classify!=='机表'">
94
- <label for="f_curbalance" class="panel-title col-xs-4 col-sm-6 col-md-6 text-left font">卡剩余金额</label>
95
- <div class="col-xs-8 col-sm-6 col-md-6 ">
96
- <input type="text" id="f_curbalance" class="form-control font " @blur="getMoneyMessage()" v-model="model.f_curbalance" >
97
- </div>
98
- </div>
99
-
100
- <div class="auto col-xs-12 col-sm-4 col-md-4 bg-white app-row " v-if="model.f_meter_classify!=='机表'">
101
- <label for="f_datacomparison" class="panel-title col-xs-4 col-sm-6 col-md-6 text-left font">数据对比</label>
102
- <div class="col-xs-8 col-sm-6 col-md-6 ">
103
- <input type="text" id="f_datacomparison" class="form-control font " v-model="model.f_datacomparison" readonly>
104
- </div>
105
- </div>
106
- <div class="bg-white auto app-row col-xs-12 col-sm-4 col-md-4" v-if="model.f_meter_classify!=='机表'">
107
- <p class="panel-title col-xs-4 col-sm-6 col-md-6 text-left font">抄表状态</p>
108
- <!--<p class="panel-title col-xs-8 col-sm-6 col-md-6 text-left font">{{ model.f_result_state}}</p>-->
109
- <div class="col-xs-8 col-sm-6 col-md-6 ">
110
- <input type="text" id="f_datacomparison" class="form-control font " v-model="model.f_result_state" readonly>
111
- </div>
112
- </div>
113
- </div>
114
- <div class="auto col-xs-12 col-sm-6 col-md-6 bg-white app-row ">
115
- <label for="f_insflow" class="panel-title col-xs-4 col-sm-4 col-md-4 text-left font">瞬时流量</label>
116
- <div class="col-xs-8 col-sm-8 col-md-8 ">
117
- <input type="number" id="f_insflow" class="form-control font " v-model="model.f_insflow" v-el:f_insflow v-next-el="f_temperature">
118
- </div>
119
- </div>
120
-
121
- <div class="auto col-xs-12 col-sm-6 col-md-6 bg-white app-row ">
122
- <label for="f_temperature" class="panel-title col-xs-4 col-sm-4 col-md-4 text-left font">温度</label>
123
- <div class="col-xs-8 col-sm-8 col-md-8 ">
124
- <input type="number" id="f_temperature" class="form-control font " v-model="model.f_temperature" v-el:f_temperature v-next-el="f_pressure">
125
- </div>
126
- </div>
127
-
128
- <div class="auto col-xs-12 col-sm-6 col-md-6 bg-white app-row ">
129
- <label for="f_pressure" class="panel-title col-xs-4 col-sm-4 col-md-4 text-left font">压力</label>
130
- <div class="col-xs-8 col-sm-8 col-md-8 ">
131
- <input type="number" id="f_pressure" class="form-control font " v-model="model.f_pressure" v-el:f_pressure v-next-el="f_condition">
132
- </div>
133
- </div>
134
- <div class="auto col-xs-12 col-sm-6 col-md-6 bg-white app-row ">
135
- <label for="f_condition" class="panel-title col-xs-4 col-sm-4 col-md-4 text-left font">工况</label>
136
- <div class="col-xs-8 col-sm-8 col-md-8 ">
137
- <input type="number" id="f_condition" class="form-control font " v-model="model.f_condition" v-el:f_condition v-next-el="f_condition">
138
- </div>
139
- </div>
140
- <div class="auto col-xs-12 col-sm-12 col-md-12 bg-white app-row" style="padding: 0.5em">
141
-
142
- <p class="panel-title col-xs-4 col-sm-2 col-md-2 text-left font">换表</p>
143
- <div class="col-xs-4 col-sm-2 col-md-2">
144
- <input type="radio" name="f_if_change" id="f_if_change" value="是" v-model="model.f_if_change" > 是
145
- </div>
146
- <div class="col-xs-4 col-sm-2 col-md-2">
147
- <input type="radio" name="f_if_change" id="f_if_change" value="否" v-model="model.f_if_change" checked> 否
148
- </div>
149
- </div>
150
- </div>
151
-
152
- <div class="check-info row auto app-row col-xs-12 col-sm-12 col-md-12" v-if="model.f_weekcheck==='1'||model.f_weekcheck==='true'||model.f_weekcheck==='是'">
153
-
154
- <div class="auto col-xs-12 col-sm-12 col-md-12 bg-white ">
155
- <div class="col-xs-12 col-sm-6 col-md-6">
156
- <label for="f_weekchecksn" class="panel-title col-xs-4 col-sm-4 col-md-4 text-left font">替换表表号</label>
157
- <div class="col-xs-8 col-sm-8 col-md-8 ">
158
- <input type="text" id="f_weekchecksn" class="form-control font " v-model="model.f_weekchecksn" v-el:f_weekchecksn v-next-el="f_weekcheckdishu">
159
- </div>
160
- </div>
161
- </div>
162
- <div class="auto col-xs-12 col-sm-6 col-md-6 bg-white app-row ">
163
- <label for="f_weekchecknum" class="panel-title col-xs-4 col-sm-4 col-md-4 text-left font">替换表上次安装读数</label>
164
- <div class="col-xs-8 col-sm-8 col-md-8 ">
165
- <input type="text" id="f_weekchecknum" class="form-control font " v-model="model.f_weekchecknum" disabled>
166
- </div>
167
- </div>
168
-
169
- <div class="auto col-xs-12 col-sm-6 col-md-6 bg-white app-row ">
170
- <label for="f_weekcheckicnum" class="panel-title col-xs-4 col-sm-4 col-md-4 text-left font">IC卡上次安装剩余气量</label>
171
- <div class="col-xs-8 col-sm-8 col-md-8 ">
172
- <input type="text" id="f_weekcheckicnum" class="form-control font " v-model="model.f_weekcheckicnum" disabled>
173
- </div>
174
- </div>
175
-
176
- <div class="auto col-xs-12 col-sm-6 col-md-6 bg-white app-row ">
177
- <label for="f_weekcheckdishu" class="panel-title col-xs-4 col-sm-4 col-md-4 text-left font">替换表底数</label>
178
- <div class="col-xs-8 col-sm-8 col-md-8 ">
179
- <input type="text" id="f_weekcheckdishu" class="form-control font " @blur="getWeekMeterMessage()" v-el:f_weekcheckdishu v-next-el="f_weekcheckicdishu" v-model="model.f_weekcheckdishu" >
180
- </div>
181
- </div>
182
-
183
- <div class="auto col-xs-12 col-sm-6 col-md-6 bg-white app-row ">
184
- <label for="f_insflow" class="panel-title col-xs-4 col-sm-4 col-md-4 text-left font">走气量</label>
185
- <div class="col-xs-8 col-sm-8 col-md-8 ">
186
- <input type="text" id="f_insflow" class="form-control font " v-model="model.f_weektablesnapsgas" readonly>
187
- </div>
188
- </div>
189
-
190
- <div class="auto col-xs-12 col-sm-6 col-md-6 bg-white app-row ">
191
- <label for="f_temperature" class="panel-title col-xs-4 col-sm-4 col-md-4 text-left font">卡剩余气量</label>
192
- <div class="col-xs-8 col-sm-8 col-md-8 ">
193
- <input type="text" id="f_weekcheckicdishu" class="form-control font " @blur="getWeekCardMessage()" v-model="model.f_weekcheckicdishu" v-el:f_weekcheckicdishu v-next-el="f_remark">
194
- </div>
195
- </div>
196
-
197
- <div class="auto col-xs-12 col-sm-6 col-md-6 bg-white app-row ">
198
- <label for="f_pressure" class="panel-title col-xs-4 col-sm-4 col-md-4 text-left font">扣气量</label>
199
- <div class="col-xs-8 col-sm-8 col-md-8 ">
200
- <input type="text" id="f_pressure" class="form-control font " v-model="model.f_weekicsnapsgas" >
201
- </div>
202
- </div>
203
- <div class="row auto bg-white app-row col-xs-12 col-sm-4 col-md-4" v-if="model.f_meter_classify!=='机表'">
204
- <p class="panel-title col-xs-4 col-sm-6 col-md-6 text-left font">抄表状态</p>
205
- <p class="panel-title col-xs-8 col-sm-6 col-md-6 text-left font">{{ model.f_result_state}}</p>
206
- </div>
207
- </div>
208
-
209
- <div class=" row auto app-row col-xs-12 col-sm-12 col-md-12 bg-white ">
210
- <label for="f_mark" class="panel-title col-xs-4 col-sm-2 col-md-2 text-left font">备注</label>
211
- <div class="col-xs-8 col-sm-10 col-md-10 ">
212
- <input type="text" id="f_card_id" class="form-control font " v-model="model.f_remark" v-el:f_remark>
213
- </div>
214
- </div>
215
- <div class="row auto col-xs-12 col-sm-12 col-md-12 mt-20">
216
- <!--<img-area :model="model.imgs"></img-area>-->
217
- <picture-area :model="model.imgs"></picture-area>
218
- </div>
219
- <div class="row auto mt-20" v-if="!data.hidden">
220
- <div class="col-xs-2 col-sm-2 col-md-2 col-xs-offset-2 col-sm-offset-2 col-md-offset-2">
221
- <button type="button" class="btn btn-lg btn-color btn-font" @click="save()">保存</button>
222
- </div>
223
- <div class="col-xs-2 col-sm-2 col-md-2 col-xs-offset-1 col-sm-offset-1 col-md-offset-1" >
224
- <button type="button" class="btn btn-color btn-font btn-lg" @click="commit()">提交</button>
225
- </div>
226
- <div v-if="model.f_result_state==='异常'" class="col-xs-2 col-sm-2 col-md-2 col-xs-offset-1 col-sm-offset-1 col-md-offset-1" >
227
- <button type="button" class="btn btn-warning btn-font btn-lg" @click="torepair()">转维修</button>
228
- </div>
229
- </div>
230
- <!--<div class="row auto" style="margin: 30px 0 60px 0;">-->
231
- <!--<p class="text-warning">&nbsp;&nbsp;提示:表底数输入燃气表黑色部分数字</p>-->
232
- <!--</div>-->
233
- </div>
234
- </div>
235
- </div>
236
- </template>
237
- <script>
238
- import * as Util from '../Util'
239
- import Vue from 'vue'
240
- import co from 'co'
241
- let repairGen= function * (self, condition) {
242
- let data ={}
243
- data = Object.assign({},data,self.model)
244
- if(self.model.f_inputtor){
245
- data.f_operator_name = self.model.f_inputtor
246
- }
247
- console.log(JSON.stringify(data))
248
- delete data.id
249
- data.f_phone = data.f_user_phone
250
- data.f_contact_phone = data.f_user_phone
251
- let res = self.$resetpost(`${self.$androidUtil.getProxyUrl()}/rs/saveSaleEntity/t_handrepair`,data,{resolveMsg:null,rejectMsg:null})
252
- .then((res) => {
253
- self.commit()
254
- })
255
-
256
- }
257
- export default {
258
- title: '手机单户抄表',
259
- data () {
260
- return {
261
- model: {
262
- failure:'[{"f_failure_type":"卡表故障","failurecase":["气量不符"]}]',
263
- f_operator_name:'',
264
- f_order_type:'抄表维修',
265
- f_workorder_type:'维修单',
266
- f_issue:'否',
267
- f_if_change:'否',
268
- imgInfo: '',
269
- imgName: '',
270
- f_result_state:'',
271
- f_weekcheckicnum:'',
272
- f_real_balance:'',
273
- f_weekchecknum:'',
274
- f_weekchecksn:'',
275
- f_weekchecknum:'',
276
- f_weekcheckicnum:'',
277
- f_weekcheckdishu:'',
278
- f_insflow:'',
279
- f_weekcheckicdishu:'',
280
- f_oughtamount: 0,
281
- f_new_tablebase: 0,
282
- f_new_lcd:0,
283
- f_curbalance:0,
284
- f_meter_repair:0,
285
- f_card_repair:0,
286
- f_new_tablebase:0,
287
- f_tablesnapsgas:0,
288
- f_icsnapsgas:0,
289
- imgs:[]
290
- }
291
- }
292
- },
293
- props: {
294
- data: {
295
- type: Object,
296
- default: function () {
297
- return {
298
- }
299
- }
300
- },
301
- showmessage:true,
302
- type: {
303
- type: String,
304
- default: 'save'
305
- }
306
- },
307
- watch:{
308
- 'data.f_download'(val){
309
- // console.log('变化' + JSON.stringify(data))
310
- // window.alert(123)
311
- if(this.data.f_download){
312
- // this.$showMessage('数据更新成功,请核对数据重新计算')
313
- this.data.f_new_lcd = this.model.f_new_lcd,
314
- this.data.f_tablebase = this.model.f_new_tablebase,
315
- this.data.f_weekcheckdishu = this.model.f_weekcheckdishu,
316
- this.data.f_weekcheckicdishu = this.model.f_weekcheckicdishu
317
- }
318
-
319
-
320
- // this.model = Object.assign({}, this.model, this.data)
321
- this.updatedata()
322
- }
323
-
324
- },
325
- ready () {
326
- // 抄表按钮可以点击
327
- console.log(this.model)
328
- this.flag = true
329
- this.updatedata()
330
- },
331
- methods: {
332
- updatedata(){
333
- this.model = Object.assign({}, this.model, this.data)
334
- if(this.type === 'save') {
335
- this.model.f_sumgas = this.data.f_sumgas ? this.data.f_sumgas : 0,
336
- this.model.f_nogasvalue = this.data.f_nogasvalue ? this.data.f_nogasvalue : 0,
337
- this.model.f_hasnotcharge = this.data.f_hasnotcharge ? this.data.f_hasnotcharge : 0,
338
- this.model.f_hascharge = this.data.f_hascharge ? this.data.f_hascharge : 0,
339
- this.model.f_last_lcd = this.data.f_last_lcd ? this.data.f_last_lcd : 0,
340
- this.model.f_new_tablebase = this.data.f_tablebase ? this.data.f_tablebase : 0,
341
- this.model.f_new_lcd = this.data.f_new_lcd ? this.data.f_new_lcd : 0,
342
- this.model.f_tablesnapsgas = this.data.f_tablesnapsgas ? this.data.f_tablesnapsgas : 0,
343
- this.model.f_meter_repair = this.data.f_meter_repair ? this.data.f_meter_repair : 0,
344
- this.model.f_card_repair = this.data.f_card_repair ? this.data.f_card_repair : 0,
345
- this.model.f_icsnapsgas = this.data.f_icsnapsgas ? this.data.f_icsnapsgas : 0,
346
- this.model.f_result_state = this.data.f_result_state ? this.data.f_result_state : '正常',
347
- this.model.f_sumgas_moment = this.data.f_sumgas_moment ? this.data.f_sumgas_moment : 0,
348
- this.model.f_curbalance = this.data.f_curbalance ? this.data.f_curbalance : 0,
349
- this.model.f_datacomparison = this.data.f_datacomparison ? this.data.f_datacomparison : 0
350
- this.model.f_if_change = this.data.f_if_change ? this.data.f_if_change : '否'
351
- console.log(this.model)
352
- }
353
- },
354
- //获取累购
355
- getSumGas(){
356
- this.$goto('hand-sell-history', {model: this.model,showmessage:this.showmessage,temp:'phone-handplan-info'}, 'list')
357
- },
358
- getMoneyMessage(){
359
- if (this.model.f_curbalance === '' || this.model.f_curbalance === undefined) {
360
- this.$showMessage('请检查你录入的金额')
361
- return
362
- }
363
- this.model.f_new_lcd = parseInt(this.model.f_curbalance / this.model.f_price)
364
- this.model.f_pregas = this.model.f_pregas?this.model.f_pregas:0
365
- this.model.f_sumgas_moment = this.model.f_sumgas_moment?this.model.f_sumgas_moment:0
366
- let res = this.$androidUtil.bzLogic('gasComputation', this.model,{rejectMsg: null, resolve: null})
367
- this.model.f_hasnotcharge = parseInt(res.hasnotCharge)
368
- this.model.f_hascharge = (parseInt(this.model.f_sumgas_moment)+ parseInt(this.model.f_nogasvalue) - parseInt(this.model.f_hasnotcharge))
369
- console.log('本期已充'+this.model.f_hascharge)
370
- this.model.f_last_lcd= this.model.f_last_lcd?this.model.f_last_lcd:0
371
- this.model.f_icsnapsgas = (parseInt(this.model.f_last_lcd)+ parseInt(this.model.f_hascharge)+parseInt(this.model.f_card_repair)- parseInt(this.model.f_new_lcd))
372
- console.log('IC走气'+this.model.f_icsnapsgas)
373
- this.model.f_result_state = res.f_result_state
374
- console.log('抄表状态'+this.model.f_result_state)
375
- this.model.f_datacomparison = (parseInt(this.model.f_icsnapsgas)-parseInt(this.model.f_tablesnapsgas))
376
- },
377
- //获取ic卡表数据
378
- getCardMessage(){
379
- if (this.model.f_new_lcd === '' || this.model.f_new_lcd === undefined) {
380
- this.$showMessage('请检查你录入的液晶示数')
381
- return
382
- }
383
- this.model.f_curbalance = parseInt(this.model.f_new_lcd * this.model.f_price)
384
- this.model.f_pregas = this.model.f_pregas?this.model.f_pregas:0
385
- this.model.f_sumgas_moment = this.model.f_sumgas_moment?this.model.f_sumgas_moment:0
386
- let res = this.$androidUtil.bzLogic('gasComputation', this.model,{rejectMsg: null, resolve: null})
387
- this.model.f_hasnotcharge = parseInt(res.hasnotCharge)
388
- this.model.f_hascharge = (parseInt(this.model.f_sumgas_moment)+ parseInt(this.model.f_nogasvalue) - parseInt(this.model.f_hasnotcharge))
389
- console.log('本期已充'+this.model.f_hascharge)
390
- this.model.f_last_lcd= this.model.f_last_lcd?this.model.f_last_lcd:0
391
- this.model.f_icsnapsgas = (parseInt(this.model.f_last_lcd)+ parseInt(this.model.f_hascharge)+parseInt(this.model.f_card_repair)- parseInt(this.model.f_new_lcd))
392
- console.log('IC走气'+this.model.f_icsnapsgas)
393
- this.model.f_result_state = res.f_result_state
394
- console.log('抄表状态'+this.model.f_result_state)
395
- this.model.f_datacomparison = (parseInt(this.model.f_icsnapsgas)-parseInt(this.model.f_tablesnapsgas))
396
-
397
- console.log('剩余金额'+this.model.f_curbalance)
398
- // let res = this.$androidUtil.bzLogic('gasComputation', this.model, {rejectMsg: null, resolve: null})
399
-
400
- },
401
- getWeekCardMessage(){
402
- if(this.model.f_card_id){
403
- if (this.model.f_weekcheckicdishu === '' || this.model.f_weekcheckicdishu === undefined) {
404
- this.$showMessage('请检查你录入的液晶示数')
405
- return
406
- }
407
- }
408
- let postdata = Object.assign({},this.model)
409
- postdata.week = '1',
410
- this.model.f_pregas = this.model.f_pregas?this.model.f_pregas:0
411
- this.model.f_sumgas_moment = this.model.f_sumgas_moment?this.model.f_sumgas_moment:0
412
- let res = this.$androidUtil.bzLogic('gasComputation', postdata,{rejectMsg: null, resolve: null})
413
- this.model.f_hasnotcharge = parseInt(res.hasnotCharge)
414
- this.model.f_hascharge = (parseInt(this.model.f_sumgas_moment)+ parseInt(this.model.f_nogasvalue) - parseInt(this.model.f_hasnotcharge))
415
- console.log('本期已充'+this.model.f_hascharge)
416
- this.model.f_weekcheckicnum= this.model.f_weekcheckicnum?this.model.f_weekcheckicnum:0
417
- this.model.f_weekicsnapsgas = (parseInt(this.model.f_weekcheckicnum)+ parseInt(this.model.f_hascharge)+parseInt(this.model.f_card_repair)- parseInt(this.model.f_weekcheckicdishu))
418
- console.log('IC走气'+this.model.f_icsnapsgas)
419
- this.model.f_result_state = res.f_result_state
420
- console.log('抄表状态'+this.model.f_result_state)
421
- this.model.f_datacomparison = (parseInt(this.model.f_icsnapsgas)-parseInt(this.model.f_tablesnapsgas))
422
- this.model.f_curbalance = parseInt(this.model.f_new_lcd * this.model.f_price)
423
- console.log('剩余金额'+this.model.f_curbalance)
424
-
425
- // let res = this.$androidUtil.bzLogic('gasComputation', this.model, {rejectMsg: null, resolve: null})
426
-
427
- },
428
- //获取基表走气量
429
- getWeekMeterMessage(){
430
- // if(this.model.f_weekcheck&&this.model.f_weekcheck ==='1'&& this.model.f_weekcheckdishu){
431
- // this.model.f_weekcheckdishu = this.model.f_new_tablebase
432
- // }
433
- if (this.model.f_weekcheckdishu === '' || this.model.f_weekcheckdishu === undefined) {
434
- this.$showMessage('请检查你录入的表底数')
435
- return
436
- }
437
- if (parseInt(this.model.f_weekcheckdishu) - parseInt(this.model.f_weekchecknum) < 0) {
438
- this.$showMessage('录入本期表底数不能小于上期表底数!')
439
- return
440
- }
441
- this.model.f_meter_repair= this.model.f_meter_repair?this.model.f_meter_repair:0
442
- this.model.f_weekchecknum= this.model.f_weekchecknum?this.model.f_weekchecknum:0
443
- // this.$set(this.model.f_tablesnapsgas,'')
444
- this.model.f_weektablesnapsgas = parseInt(this.model.f_weekcheckdishu)- parseInt(this.model.f_weekchecknum)-parseInt(this.model.f_meter_repair)
445
- if (this.model.f_weekcheckicdishu && this.model.f_card_id ) {
446
- this.getWeekCardMessage()
447
- }
448
- },
449
- //获取基表走气量
450
- getMeterMessage(){
451
- // if(this.model.f_weekcheck&&this.model.f_weekcheck ==='1'&& this.model.f_weekcheckdishu){
452
- // this.model.f_new_tablebase = this.model.f_weekcheckdishu
453
- // }
454
- if (this.model.f_new_tablebase === '' || this.model.f_new_tablebase === undefined) {
455
- this.$showMessage('请检查你录入的表底数')
456
- return
457
- }
458
- if (parseInt(this.model.f_new_tablebase) - parseInt(this.model.f_last_tablebase) < 0) {
459
- this.$showMessage('录入本期表底数不能小于上期表底数!')
460
- return
461
- }
462
- this.model.f_meter_repair= this.model.f_meter_repair?this.model.f_meter_repair:0
463
- this.model.f_last_tablebase= this.model.f_last_tablebase?this.model.f_last_tablebase:0
464
- // this.$set(this.model.f_tablesnapsgas,'')
465
- this.model.f_tablesnapsgas = parseInt(this.model.f_new_tablebase)- parseInt(this.model.f_last_tablebase)-parseInt(this.model.f_meter_repair)
466
- if (this.model.f_new_lcd ) {
467
- this.getCardMessage()
468
- }
469
- },
470
- // getWeekMeterMessage(){
471
- // if (this.model.f_weekcheckdishu === '' || this.model.f_weekcheckdishu === undefined) {
472
- // this.$showMessage('请检查你录入的表底数')
473
- // return
474
- // }
475
- // if (parseInt(this.model.f_weekcheckdishu) - parseInt(this.model.f_last_tablebase) < 0) {
476
- // this.$showMessage('录入本期表底数不能小于上期表底数!')
477
- // return
478
- // }
479
- // this.model.f_new_tablebase = parseInt(this.model.f_weekcheckdishu)
480
- // this.model.f_meter_repair= this.model.f_meter_repair?this.model.f_meter_repair:0
481
- // this.model.f_last_tablebase= this.model.f_last_tablebase?this.model.f_last_tablebase:0
482
- // // this.$set(this.model.f_tablesnapsgas,'')
483
- // this.model.f_tablesnapsgas = parseInt(this.model.f_weekcheckdishu)- parseInt(this.model.f_last_tablebase)-parseInt(this.model.f_meter_repair)
484
- // },
485
-
486
- commit () {
487
-
488
-
489
- if(this.model.f_weekcheck==='1'||this.model.f_weekcheck==='true'||this.model.f_weekcheck==='是'){
490
- if (this.f_weektablesnapsgas < 0 && this.model.f_if_change!=='是') {
491
- this.$showMessage('录入本期表底数不能小于上期表底数!请核对抄表数据')
492
- return
493
- }
494
-
495
- // if (parseInt(this.model.f_weekcheckdishu) - parseInt(this.model.f_weekchecknum) < 0) {
496
- // this.$showMessage('录入本期表底数不能小于上期表底数!')
497
- // return
498
- // }
499
- }else{
500
- if (this.model.f_new_tablebase === '' || this.model.f_new_tablebase === undefined) {
501
- this.$showMessage('请检查你录入的表底数')
502
- return
503
- }
504
- if ((parseInt(this.model.f_new_tablebase) - parseInt(this.model.f_last_tablebase) < 0) && this.model.f_if_change!=='是') {
505
- this.$showMessage('录入本期表底数不能小于上期表底数!')
506
- return
507
- }
508
- }
509
- // if(this.model.f_result_state==='异常'&&){
510
- // this.$showMessage(`抄表异常,请核对抄表数据`)
511
- // return
512
- // }
513
-
514
- // if (!(this.model.imgName && this.model.imgName.length > 0)) {
515
- // this.$showMessage('请录入抄表照片!')
516
- // return
517
- // }
518
- if (!this.flag) {
519
- this.$showMessage(`系统正在进行抄表,请勿重复操作!`)
520
- // this.$showAlert('系统正在进行抄表,请勿重复操作!', 'warning', 2000)
521
- return
522
- }
523
- if(this.model.lastImgName){
524
- this.model.lastImgName = `.${this.model.f_user_name}${this.model.imgName.substring(this.model.imgName.indexOf('.'))}`
525
- }
526
- // 设置抄表按钮不可用
527
- // this.flag = false
528
- // 将用户编号放入抄表照片名中
529
- console.log(this.model.lastImgName)
530
- this.model.f_oughtamount = parseInt(this.model.f_new_tablebase) - parseInt(this.model.f_last_tablebase)
531
- this.model.f_end_time = this.data.f_end_time
532
- this.model.f_user_id = parseInt(this.model.f_user_id)
533
- this.model.f_new_tablebase = parseInt(this.model.f_new_tablebase)
534
- this.model.f_new_lcd = parseInt(this.model.f_new_lcd)
535
- if( this.model.f_weekcheck==='1'||this.model.f_weekcheck==='true'||this.model.f_weekcheck==='是'){
536
- this.model.f_new_tablebase =this.model.f_new_tablebase?this.model.f_new_tablebase: parseInt(this.model.f_last_tablebase)
537
- }
538
- let res = this.$androidUtil.bzLogic('phone-readmeter', this.model, {rejectMsg: null, resolve: null})
539
- console.log('上传返回结果'+ res)
540
- console.log('上传返回结果'+JSON.stringify(res))
541
- if (res.code === 200) {
542
- console.log('抄表完成!')
543
- // 抄表完成设置按钮可用
544
- this.flag = false
545
- this.$showMessage('抄表成功!')
546
- // this.$showAlert('抄表成功!', 'success', 2000)
547
- // 发送抄表成功事件给父页面
548
- // this.$dispatch('hand-success', this.type)
549
- }else{
550
- console.log('抄表失败')
551
- // 抄表完成设置按钮可用
552
- this.flag = true
553
- // this.$showMessage(`${res.backData.msg}!请前往表单上传重新提交`)
554
- // this.$showAlert(`${res.backData.msg}!请前往表单上传重新提交`, 'danger', 2000)
555
- }
556
- },
557
- //将数据存入本地数据库,下次进入页面回写数据
558
- torepair(val){
559
- this.$showMessage('是否确定申请生成维修单', ['confirm', 'cancel']).then((res) => {
560
- if (res === 'confirm') {
561
- let re = repairGen(this,val)
562
- co(re)
563
- }
564
- })
565
- },
566
- save(){
567
- if (!this.flag) {
568
- this.$showMessage(`该抄表单已上传成功,请勿重复保存!`)
569
- return
570
- }
571
- if(this.model.f_weekcheck==='1'||this.model.f_weekcheck==='true'||this.model.f_weekcheck==='是'){
572
- if (this.f_weektablesnapsgas < 0 && this.model.f_if_change!=='是') {
573
- this.$showMessage('录入本期表底数不能小于上期表底数!请核对抄表数据')
574
- return
575
- }
576
-
577
- // if (parseInt(this.model.f_weekcheckdishu) - parseInt(this.model.f_weekchecknum) < 0) {
578
- // this.$showMessage('录入本期表底数不能小于上期表底数!')
579
- // return
580
- // }
581
- }else{
582
- if (this.model.f_new_tablebase === '' || this.model.f_new_tablebase === undefined) {
583
- this.$showMessage('请检查你录入的表底数')
584
- return
585
- }
586
- if (this.model.f_tablesnapsgas<0 && this.model.f_if_change!=='是') {
587
- this.$showMessage('录入本期表底数不能小于上期表底数!')
588
- return
589
- }
590
- }
591
- this.model.f_new_tablebase = parseInt(this.model.f_new_tablebase)
592
- this.model.f_new_lcd = parseInt(this.model.f_new_lcd)
593
- // this.$dispatch('updatemeter')
594
- this.model.f_end_time = this.data.f_end_time
595
- let res = this.$androidUtil.bzLogic('local-save',this.model,{rejectMsg: null, resolve: null})
596
- console.log('保存到本地'+ JSON.stringify(res))
597
- if(res.status === 200){
598
- // this.flag= false
599
- this.$showMessage('本地数据保存成功!')
600
- // this.$showAlert('本地数据保存成功!', 'success', 2000)
601
- }
602
- }
603
- }
604
- }
605
- </script>
606
- <style scoped>
607
- .mt-5 {
608
- margin-top: 5px;
609
- }
610
- .mt-10 {
611
- margin-top: 10px;
612
- }
613
- .mt-20 {
614
- margin-top: 20px;
615
- }
616
-
617
- .app-row-none-border {
618
- background-color: white;
619
- padding: 10px 10px 0 10px;
620
- }
621
- .font{
622
- font: 17px PingFang-SC-Medium;
623
- color: #666666
624
- }
625
- .show-font{
626
- font: 17px PingFang-SC-Medium;
627
- color: #333333
628
- }
629
- .btn-font{
630
- font:600 16px PingFang-SC-Bold;
631
- color: #499EDF;
632
- }
633
- .head{
634
- font-size: 1.25em;
635
- font-weight: bolder;
636
- padding: 0.5em;
637
- }
638
- .btn-color{
639
- background-color: #FFFFFF;
640
- border-radius: 10px ;
641
- border: 1px solid #499EDF;
642
- }
643
- </style>
1
+ <template>
2
+ <div class="auto app-text" style="margin-top: 5px;">
3
+ <header class="head">
4
+ 抄表信息
5
+ </header>
6
+ <div class="panel" style="padding: 10px 10px 5px 10px;">
7
+ <div class="panel-body panel-self">
8
+ <div class="row auto app-row col-xs-12 col-sm-6 col-md-6">
9
+ <p class="panel-title col-xs-4 col-sm-4 col-md-4 text-left font">上次抄表日期</p>
10
+ <p class="panel-title col-xs-8 col-sm-8 col-md-8 text-left font">{{ model.f_last_hand_date }}</p>
11
+ </div>
12
+ <div class="row auto app-row col-xs-12 col-sm-6 col-md-6">
13
+ <p class="panel-title col-xs-4 col-sm-4 col-md-4 text-left font">上次基表底数</p>
14
+ <p class="panel-title col-xs-8 col-sm-8 col-md-8 text-left font">{{ model.f_last_tablebase }}</p>
15
+ </div>
16
+ <div class="row auto app-row col-xs-12 col-sm-6 col-md-6">
17
+ <p class="panel-title col-xs-4 col-sm-4 col-md-4 text-left font">上次剩余气量</p>
18
+ <p class="panel-title col-xs-8 col-sm-8 col-md-8 text-left font">{{ model.f_last_lcd }}</p>
19
+ </div>
20
+ <div class="row auto app-row col-xs-12 col-sm-6 col-md-6">
21
+ <p class="panel-title col-xs-4 col-sm-4 col-md-4 text-left font">上次剩余金额</p>
22
+ <p class="panel-title col-xs-8 col-sm-8 col-md-8 text-left font">{{ parseInt(model.f_iclastmoney) }}</p>
23
+ </div>
24
+ <div class="row auto app-row col-xs-12 col-sm-12 col-md-12 bg-white ">
25
+ <label for="f_sumgas" class="panel-title col-xs-4 col-sm-2 col-md-2 text-left font">总购气量</label>
26
+ <div class="col-xs-6 col-sm-4 col-md-4 ">
27
+ <input type="number" id="f_sumgas" class="form-control font " v-model="model.f_sumgas" >
28
+ </div>
29
+ <div class="col-sm-2 col-xs-2 col-sm-offset-1 col-md-2 col-md-offset-1">
30
+ <button type="button" name="button" class="btn btn-primary" @click="getSumGas(model.card_id)"
31
+ >详情
32
+ </button>
33
+ </div>
34
+ </div>
35
+ <div class="row auto app-row col-xs-12 col-sm-6 col-md-6">
36
+ <p class="panel-title col-xs-4 col-sm-4 col-md-4 text-left font">期间购气:</p>
37
+ <p class="panel-title col-xs-8 col-sm-8 col-md-8 text-left font">{{ model.f_sumgas_moment }}</p>
38
+ </div>
39
+ <div class="row auto app-row col-xs-12 col-sm-6 col-md-6">
40
+ <p class="panel-title col-xs-4 col-sm-4 col-md-4 text-left font">上次未充:</p>
41
+ <p class="panel-title col-xs-8 col-sm-8 col-md-8 text-left font">{{ model.f_nogasvalue }}</p>
42
+ </div>
43
+ <div class="row auto app-row col-xs-12 col-sm-6 col-md-6">
44
+ <p class="panel-title col-xs-4 col-sm-4 col-md-4 text-left font">本次已充:</p>
45
+ <p class="panel-title col-xs-8 col-sm-8 col-md-8 text-left font">{{ model.f_hascharge}}</p>
46
+ </div>
47
+ <div class="row auto app-row col-xs-12 col-sm-6 col-md-6">
48
+ <p class="panel-title col-xs-4 col-sm-4 col-md-4 text-left font">本次未充:</p>
49
+ <p class="panel-title col-xs-8 col-sm-8 col-md-8 text-left font">{{ model.f_hasnotcharge}}</p>
50
+ </div>
51
+ <div class="col-xs-12 col-sm-12 col-md-12" v-if="!(model.f_weekcheck==='1'||model.f_weekcheck==='true'||model.f_weekcheck==='是')">
52
+ <div class="row auto app-row col-xs-12 col-sm-12 col-md-12 bg-white ">
53
+ <div class="auto col-xs-12 col-sm-4 col-md-4 bg-white app-row ">
54
+ <label for="f_new_tablebase" class="panel-title col-xs-4 col-sm-6 col-md-6 text-left font">基表底数</label>
55
+ <div class="col-xs-8 col-sm-6 col-md-6 ">
56
+ <input type="number" id="f_new_tablebase" class="form-control font" v-el:f_new_tablebase v-next-el="f_new_lcd" @blur="getMeterMessage()" v-model="model.f_new_tablebase" >
57
+ </div>
58
+ </div>
59
+ <div class="auto col-xs-12 col-sm-4 col-md-4 bg-white app-row ">
60
+ <label for="f_tablesnapsgas" class="panel-title col-xs-4 col-sm-6 col-md-6 text-left font">基表走气量</label>
61
+ <div class="col-xs-8 col-sm-6 col-md-6 ">
62
+ <input type="number" id="f_tablesnapsgas" class="form-control font " v-model="model.f_tablesnapsgas" readonly>
63
+ </div>
64
+ </div>
65
+ <div class="auto col-xs-12 col-sm-4 col-md-4 bg-white app-row ">
66
+ <label for="f_meter_repair" class="panel-title col-xs-4 col-sm-6 col-md-6 text-left font">表维修</label>
67
+ <div class="col-xs-8 col-sm-6 col-md-6 ">
68
+ <input type="number" id="f_meter_repair" class="form-control font " v-model="model.f_meter_repair" readonly>
69
+ </div>
70
+ </div>
71
+ </div>
72
+ <div class="row auto app-row col-xs-12 col-sm-12 col-md-12 bg-white ">
73
+ <div class="auto col-xs-12 col-sm-4 col-md-4 bg-white app-row " v-if="model.f_meter_classify!=='机表'">
74
+ <label for="f_new_tablebase" class="panel-title col-xs-4 col-sm-6 col-md-6 text-left font">卡剩余气量</label>
75
+ <div class="col-xs-8 col-sm-6 col-md-6 ">
76
+ <input type="number" id="f_new_lcd" class="form-control font " @blur="getCardMessage()" v-el:f_new_lcd v-next-el="f_insflow" v-model="model.f_new_lcd" >
77
+ </div>
78
+ </div>
79
+ <div class="auto col-xs-12 col-sm-4 col-md-4 bg-white app-row " v-if="model.f_meter_classify!=='机表'">
80
+ <label for="f_icsnapsgas" class="panel-title col-xs-4 col-sm-6 col-md-6 text-left font">IC卡扣气量</label>
81
+ <div class="col-xs-8 col-sm-6 col-md-6 ">
82
+ <input type="text" id="f_icsnapsgas" class="form-control font " v-model="model.f_icsnapsgas" readonly>
83
+ </div>
84
+ </div>
85
+ <div class="auto col-xs-12 col-sm-4 col-md-4 bg-white app-row " v-if="model.f_meter_classify!=='机表'">
86
+ <label for="f_card_repair" class="panel-title col-xs-4 col-sm-6 col-md-6 text-left font">卡维修</label>
87
+ <div class="col-xs-8 col-sm-6 col-md-6 ">
88
+ <input type="text" id="f_card_repair" class="form-control font " v-model="model.f_card_repair" readonly>
89
+ </div>
90
+ </div>
91
+ </div>
92
+ <div class="row auto app-row col-xs-12 col-sm-12 col-md-12 bg-white ">
93
+ <div class="auto col-xs-12 col-sm-4 col-md-4 bg-white app-row " v-if="model.f_meter_classify!=='机表'">
94
+ <label for="f_curbalance" class="panel-title col-xs-4 col-sm-6 col-md-6 text-left font">卡剩余金额</label>
95
+ <div class="col-xs-8 col-sm-6 col-md-6 ">
96
+ <input type="text" id="f_curbalance" class="form-control font " @blur="getMoneyMessage()" v-model="model.f_curbalance" >
97
+ </div>
98
+ </div>
99
+
100
+ <div class="auto col-xs-12 col-sm-4 col-md-4 bg-white app-row " v-if="model.f_meter_classify!=='机表'">
101
+ <label for="f_datacomparison" class="panel-title col-xs-4 col-sm-6 col-md-6 text-left font">数据对比</label>
102
+ <div class="col-xs-8 col-sm-6 col-md-6 ">
103
+ <input type="text" id="f_datacomparison" class="form-control font " v-model="model.f_datacomparison" readonly>
104
+ </div>
105
+ </div>
106
+ <div class="bg-white auto app-row col-xs-12 col-sm-4 col-md-4" v-if="model.f_meter_classify!=='机表'">
107
+ <p class="panel-title col-xs-4 col-sm-6 col-md-6 text-left font">抄表状态</p>
108
+ <!--<p class="panel-title col-xs-8 col-sm-6 col-md-6 text-left font">{{ model.f_result_state}}</p>-->
109
+ <div class="col-xs-8 col-sm-6 col-md-6 ">
110
+ <input type="text" id="f_datacomparison" class="form-control font " v-model="model.f_result_state" readonly>
111
+ </div>
112
+ </div>
113
+ </div>
114
+ <div class="auto col-xs-12 col-sm-6 col-md-6 bg-white app-row ">
115
+ <label for="f_insflow" class="panel-title col-xs-4 col-sm-4 col-md-4 text-left font">瞬时流量</label>
116
+ <div class="col-xs-8 col-sm-8 col-md-8 ">
117
+ <input type="number" id="f_insflow" class="form-control font " v-model="model.f_insflow" v-el:f_insflow v-next-el="f_temperature">
118
+ </div>
119
+ </div>
120
+
121
+ <div class="auto col-xs-12 col-sm-6 col-md-6 bg-white app-row ">
122
+ <label for="f_temperature" class="panel-title col-xs-4 col-sm-4 col-md-4 text-left font">温度</label>
123
+ <div class="col-xs-8 col-sm-8 col-md-8 ">
124
+ <input type="number" id="f_temperature" class="form-control font " v-model="model.f_temperature" v-el:f_temperature v-next-el="f_pressure">
125
+ </div>
126
+ </div>
127
+
128
+ <div class="auto col-xs-12 col-sm-6 col-md-6 bg-white app-row ">
129
+ <label for="f_pressure" class="panel-title col-xs-4 col-sm-4 col-md-4 text-left font">压力</label>
130
+ <div class="col-xs-8 col-sm-8 col-md-8 ">
131
+ <input type="number" id="f_pressure" class="form-control font " v-model="model.f_pressure" v-el:f_pressure v-next-el="f_condition">
132
+ </div>
133
+ </div>
134
+ <div class="auto col-xs-12 col-sm-6 col-md-6 bg-white app-row ">
135
+ <label for="f_condition" class="panel-title col-xs-4 col-sm-4 col-md-4 text-left font">工况</label>
136
+ <div class="col-xs-8 col-sm-8 col-md-8 ">
137
+ <input type="number" id="f_condition" class="form-control font " v-model="model.f_condition" v-el:f_condition v-next-el="f_condition">
138
+ </div>
139
+ </div>
140
+ <div class="auto col-xs-12 col-sm-12 col-md-12 bg-white app-row" style="padding: 0.5em">
141
+
142
+ <p class="panel-title col-xs-4 col-sm-2 col-md-2 text-left font">换表</p>
143
+ <div class="col-xs-4 col-sm-2 col-md-2">
144
+ <input type="radio" name="f_if_change" id="f_if_change" value="是" v-model="model.f_if_change" > 是
145
+ </div>
146
+ <div class="col-xs-4 col-sm-2 col-md-2">
147
+ <input type="radio" name="f_if_change" id="f_if_change" value="否" v-model="model.f_if_change" checked> 否
148
+ </div>
149
+ </div>
150
+ </div>
151
+
152
+ <div class="check-info row auto app-row col-xs-12 col-sm-12 col-md-12" v-if="model.f_weekcheck==='1'||model.f_weekcheck==='true'||model.f_weekcheck==='是'">
153
+
154
+ <div class="auto col-xs-12 col-sm-12 col-md-12 bg-white ">
155
+ <div class="col-xs-12 col-sm-6 col-md-6">
156
+ <label for="f_weekchecksn" class="panel-title col-xs-4 col-sm-4 col-md-4 text-left font">替换表表号</label>
157
+ <div class="col-xs-8 col-sm-8 col-md-8 ">
158
+ <input type="text" id="f_weekchecksn" class="form-control font " v-model="model.f_weekchecksn" v-el:f_weekchecksn v-next-el="f_weekcheckdishu">
159
+ </div>
160
+ </div>
161
+ </div>
162
+ <div class="auto col-xs-12 col-sm-6 col-md-6 bg-white app-row ">
163
+ <label for="f_weekchecknum" class="panel-title col-xs-4 col-sm-4 col-md-4 text-left font">替换表上次安装读数</label>
164
+ <div class="col-xs-8 col-sm-8 col-md-8 ">
165
+ <input type="text" id="f_weekchecknum" class="form-control font " v-model="model.f_weekchecknum" disabled>
166
+ </div>
167
+ </div>
168
+
169
+ <div class="auto col-xs-12 col-sm-6 col-md-6 bg-white app-row ">
170
+ <label for="f_weekcheckicnum" class="panel-title col-xs-4 col-sm-4 col-md-4 text-left font">IC卡上次安装剩余气量</label>
171
+ <div class="col-xs-8 col-sm-8 col-md-8 ">
172
+ <input type="text" id="f_weekcheckicnum" class="form-control font " v-model="model.f_weekcheckicnum" disabled>
173
+ </div>
174
+ </div>
175
+
176
+ <div class="auto col-xs-12 col-sm-6 col-md-6 bg-white app-row ">
177
+ <label for="f_weekcheckdishu" class="panel-title col-xs-4 col-sm-4 col-md-4 text-left font">替换表底数</label>
178
+ <div class="col-xs-8 col-sm-8 col-md-8 ">
179
+ <input type="text" id="f_weekcheckdishu" class="form-control font " @blur="getWeekMeterMessage()" v-el:f_weekcheckdishu v-next-el="f_weekcheckicdishu" v-model="model.f_weekcheckdishu" >
180
+ </div>
181
+ </div>
182
+
183
+ <div class="auto col-xs-12 col-sm-6 col-md-6 bg-white app-row ">
184
+ <label for="f_insflow" class="panel-title col-xs-4 col-sm-4 col-md-4 text-left font">走气量</label>
185
+ <div class="col-xs-8 col-sm-8 col-md-8 ">
186
+ <input type="text" id="f_insflow" class="form-control font " v-model="model.f_weektablesnapsgas" readonly>
187
+ </div>
188
+ </div>
189
+
190
+ <div class="auto col-xs-12 col-sm-6 col-md-6 bg-white app-row ">
191
+ <label for="f_temperature" class="panel-title col-xs-4 col-sm-4 col-md-4 text-left font">卡剩余气量</label>
192
+ <div class="col-xs-8 col-sm-8 col-md-8 ">
193
+ <input type="text" id="f_weekcheckicdishu" class="form-control font " @blur="getWeekCardMessage()" v-model="model.f_weekcheckicdishu" v-el:f_weekcheckicdishu v-next-el="f_remark">
194
+ </div>
195
+ </div>
196
+
197
+ <div class="auto col-xs-12 col-sm-6 col-md-6 bg-white app-row ">
198
+ <label for="f_pressure" class="panel-title col-xs-4 col-sm-4 col-md-4 text-left font">扣气量</label>
199
+ <div class="col-xs-8 col-sm-8 col-md-8 ">
200
+ <input type="text" id="f_pressure" class="form-control font " v-model="model.f_weekicsnapsgas" >
201
+ </div>
202
+ </div>
203
+ <div class="row auto bg-white app-row col-xs-12 col-sm-4 col-md-4" v-if="model.f_meter_classify!=='机表'">
204
+ <p class="panel-title col-xs-4 col-sm-6 col-md-6 text-left font">抄表状态</p>
205
+ <p class="panel-title col-xs-8 col-sm-6 col-md-6 text-left font">{{ model.f_result_state}}</p>
206
+ </div>
207
+ </div>
208
+
209
+ <div class=" row auto app-row col-xs-12 col-sm-12 col-md-12 bg-white ">
210
+ <label for="f_mark" class="panel-title col-xs-4 col-sm-2 col-md-2 text-left font">备注</label>
211
+ <div class="col-xs-8 col-sm-10 col-md-10 ">
212
+ <input type="text" id="f_card_id" class="form-control font " v-model="model.f_remark" v-el:f_remark>
213
+ </div>
214
+ </div>
215
+ <div class="row auto col-xs-12 col-sm-12 col-md-12 mt-20">
216
+ <!--<img-area :model="model.imgs"></img-area>-->
217
+ <picture-area :model="model.imgs"></picture-area>
218
+ </div>
219
+ <div class="row auto mt-20" v-if="!data.hidden">
220
+ <div class="col-xs-2 col-sm-2 col-md-2 col-xs-offset-2 col-sm-offset-2 col-md-offset-2">
221
+ <button type="button" class="btn btn-lg btn-color btn-font" @click="save()">保存</button>
222
+ </div>
223
+ <div class="col-xs-2 col-sm-2 col-md-2 col-xs-offset-1 col-sm-offset-1 col-md-offset-1" >
224
+ <button type="button" class="btn btn-color btn-font btn-lg" @click="commit()">提交</button>
225
+ </div>
226
+ <div v-if="model.f_result_state==='异常'" class="col-xs-2 col-sm-2 col-md-2 col-xs-offset-1 col-sm-offset-1 col-md-offset-1" >
227
+ <button type="button" class="btn btn-warning btn-font btn-lg" @click="torepair()">转维修</button>
228
+ </div>
229
+ </div>
230
+ <!--<div class="row auto" style="margin: 30px 0 60px 0;">-->
231
+ <!--<p class="text-warning">&nbsp;&nbsp;提示:表底数输入燃气表黑色部分数字</p>-->
232
+ <!--</div>-->
233
+ </div>
234
+ </div>
235
+ </div>
236
+ </template>
237
+ <script>
238
+ import * as Util from '../Util'
239
+ import Vue from 'vue'
240
+ import co from 'co'
241
+ let repairGen= function * (self, condition) {
242
+ let data ={}
243
+ data = Object.assign({},data,self.model)
244
+ if(self.model.f_inputtor){
245
+ data.f_operator_name = self.model.f_inputtor
246
+ }
247
+ console.log(JSON.stringify(data))
248
+ delete data.id
249
+ data.f_phone = data.f_user_phone
250
+ data.f_contact_phone = data.f_user_phone
251
+ let res = self.$resetpost(`${self.$androidUtil.getProxyUrl()}/rs/saveSaleEntity/t_handrepair`,data,{resolveMsg:null,rejectMsg:null})
252
+ .then((res) => {
253
+ self.commit()
254
+ })
255
+
256
+ }
257
+ export default {
258
+ title: '手机单户抄表',
259
+ data () {
260
+ return {
261
+ model: {
262
+ failure:'[{"f_failure_type":"卡表故障","failurecase":["气量不符"]}]',
263
+ f_operator_name:'',
264
+ f_order_type:'抄表维修',
265
+ f_workorder_type:'维修单',
266
+ f_issue:'否',
267
+ f_if_change:'否',
268
+ imgInfo: '',
269
+ imgName: '',
270
+ f_result_state:'',
271
+ f_weekcheckicnum:'',
272
+ f_real_balance:'',
273
+ f_weekchecknum:'',
274
+ f_weekchecksn:'',
275
+ f_weekchecknum:'',
276
+ f_weekcheckicnum:'',
277
+ f_weekcheckdishu:'',
278
+ f_insflow:'',
279
+ f_weekcheckicdishu:'',
280
+ f_oughtamount: 0,
281
+ f_new_tablebase: 0,
282
+ f_new_lcd:0,
283
+ f_curbalance:0,
284
+ f_meter_repair:0,
285
+ f_card_repair:0,
286
+ f_new_tablebase:0,
287
+ f_tablesnapsgas:0,
288
+ f_icsnapsgas:0,
289
+ imgs:[]
290
+ }
291
+ }
292
+ },
293
+ props: {
294
+ data: {
295
+ type: Object,
296
+ default: function () {
297
+ return {
298
+ }
299
+ }
300
+ },
301
+ showmessage:true,
302
+ type: {
303
+ type: String,
304
+ default: 'save'
305
+ }
306
+ },
307
+ watch:{
308
+ 'data.f_download'(val){
309
+ // console.log('变化' + JSON.stringify(data))
310
+ // window.alert(123)
311
+ if(this.data.f_download){
312
+ // this.$showMessage('数据更新成功,请核对数据重新计算')
313
+ this.data.f_new_lcd = this.model.f_new_lcd,
314
+ this.data.f_tablebase = this.model.f_new_tablebase,
315
+ this.data.f_weekcheckdishu = this.model.f_weekcheckdishu,
316
+ this.data.f_weekcheckicdishu = this.model.f_weekcheckicdishu
317
+ }
318
+
319
+
320
+ // this.model = Object.assign({}, this.model, this.data)
321
+ this.updatedata()
322
+ }
323
+
324
+ },
325
+ ready () {
326
+ // 抄表按钮可以点击
327
+ console.log(this.model)
328
+ this.flag = true
329
+ this.updatedata()
330
+ },
331
+ methods: {
332
+ updatedata(){
333
+ this.model = Object.assign({}, this.model, this.data)
334
+ if(this.type === 'save') {
335
+ this.model.f_sumgas = this.data.f_sumgas ? this.data.f_sumgas : 0,
336
+ this.model.f_nogasvalue = this.data.f_nogasvalue ? this.data.f_nogasvalue : 0,
337
+ this.model.f_hasnotcharge = this.data.f_hasnotcharge ? this.data.f_hasnotcharge : 0,
338
+ this.model.f_hascharge = this.data.f_hascharge ? this.data.f_hascharge : 0,
339
+ this.model.f_last_lcd = this.data.f_last_lcd ? this.data.f_last_lcd : 0,
340
+ this.model.f_new_tablebase = this.data.f_tablebase ? this.data.f_tablebase : 0,
341
+ this.model.f_new_lcd = this.data.f_new_lcd ? this.data.f_new_lcd : 0,
342
+ this.model.f_tablesnapsgas = this.data.f_tablesnapsgas ? this.data.f_tablesnapsgas : 0,
343
+ this.model.f_meter_repair = this.data.f_meter_repair ? this.data.f_meter_repair : 0,
344
+ this.model.f_card_repair = this.data.f_card_repair ? this.data.f_card_repair : 0,
345
+ this.model.f_icsnapsgas = this.data.f_icsnapsgas ? this.data.f_icsnapsgas : 0,
346
+ this.model.f_result_state = this.data.f_result_state ? this.data.f_result_state : '正常',
347
+ this.model.f_sumgas_moment = this.data.f_sumgas_moment ? this.data.f_sumgas_moment : 0,
348
+ this.model.f_curbalance = this.data.f_curbalance ? this.data.f_curbalance : 0,
349
+ this.model.f_datacomparison = this.data.f_datacomparison ? this.data.f_datacomparison : 0
350
+ this.model.f_if_change = this.data.f_if_change ? this.data.f_if_change : '否'
351
+ console.log(this.model)
352
+ }
353
+ },
354
+ //获取累购
355
+ getSumGas(){
356
+ this.$goto('hand-sell-history', {model: this.model,showmessage:this.showmessage,temp:'phone-handplan-info'}, 'list')
357
+ },
358
+ getMoneyMessage(){
359
+ if (this.model.f_curbalance === '' || this.model.f_curbalance === undefined) {
360
+ this.$showMessage('请检查你录入的金额')
361
+ return
362
+ }
363
+ this.model.f_new_lcd = parseInt(this.model.f_curbalance / this.model.f_price)
364
+ this.model.f_pregas = this.model.f_pregas?this.model.f_pregas:0
365
+ this.model.f_sumgas_moment = this.model.f_sumgas_moment?this.model.f_sumgas_moment:0
366
+ let res = this.$androidUtil.bzLogic('gasComputation', this.model,{rejectMsg: null, resolve: null})
367
+ this.model.f_hasnotcharge = parseInt(res.hasnotCharge)
368
+ this.model.f_hascharge = (parseInt(this.model.f_sumgas_moment)+ parseInt(this.model.f_nogasvalue) - parseInt(this.model.f_hasnotcharge))
369
+ console.log('本期已充'+this.model.f_hascharge)
370
+ this.model.f_last_lcd= this.model.f_last_lcd?this.model.f_last_lcd:0
371
+ this.model.f_icsnapsgas = (parseInt(this.model.f_last_lcd)+ parseInt(this.model.f_hascharge)+parseInt(this.model.f_card_repair)- parseInt(this.model.f_new_lcd))
372
+ console.log('IC走气'+this.model.f_icsnapsgas)
373
+ this.model.f_result_state = res.f_result_state
374
+ console.log('抄表状态'+this.model.f_result_state)
375
+ this.model.f_datacomparison = (parseInt(this.model.f_icsnapsgas)-parseInt(this.model.f_tablesnapsgas))
376
+ },
377
+ //获取ic卡表数据
378
+ getCardMessage(){
379
+ if (this.model.f_new_lcd === '' || this.model.f_new_lcd === undefined) {
380
+ this.$showMessage('请检查你录入的液晶示数')
381
+ return
382
+ }
383
+ this.model.f_curbalance = parseInt(this.model.f_new_lcd * this.model.f_price)
384
+ this.model.f_pregas = this.model.f_pregas?this.model.f_pregas:0
385
+ this.model.f_sumgas_moment = this.model.f_sumgas_moment?this.model.f_sumgas_moment:0
386
+ let res = this.$androidUtil.bzLogic('gasComputation', this.model,{rejectMsg: null, resolve: null})
387
+ this.model.f_hasnotcharge = parseInt(res.hasnotCharge)
388
+ this.model.f_hascharge = (parseInt(this.model.f_sumgas_moment)+ parseInt(this.model.f_nogasvalue) - parseInt(this.model.f_hasnotcharge))
389
+ console.log('本期已充'+this.model.f_hascharge)
390
+ this.model.f_last_lcd= this.model.f_last_lcd?this.model.f_last_lcd:0
391
+ this.model.f_icsnapsgas = (parseInt(this.model.f_last_lcd)+ parseInt(this.model.f_hascharge)+parseInt(this.model.f_card_repair)- parseInt(this.model.f_new_lcd))
392
+ console.log('IC走气'+this.model.f_icsnapsgas)
393
+ this.model.f_result_state = res.f_result_state
394
+ console.log('抄表状态'+this.model.f_result_state)
395
+ this.model.f_datacomparison = (parseInt(this.model.f_icsnapsgas)-parseInt(this.model.f_tablesnapsgas))
396
+
397
+ console.log('剩余金额'+this.model.f_curbalance)
398
+ // let res = this.$androidUtil.bzLogic('gasComputation', this.model, {rejectMsg: null, resolve: null})
399
+
400
+ },
401
+ getWeekCardMessage(){
402
+ if(this.model.f_card_id){
403
+ if (this.model.f_weekcheckicdishu === '' || this.model.f_weekcheckicdishu === undefined) {
404
+ this.$showMessage('请检查你录入的液晶示数')
405
+ return
406
+ }
407
+ }
408
+ let postdata = Object.assign({},this.model)
409
+ postdata.week = '1',
410
+ this.model.f_pregas = this.model.f_pregas?this.model.f_pregas:0
411
+ this.model.f_sumgas_moment = this.model.f_sumgas_moment?this.model.f_sumgas_moment:0
412
+ let res = this.$androidUtil.bzLogic('gasComputation', postdata,{rejectMsg: null, resolve: null})
413
+ this.model.f_hasnotcharge = parseInt(res.hasnotCharge)
414
+ this.model.f_hascharge = (parseInt(this.model.f_sumgas_moment)+ parseInt(this.model.f_nogasvalue) - parseInt(this.model.f_hasnotcharge))
415
+ console.log('本期已充'+this.model.f_hascharge)
416
+ this.model.f_weekcheckicnum= this.model.f_weekcheckicnum?this.model.f_weekcheckicnum:0
417
+ this.model.f_weekicsnapsgas = (parseInt(this.model.f_weekcheckicnum)+ parseInt(this.model.f_hascharge)+parseInt(this.model.f_card_repair)- parseInt(this.model.f_weekcheckicdishu))
418
+ console.log('IC走气'+this.model.f_icsnapsgas)
419
+ this.model.f_result_state = res.f_result_state
420
+ console.log('抄表状态'+this.model.f_result_state)
421
+ this.model.f_datacomparison = (parseInt(this.model.f_icsnapsgas)-parseInt(this.model.f_tablesnapsgas))
422
+ this.model.f_curbalance = parseInt(this.model.f_new_lcd * this.model.f_price)
423
+ console.log('剩余金额'+this.model.f_curbalance)
424
+
425
+ // let res = this.$androidUtil.bzLogic('gasComputation', this.model, {rejectMsg: null, resolve: null})
426
+
427
+ },
428
+ //获取基表走气量
429
+ getWeekMeterMessage(){
430
+ // if(this.model.f_weekcheck&&this.model.f_weekcheck ==='1'&& this.model.f_weekcheckdishu){
431
+ // this.model.f_weekcheckdishu = this.model.f_new_tablebase
432
+ // }
433
+ if (this.model.f_weekcheckdishu === '' || this.model.f_weekcheckdishu === undefined) {
434
+ this.$showMessage('请检查你录入的表底数')
435
+ return
436
+ }
437
+ if (parseInt(this.model.f_weekcheckdishu) - parseInt(this.model.f_weekchecknum) < 0) {
438
+ this.$showMessage('录入本期表底数不能小于上期表底数!')
439
+ return
440
+ }
441
+ this.model.f_meter_repair= this.model.f_meter_repair?this.model.f_meter_repair:0
442
+ this.model.f_weekchecknum= this.model.f_weekchecknum?this.model.f_weekchecknum:0
443
+ // this.$set(this.model.f_tablesnapsgas,'')
444
+ this.model.f_weektablesnapsgas = parseInt(this.model.f_weekcheckdishu)- parseInt(this.model.f_weekchecknum)-parseInt(this.model.f_meter_repair)
445
+ if (this.model.f_weekcheckicdishu && this.model.f_card_id ) {
446
+ this.getWeekCardMessage()
447
+ }
448
+ },
449
+ //获取基表走气量
450
+ getMeterMessage(){
451
+ // if(this.model.f_weekcheck&&this.model.f_weekcheck ==='1'&& this.model.f_weekcheckdishu){
452
+ // this.model.f_new_tablebase = this.model.f_weekcheckdishu
453
+ // }
454
+ if (this.model.f_new_tablebase === '' || this.model.f_new_tablebase === undefined) {
455
+ this.$showMessage('请检查你录入的表底数')
456
+ return
457
+ }
458
+ if (parseInt(this.model.f_new_tablebase) - parseInt(this.model.f_last_tablebase) < 0) {
459
+ this.$showMessage('录入本期表底数不能小于上期表底数!')
460
+ return
461
+ }
462
+ this.model.f_meter_repair= this.model.f_meter_repair?this.model.f_meter_repair:0
463
+ this.model.f_last_tablebase= this.model.f_last_tablebase?this.model.f_last_tablebase:0
464
+ // this.$set(this.model.f_tablesnapsgas,'')
465
+ this.model.f_tablesnapsgas = parseInt(this.model.f_new_tablebase)- parseInt(this.model.f_last_tablebase)-parseInt(this.model.f_meter_repair)
466
+ if (this.model.f_new_lcd ) {
467
+ this.getCardMessage()
468
+ }
469
+ },
470
+ // getWeekMeterMessage(){
471
+ // if (this.model.f_weekcheckdishu === '' || this.model.f_weekcheckdishu === undefined) {
472
+ // this.$showMessage('请检查你录入的表底数')
473
+ // return
474
+ // }
475
+ // if (parseInt(this.model.f_weekcheckdishu) - parseInt(this.model.f_last_tablebase) < 0) {
476
+ // this.$showMessage('录入本期表底数不能小于上期表底数!')
477
+ // return
478
+ // }
479
+ // this.model.f_new_tablebase = parseInt(this.model.f_weekcheckdishu)
480
+ // this.model.f_meter_repair= this.model.f_meter_repair?this.model.f_meter_repair:0
481
+ // this.model.f_last_tablebase= this.model.f_last_tablebase?this.model.f_last_tablebase:0
482
+ // // this.$set(this.model.f_tablesnapsgas,'')
483
+ // this.model.f_tablesnapsgas = parseInt(this.model.f_weekcheckdishu)- parseInt(this.model.f_last_tablebase)-parseInt(this.model.f_meter_repair)
484
+ // },
485
+
486
+ commit () {
487
+
488
+
489
+ if(this.model.f_weekcheck==='1'||this.model.f_weekcheck==='true'||this.model.f_weekcheck==='是'){
490
+ if (this.f_weektablesnapsgas < 0 && this.model.f_if_change!=='是') {
491
+ this.$showMessage('录入本期表底数不能小于上期表底数!请核对抄表数据')
492
+ return
493
+ }
494
+
495
+ // if (parseInt(this.model.f_weekcheckdishu) - parseInt(this.model.f_weekchecknum) < 0) {
496
+ // this.$showMessage('录入本期表底数不能小于上期表底数!')
497
+ // return
498
+ // }
499
+ }else{
500
+ if (this.model.f_new_tablebase === '' || this.model.f_new_tablebase === undefined) {
501
+ this.$showMessage('请检查你录入的表底数')
502
+ return
503
+ }
504
+ if ((parseInt(this.model.f_new_tablebase) - parseInt(this.model.f_last_tablebase) < 0) && this.model.f_if_change!=='是') {
505
+ this.$showMessage('录入本期表底数不能小于上期表底数!')
506
+ return
507
+ }
508
+ }
509
+ // if(this.model.f_result_state==='异常'&&){
510
+ // this.$showMessage(`抄表异常,请核对抄表数据`)
511
+ // return
512
+ // }
513
+
514
+ // if (!(this.model.imgName && this.model.imgName.length > 0)) {
515
+ // this.$showMessage('请录入抄表照片!')
516
+ // return
517
+ // }
518
+ if (!this.flag) {
519
+ this.$showMessage(`系统正在进行抄表,请勿重复操作!`)
520
+ // this.$showAlert('系统正在进行抄表,请勿重复操作!', 'warning', 2000)
521
+ return
522
+ }
523
+ if(this.model.lastImgName){
524
+ this.model.lastImgName = `.${this.model.f_user_name}${this.model.imgName.substring(this.model.imgName.indexOf('.'))}`
525
+ }
526
+ // 设置抄表按钮不可用
527
+ // this.flag = false
528
+ // 将用户编号放入抄表照片名中
529
+ console.log(this.model.lastImgName)
530
+ this.model.f_oughtamount = parseInt(this.model.f_new_tablebase) - parseInt(this.model.f_last_tablebase)
531
+ this.model.f_end_time = this.data.f_end_time
532
+ this.model.f_user_id = parseInt(this.model.f_user_id)
533
+ this.model.f_new_tablebase = parseInt(this.model.f_new_tablebase)
534
+ this.model.f_new_lcd = parseInt(this.model.f_new_lcd)
535
+ if( this.model.f_weekcheck==='1'||this.model.f_weekcheck==='true'||this.model.f_weekcheck==='是'){
536
+ this.model.f_new_tablebase =this.model.f_new_tablebase?this.model.f_new_tablebase: parseInt(this.model.f_last_tablebase)
537
+ }
538
+ let res = this.$androidUtil.bzLogic('phone-readmeter', this.model, {rejectMsg: null, resolve: null})
539
+ console.log('上传返回结果'+ res)
540
+ console.log('上传返回结果'+JSON.stringify(res))
541
+ if (res.code === 200) {
542
+ console.log('抄表完成!')
543
+ // 抄表完成设置按钮可用
544
+ this.flag = false
545
+ this.$showMessage('抄表成功!')
546
+ // this.$showAlert('抄表成功!', 'success', 2000)
547
+ // 发送抄表成功事件给父页面
548
+ // this.$dispatch('hand-success', this.type)
549
+ }else{
550
+ console.log('抄表失败')
551
+ // 抄表完成设置按钮可用
552
+ this.flag = true
553
+ // this.$showMessage(`${res.backData.msg}!请前往表单上传重新提交`)
554
+ // this.$showAlert(`${res.backData.msg}!请前往表单上传重新提交`, 'danger', 2000)
555
+ }
556
+ },
557
+ //将数据存入本地数据库,下次进入页面回写数据
558
+ torepair(val){
559
+ this.$showMessage('是否确定申请生成维修单', ['confirm', 'cancel']).then((res) => {
560
+ if (res === 'confirm') {
561
+ let re = repairGen(this,val)
562
+ co(re)
563
+ }
564
+ })
565
+ },
566
+ save(){
567
+ if (!this.flag) {
568
+ this.$showMessage(`该抄表单已上传成功,请勿重复保存!`)
569
+ return
570
+ }
571
+ if(this.model.f_weekcheck==='1'||this.model.f_weekcheck==='true'||this.model.f_weekcheck==='是'){
572
+ if (this.f_weektablesnapsgas < 0 && this.model.f_if_change!=='是') {
573
+ this.$showMessage('录入本期表底数不能小于上期表底数!请核对抄表数据')
574
+ return
575
+ }
576
+
577
+ // if (parseInt(this.model.f_weekcheckdishu) - parseInt(this.model.f_weekchecknum) < 0) {
578
+ // this.$showMessage('录入本期表底数不能小于上期表底数!')
579
+ // return
580
+ // }
581
+ }else{
582
+ if (this.model.f_new_tablebase === '' || this.model.f_new_tablebase === undefined) {
583
+ this.$showMessage('请检查你录入的表底数')
584
+ return
585
+ }
586
+ if (this.model.f_tablesnapsgas<0 && this.model.f_if_change!=='是') {
587
+ this.$showMessage('录入本期表底数不能小于上期表底数!')
588
+ return
589
+ }
590
+ }
591
+ this.model.f_new_tablebase = parseInt(this.model.f_new_tablebase)
592
+ this.model.f_new_lcd = parseInt(this.model.f_new_lcd)
593
+ // this.$dispatch('updatemeter')
594
+ this.model.f_end_time = this.data.f_end_time
595
+ let res = this.$androidUtil.bzLogic('local-save',this.model,{rejectMsg: null, resolve: null})
596
+ console.log('保存到本地'+ JSON.stringify(res))
597
+ if(res.status === 200){
598
+ // this.flag= false
599
+ this.$showMessage('本地数据保存成功!')
600
+ // this.$showAlert('本地数据保存成功!', 'success', 2000)
601
+ }
602
+ }
603
+ }
604
+ }
605
+ </script>
606
+ <style scoped>
607
+ .mt-5 {
608
+ margin-top: 5px;
609
+ }
610
+ .mt-10 {
611
+ margin-top: 10px;
612
+ }
613
+ .mt-20 {
614
+ margin-top: 20px;
615
+ }
616
+
617
+ .app-row-none-border {
618
+ background-color: white;
619
+ padding: 10px 10px 0 10px;
620
+ }
621
+ .font{
622
+ font: 17px PingFang-SC-Medium;
623
+ color: #666666
624
+ }
625
+ .show-font{
626
+ font: 17px PingFang-SC-Medium;
627
+ color: #333333
628
+ }
629
+ .btn-font{
630
+ font:600 16px PingFang-SC-Bold;
631
+ color: #499EDF;
632
+ }
633
+ .head{
634
+ font-size: 1.25em;
635
+ font-weight: bolder;
636
+ padding: 0.5em;
637
+ }
638
+ .btn-color{
639
+ background-color: #FFFFFF;
640
+ border-radius: 10px ;
641
+ border: 1px solid #499EDF;
642
+ }
643
+ </style>