telephone-clients 3.0.104-5 → 3.0.104-51

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 (51) hide show
  1. package/package.json +3 -3
  2. package/src/components/guoxin/Console.vue +42 -14
  3. package/src/components/guoxin/call.state.api.js +3 -1
  4. package/src/components/pc/RecordListLeft.vue +39 -10
  5. package/src/components/pc/RepairsWork.vue +30 -3
  6. package/src/components/pc/SiteSend.vue +36 -1
  7. package/src/components/pc/TelLossList.vue +18 -1
  8. package/src/components/pc/WorkList.vue +2 -1
  9. package/src/components/pc/WorkListAllNew.vue +16 -8
  10. package/src/components/sendsingle/onlinequeryuser.vue +1 -1
  11. package/src/components/telreport/TrafficClassificationReport.vue +10 -9
  12. package/src/components/temp/HandplanInfo.vue +5 -1
  13. package/src/components/temp/InstructInfo.vue +1 -1
  14. package/src/components/workorder/RepairPaperAndroid.vue +351 -0
  15. package/src/components/workorder/ServiceOnlineQuery.vue +306 -0
  16. package/src/filiale/hanzhong/telephone.js +1 -1
  17. package/src/filiale/jiaocheng/android/createQRcode.vue +204 -0
  18. package/src/filiale/jiaocheng/android/onlineBuyGas.vue +637 -0
  19. package/src/filiale/jiaocheng/telephone.js +8 -0
  20. package/src/filiale/jiaocheng/telephoneAndroid.js +15 -0
  21. package/src/filiale/qianneng/android/AppInstallationMaterial.vue +878 -845
  22. package/src/filiale/rizhao/pc/WorkListAllNew.vue +9 -5
  23. package/src/filiale/rizhao/telephone.js +1 -1
  24. package/src/filiale/shanxian/pc/TelFindUser.vue +310 -0
  25. package/src/filiale/shanxian/pc/WorkList.vue +2 -2
  26. package/src/filiale/shanxian/telephone.js +1 -0
  27. package/src/filiale/shexian/android/AddMyTask.vue +7 -0
  28. package/src/filiale/shexian/android/RepairFirstV.vue +5 -0
  29. package/src/filiale/shexian/android/RepairInfo.vue +1 -0
  30. package/src/filiale/shexian/pc/TelAgentVoiceReport.vue +9 -9
  31. package/src/filiale/shexian/pc/WorkList.vue +4 -1
  32. package/src/filiale/shexian/pc/WorkListAllNew.vue +14 -1
  33. package/src/filiale/tongchuan/android/RepairDetails.vue +623 -0
  34. package/src/filiale/tongchuan/pc/AnalysisMain.vue +7 -7
  35. package/src/filiale/tongchuan/telephoneAndroid.js +1 -0
  36. package/src/filiale/wenxi/android/FaultAll.vue +710 -0
  37. package/src/filiale/wenxi/android/RepairOrderV.vue +1 -1
  38. package/src/filiale/wenxi/android/ZHihuanFirst.vue +3 -0
  39. package/src/filiale/wenxi/pc/DistributeWork.vue +1 -1
  40. package/src/filiale/wenxi/pc/RepairsWork.vue +143 -64
  41. package/src/filiale/wenxi/pc/TelAgentVoiceReport.vue +290 -0
  42. package/src/filiale/wenxi/pc/WorkListAll.vue +1 -1
  43. package/src/filiale/wenxi/telephone.js +2 -0
  44. package/src/filiale/wenxi/telephoneAndroid.js +2 -1
  45. package/src/filiale/wuhai/telephone.js +1 -1
  46. package/src/filiale/yuncheng/pc/TelFindUser.vue +14 -1
  47. package/src/filiale/yuncheng/pc/WorkList.vue +823 -0
  48. package/src/filiale/yuncheng/pc/WorkListAllNew.vue +722 -0
  49. package/src/filiale/yuncheng/telephone.js +3 -1
  50. package/src/telephone-android.js +6 -0
  51. package/src/telephone.js +1 -1
@@ -3,11 +3,11 @@
3
3
  <div>
4
4
  <div style="height: auto;width: 100%;margin: 30px 0" v-if="showQrCode">
5
5
  <div partial>
6
- <div class="" align="center">
6
+ <div class="" align="center">
7
7
  <div style="margin-bottom:10px "><img src="../../../assets/scanCode.png">请扫描下方二维码进行付款</div>
8
8
  <div class="row app-row">
9
9
  <div class="col-xs-12">
10
- <label class="font text-left">订单编号:{{order.body.tradeNo}}</label>
10
+ <label class="font text-left">订单编号:{{ order.body.tradeNo }}</label>
11
11
  </div>
12
12
  <!-- <div class="col-xs-8">
13
13
  <input type="text" class ="search_input input-font" v-model="order.body.tradeNo" />
@@ -23,9 +23,9 @@
23
23
  </div>-->
24
24
  <!--<div @click="callBack('支付成功')">返回</div>-->
25
25
  </div>
26
- <div class="" align="center" >
26
+ <div class="" align="center">
27
27
  <div class="QR-code" v-if="payType=='二维码支付'">
28
- <img src="../../../assets/qrcode_no.png" v-show="isTimeout" style="width: 266px;height: 266px" />
28
+ <img src="../../../assets/qrcode_no.png" v-show="isTimeout" style="width: 266px;height: 266px"/>
29
29
  <div id="qrcode" style="margin-top: 25px;width: 266px;height: 266px"></div>
30
30
  </div>
31
31
  </div>
@@ -34,8 +34,9 @@
34
34
  <div v-show="!showQrCode">
35
35
  <material-one v-for="(i, item) in material " :index="$index" :item="item"
36
36
  :materialnameandcode="materialnameandcode"
37
- :newmaterialnameandcode = "newmaterialnameandcode"
38
- :typenumbers="materialtypenumber" @number_chenge="getChangePayNumber" @delete_material="delete_material"></material-one>
37
+ :newmaterialnameandcode="newmaterialnameandcode"
38
+ :typenumbers="materialtypenumber" @number_chenge="getChangePayNumber"
39
+ @delete_material="delete_material"></material-one>
39
40
  <div style="padding: 10px;display: flex;justify-content: space-around;">
40
41
  <button type="button" class="btn btn-primary" @click="addUserFile">添加</button>
41
42
  </div>
@@ -102,7 +103,9 @@
102
103
  </div>-->
103
104
  </div>
104
105
  <div style="padding: 10px;display: flex;justify-content: space-around;">
105
- <button type="button" name="button" class="btn btn-primary btn-sm" style="float: right;margin-right:10px;" @click="beforeSaveCharge()">保存</button>
106
+ <button type="button" name="button" class="btn btn-primary btn-sm" style="float: right;margin-right:10px;"
107
+ @click="beforeSaveCharge()">保存
108
+ </button>
106
109
  <button type="button" class="btn btn-primary" @click="cancel">取消</button>
107
110
  </div>
108
111
  </div>
@@ -110,547 +113,856 @@
110
113
  </template>
111
114
 
112
115
  <script>
113
- import Vue from 'vue'
114
- import {HttpResetClass} from 'vue-client'
115
- import QRCode from 'qrcodejs2'
116
- import {isEmpty} from '../../../components/Util'
117
- export default {
118
- title: '材料添加',
119
- props: {
120
- selectdata: {
121
- type: Object
122
- }
123
- },
124
- data() {
125
- return {
126
- materialname:[],
127
- materialTYPE:[],
128
- materialnameandcode:[],
129
- newmaterialnameandcode:[],
130
- materialtypenumber:[],
131
- category: {},
132
- //支付方式
133
- payType: '',
134
- //支付总额
135
- payNumber: 0,
136
- newPayNumber: 0,
137
- //支付方式选择框
138
- payTypes: [{label: '现金', value: '现金'}, {label: '二维码支付', value: '二维码支付'}],
139
- materialImges: [],
140
- showFile: false,
141
- material: [],
142
- positions: this.$appdata.getParam('品名及规格'), // 获取材料名称
143
- charge: {
144
- payment_terms: [{f_payment_term: '', f_charge_money: '', f_amount_words: '', f_payment_method: ''}]
145
- }, // 收费内容
146
- showCharge: false, // 收费显示
147
- timeLeft: 300, // 收费时间
148
- title1: '', // 二维码标题
149
- showQrCode: false, // 二维码显示
150
- order: {}, // 订单信息
151
- f_cost_sum: 0, // 总收费
152
- othercharge_id:'',
153
- button_state:false,
154
- summarize:[]//材料收费方式汇总
155
- }
156
- },
157
- ready() {
116
+ import Vue from 'vue'
117
+ import {HttpResetClass} from 'vue-client'
118
+ import QRCode from 'qrcodejs2'
119
+ import {isEmpty} from '../../../components/Util'
158
120
 
159
- //this.search()
160
- this.getAllMaterial()
161
- // this.getmaterial()
162
- // this.getmaterialTYPE()
163
-
164
- },
165
- methods: {
166
- delete_material(i){
167
- console.log('删除项====', i)
168
- this.material.splice(i, 1)
169
- this.getChangePayNumber()
121
+ export default {
122
+ title: '材料添加',
123
+ props: {
124
+ selectdata: {
125
+ type: Object
126
+ }
170
127
  },
171
- async beforeSaveCharge(){
172
- console.log("977666")
173
- if( this.material.length==0){
174
- return this.$showMessage(`请先添加消耗的材料!`)
128
+ data() {
129
+ return {
130
+ materialname: [],
131
+ materialTYPE: [],
132
+ materialnameandcode: [],
133
+ newmaterialnameandcode: [],
134
+ materialtypenumber: [],
135
+ category: {},
136
+ //支付方式
137
+ payType: '',
138
+ //支付总额
139
+ payNumber: 0,
140
+ newPayNumber: 0,
141
+ //支付方式选择框
142
+ payTypes: [{label: '现金', value: '现金'}, {label: '二维码支付', value: '二维码支付'}],
143
+ materialImges: [],
144
+ showFile: false,
145
+ material: [],
146
+ positions: this.$appdata.getParam('品名及规格'), // 获取材料名称
147
+ charge: {
148
+ payment_terms: [{f_payment_term: '', f_charge_money: '', f_amount_words: '', f_payment_method: ''}]
149
+ }, // 收费内容
150
+ showCharge: false, // 收费显示
151
+ timeLeft: 300, // 收费时间
152
+ title1: '', // 二维码标题
153
+ showQrCode: false, // 二维码显示
154
+ order: {}, // 订单信息
155
+ f_cost_sum: 0, // 总收费
156
+ othercharge_id: '',
157
+ button_state: false,
158
+ summarize: []//材料收费方式汇总
175
159
  }
176
- for (let index = 0; index < this.material.length; index++) {
177
- const item = this.material[index]
178
- if(!item.f_material_name){
179
- this.$showMessage(`请选择材料${index+1}的材料名称`)
180
- return;
160
+ },
161
+ ready() {
162
+
163
+ //this.search()
164
+ this.getAllMaterial()
165
+ // this.getmaterial()
166
+ // this.getmaterialTYPE()
167
+
168
+ },
169
+ methods: {
170
+ delete_material(i) {
171
+ console.log('删除项====', i)
172
+ this.material.splice(i, 1)
173
+ this.getChangePayNumber()
174
+ },
175
+ async beforeSaveCharge() {
176
+ console.log("977666")
177
+ if (this.material.length == 0) {
178
+ return this.$showMessage(`请先添加消耗的材料!`)
181
179
  }
182
- if(!item.f_typenumber){
183
- this.$showMessage(`请选择材料${index+1}的型号`)
184
- return;
180
+ for (let index = 0; index < this.material.length; index++) {
181
+ const item = this.material[index]
182
+ if (!item.f_material_name) {
183
+ this.$showMessage(`请选择材料${index + 1}的材料名称`)
184
+ return;
185
+ }
186
+ if (!item.f_typenumber) {
187
+ this.$showMessage(`请选择材料${index + 1}的型号`)
188
+ return;
189
+ }
190
+ if (!item.f_material_price) {
191
+ this.$showMessage(`请填写材料${index + 1}的单价`)
192
+ return;
193
+ }
194
+ if (!item.f_material_number || item.f_material_number == 0) {
195
+ this.$showMessage(`请填写材料${index + 1}的数量`)
196
+ return;
197
+ }
185
198
  }
186
- if(!item.f_material_price){
187
- this.$showMessage(`请填写材料${index+1}的单价`)
199
+ /*if(this.materialImges.length===0){
200
+ this.$showMessage(`至少有一张材料照片`)
188
201
  return;
189
- }
190
- if(!item.f_material_number || item.f_material_number==0){
191
- this.$showMessage(`请填写材料${index+1}的数量`)
202
+ }*/
203
+ if (!this.payType) {
204
+ this.$showMessage(`请选择缴费方式`)
192
205
  return;
193
206
  }
194
- }
195
- /*if(this.materialImges.length===0){
196
- this.$showMessage(`至少有一张材料照片`)
197
- return;
198
- }*/
199
- if(!this.payType){
200
- this.$showMessage(`请选择缴费方式`)
201
- return;
202
- }
203
- this.button_state=true
204
- try {
205
- if(this.payType.indexOf('现金')!=-1){
206
- await this.saveUserFile('save')
207
- }else{
208
- await this.openQrCode()
207
+ this.button_state = true
208
+ try {
209
+ if (this.payType.indexOf('现金') != -1) {
210
+ await this.saveUserFile('save')
211
+ } else {
212
+ await this.openQrCode()
213
+ }
214
+ this.button_state = false
215
+ } catch (e) {
216
+ this.$showMessage(`材料收费失败!请检查网络`)
217
+ this.button_state = false
209
218
  }
210
- this.button_state=false
211
- }catch (e) {
212
- this.$showMessage(`材料收费失败!请检查网络`)
213
- this.button_state=false
214
- }
215
- },
216
- cancel(){
217
- this.$emit('aftersave')
218
- },
219
- getAllMaterial(){
220
- new HttpResetClass().load('POST',this.$androidUtil.getProxyUrl() +`/rs/sql/tel_singleTable_OrderBy?pageNo=1&pageSize=99999`, {data: {
221
- items: '*',
222
- tablename: 't_material_info',
223
- condition: `org_id = '${Vue.user.orgid}'`,
224
- orderitem: 'id desc'
225
- }},{resolveMsg:null,rejectMsg:null}).then(res=>{
226
- const typeNames= res.data.filter((item)=>item.type === '分类')
227
- const materialNames = res.data.filter((item)=>item.type === '品名')
228
- const materialNumbers = res.data.filter((item)=>item.type === '型号')
229
- console.log(typeNames,materialNames,materialNumbers)
230
- const newMaterialNames = materialNames.map((item)=>{
231
- const typeName = typeNames.filter((res)=>{
232
- return res.id==item.parent_id
219
+ },
220
+ cancel() {
221
+ this.$emit('aftersave')
222
+ },
223
+ getAllMaterial() {
224
+ new HttpResetClass().load('POST', this.$androidUtil.getProxyUrl() + `/rs/sql/tel_singleTable_OrderBy?pageNo=1&pageSize=99999`, {
225
+ data: {
226
+ items: '*',
227
+ tablename: 't_material_info',
228
+ condition: `org_id = '${Vue.user.orgid}'`,
229
+ orderitem: 'id desc'
230
+ }
231
+ }, {resolveMsg: null, rejectMsg: null}).then(res => {
232
+ const typeNames = res.data.filter((item) => item.type === '分类')
233
+ const materialNames = res.data.filter((item) => item.type === '品名')
234
+ const materialNumbers = res.data.filter((item) => item.type === '型号')
235
+ console.log(typeNames, materialNames, materialNumbers)
236
+ const newMaterialNames = materialNames.map((item) => {
237
+ const typeName = typeNames.filter((res) => {
238
+ return res.id == item.parent_id
239
+ })
240
+ return {
241
+ id: item.id,
242
+ typeName: typeName[0],
243
+ materialName: item
244
+ }
233
245
  })
234
- return {
235
- id:item.id,
236
- typeName:typeName[0],
237
- materialName:item
246
+ console.log("988", newMaterialNames)
247
+ this.materialtypenumber = this.sortArrayByCodeAscending(materialNumbers)
248
+ const aMaterialnameandcode = []
249
+ for (const item of this.materialtypenumber) {
250
+ const newMaterialName = newMaterialNames.filter((res) => {
251
+ return res.id == item.parent_id
252
+ })
253
+ if (newMaterialName && newMaterialName.length > 0) {
254
+ aMaterialnameandcode.push({
255
+ label: `[${item.code}]${newMaterialName[0]['materialName']['name']}`,
256
+ value: {
257
+ typeName: newMaterialName[0]['typeName'],
258
+ materialName: newMaterialName[0]['materialName'],
259
+ materialNumber: item
260
+ }
261
+ })
262
+ }
238
263
  }
239
- })
240
- console.log("988",newMaterialNames)
241
- this.materialtypenumber = this.sortArrayByCodeAscending(materialNumbers)
242
- const aMaterialnameandcode = []
243
- for (const item of this.materialtypenumber) {
244
- const newMaterialName = newMaterialNames.filter((res)=>{
245
- return res.id == item.parent_id
264
+ this.materialnameandcode = aMaterialnameandcode
265
+ console.log('this.newmaterialnameandcode=', JSON.stringify(this.newmaterialnameandcode))
266
+ this.newmaterialnameandcode = this.materialnameandcode.map((item) => {
267
+ return {
268
+ label: item.label,
269
+ value: item.label
270
+ }
246
271
  })
247
- if (newMaterialName && newMaterialName.length > 0){
248
- aMaterialnameandcode.push({
249
- label:`[${item.code}]${newMaterialName[0]['materialName']['name']}`,
250
- value:{
251
- typeName:newMaterialName[0]['typeName'],
252
- materialName:newMaterialName[0]['materialName'],
253
- materialNumber:item
254
- }
272
+ }).catch((e) => {
273
+ console.log("933", e)
274
+ })
275
+ },
276
+ sortArrayByCodeAscending(dataArray) {
277
+ // Convert the "code" property to a number for sorting
278
+ dataArray.forEach(item => {
279
+ item.newCode = parseFloat(item.code);
280
+ });
281
+
282
+ // Sort the array based on the "code" property
283
+ dataArray.sort((a, b) => a.newCode - b.newCode);
284
+
285
+ return dataArray;
286
+ },
287
+ getChangePayNumber() {
288
+ this.payNumber = 0
289
+ this.summarize = []
290
+ for (let i = 0; i < this.material.length; i++) {
291
+ this.material[i].f_fee = this.material[i].f_material_price * this.material[i].f_material_number
292
+ this.payNumber += Number(this.material[i].f_fee)
293
+ // let res=this.checkSummarize(this.material[i].material_type)
294
+ /* if(res.has){
295
+ this.summarize[res.idx].amount+= 1
296
+ this.summarize[res.idx].money+= Number(this.material[i].f_fee)
297
+ }else{
298
+ this.summarize.push({material_type:this.material[i].material_type,amount:1,money:this.material[i].f_fee})
299
+ } */
300
+ }
301
+ console.log('this.summarize------------', this.summarize)
302
+ },
303
+ checkSummarize(name) {
304
+ let result = {idx: null, has: false}
305
+ this.summarize.forEach((item, idx) => {
306
+ if (item.material_type == name) {
307
+ result.idx = idx
308
+ result.has = true
309
+ }
310
+ })
311
+ console.log('result', result)
312
+ return result
313
+ },
314
+ getsutitle(val) {
315
+ return val
316
+ },
317
+ loadOptions(index) {
318
+ // const data = {
319
+ // tablename: 't_material_info',
320
+ // condition: "1 = 1 and code = '" + this.material[index].f_material_code + "'"
321
+ // }
322
+ // this.$resetpost(this.$androidUtil.getProxyUrl() + '/rs/sql/tel_singleTable', {data}, {
323
+ // resolveMsg: null,
324
+ // rejectMsg: '获取数据失败'
325
+ // }).then((res) => {
326
+ // for (let material of res.data) {
327
+ // switch (material.type) {
328
+ // case '分类' :
329
+ // this.$set('material[' + index + '].f_typename', material.name)
330
+ // break
331
+ // case '品名' :
332
+ // this.$set('material[' + index + '].f_material_name', material.name)
333
+ // break
334
+ // case '型号' :
335
+ // this.$set('material[' + index + '].f_typenumber', material.name)
336
+ // this.$set('material[' + index + '].unit', material.unit)
337
+ // this.$set('material[' + index + '].f_material_price', material.price)
338
+ // break
339
+ // }
340
+ // }
341
+ // this.$set('material', JSON.parse(JSON.stringify(this.material)))
342
+ // })
343
+ const data = {
344
+ code: this.material[index].f_material_code
345
+ }
346
+ this.$resetpost(this.$androidUtil.getProxyUrl() + '/rs/sql/getMaterialByCode', {data}, {
347
+ resolveMsg: null,
348
+ rejectMsg: '获取数据失败'
349
+ }).then((res) => {
350
+ for (let material of res.data) {
351
+ this.$set('material[' + index + '].f_typename', material.f_typename)
352
+ this.$set('material[' + index + '].f_material_name', material.f_material_name)
353
+ this.$set('material[' + index + '].f_typenumber', material.f_typenumber)
354
+ this.$set('material[' + index + '].unit', material.unit)
355
+ this.$set('material[' + index + '].f_material_price', material.f_material_price)
356
+ }
357
+ this.$set('material', JSON.parse(JSON.stringify(this.material)))
358
+ })
359
+
360
+ },
361
+ // 删除未保存的材料信息
362
+ async deleteUserFile(index) {
363
+ this.material.splice(index, 1)
364
+ },
365
+ // 追加材料信息
366
+ addUserFile() {
367
+ this.material.push({
368
+ f_material_name: "",
369
+ unit: "",
370
+ f_material_price: "",
371
+ f_typenumber: "",
372
+ f_typename: "",
373
+ material_type: ""
374
+ })
375
+ },
376
+ getmaterialTYPE() {
377
+ let http = new HttpResetClass()
378
+ let data = {
379
+ tablename: 't_material_service',
380
+ condition: `1=1`
381
+ }
382
+ http.load('post', this.$androidUtil.getProxyUrl() + '/rs/sql/tel_singleTable', {data: data}, {
383
+ resolveMsg: null,
384
+ rejectMsg: '获取数据失败'
385
+ }).then(res => {
386
+ console.log("XXX", res.data.length)
387
+ for (let i = 0; i < res.data.length; i++) {
388
+
389
+ this.materialTYPE.push({
390
+ label: res.data[i].f_typenumber,
391
+ value: res.data[i].f_typenumber
255
392
  })
256
393
  }
394
+ if (this.materialTYPE.length <= 0) {
395
+ this.materialTYPE = [{}]
396
+ }
397
+ this.materialtypenumber = Array.from(new Set(this.materialTYPE.map(item => item.label)))
398
+ .map(label => {
399
+ return this.materialTYPE.find(item => item.label === label);
400
+ })
401
+ console.log("XXX", this.materialtypenumber)
402
+ })
403
+ return this.materialtypenumber
404
+ },
405
+ getmaterial() {
406
+ let http = new HttpResetClass()
407
+ let data = {
408
+ tablename: 't_material_service',
409
+ condition: `1=1`
257
410
  }
258
- this.materialnameandcode = aMaterialnameandcode
259
- console.log('this.newmaterialnameandcode=', JSON.stringify(this.newmaterialnameandcode))
260
- this.newmaterialnameandcode = this.materialnameandcode.map((item)=>{
261
- return {
262
- label:item.label,
263
- value:item.label
411
+ http.load('post', this.$androidUtil.getProxyUrl() + '/rs/sql/tel_singleTable', {data: data}, {
412
+ resolveMsg: null,
413
+ rejectMsg: '获取数据失败'
414
+ }).then(res => {
415
+ console.log("XXX", res.data.length)
416
+ for (var i = 0; i < res.data.length; i++) {
417
+
418
+ this.materialname.push({
419
+ label: '[' + res.data[i].f_material_code + ']' + res.data[i].f_material_name,
420
+ value: res.data[i].f_material_name
421
+ }
422
+ )
423
+ }
424
+ if (this.materialname.length <= 0) {
425
+ this.materialname = [{}]
426
+ }
427
+ this.materialnameandcode = Array.from(new Set(this.materialname.map(item => item.label)))
428
+ .map(label => {
429
+ return this.materialname.find(item => item.label === label);
430
+ })
431
+ this.materialname = this.materialname.map(item => {
432
+ item.label = item.label.replace(/null/g, "空")
433
+ return item;
434
+ });
435
+ console.log("XXX", this.materialnameandcode)
436
+ })
437
+ return this.materialnameandcode
438
+ },
439
+ search() {
440
+ let http = new HttpResetClass()
441
+ let data = {
442
+ tablename: 't_material_service',
443
+ condition: `f_process_id = '${this.selectdata.f_process_id}'`
444
+ }
445
+ http.load('post', this.$androidUtil.getProxyUrl() + '/rs/sql/tel_singleTable', {data: data}, {
446
+ resolveMsg: null,
447
+ rejectMsg: '获取数据失败'
448
+ }).then(res => {
449
+ this.material = res.data
450
+ if (this.material.length <= 0) {
451
+ this.addUserFile()
452
+ } else {
453
+ this.getAllMaterialImg()
454
+ this.getChangePayNumber()
264
455
  }
265
456
  })
266
- }).catch((e)=>{
267
- console.log("933",e)
268
- })
269
- },
270
- sortArrayByCodeAscending(dataArray) {
271
- // Convert the "code" property to a number for sorting
272
- dataArray.forEach(item => {
273
- item.newCode = parseFloat(item.code);
274
- });
275
457
 
276
- // Sort the array based on the "code" property
277
- dataArray.sort((a, b) => a.newCode - b.newCode);
278
458
 
279
- return dataArray;
280
- },
281
- getChangePayNumber() {
282
- this.payNumber = 0
283
- this.summarize = []
284
- for (let i = 0; i < this.material.length; i++) {
285
- this.material[i].f_fee= this.material[i].f_material_price*this.material[i].f_material_number
286
- this.payNumber += Number(this.material[i].f_fee)
287
- // let res=this.checkSummarize(this.material[i].material_type)
288
- /* if(res.has){
289
- this.summarize[res.idx].amount+= 1
290
- this.summarize[res.idx].money+= Number(this.material[i].f_fee)
291
- }else{
292
- this.summarize.push({material_type:this.material[i].material_type,amount:1,money:this.material[i].f_fee})
293
- } */
294
- }
295
- console.log('this.summarize------------', this.summarize)
296
- },
297
- checkSummarize(name){
298
- let result={idx:null,has:false}
299
- this.summarize.forEach((item,idx)=> {
300
- if(item.material_type==name){
301
- result.idx=idx
302
- result.has=true
459
+ },
460
+ getAllMaterialImg() {
461
+ let http = new HttpResetClass()
462
+ let data = {
463
+ tablename: 't_material_img',
464
+ condition: `f_process_id = '${this.selectdata.f_process_id}'`
303
465
  }
304
- })
305
- console.log('result', result)
306
- return result
307
- },
308
- getsutitle(val) {
309
- return val
310
- },
311
- loadOptions(index) {
312
- // const data = {
313
- // tablename: 't_material_info',
314
- // condition: "1 = 1 and code = '" + this.material[index].f_material_code + "'"
315
- // }
316
- // this.$resetpost(this.$androidUtil.getProxyUrl() + '/rs/sql/tel_singleTable', {data}, {
317
- // resolveMsg: null,
318
- // rejectMsg: '获取数据失败'
319
- // }).then((res) => {
320
- // for (let material of res.data) {
321
- // switch (material.type) {
322
- // case '分类' :
323
- // this.$set('material[' + index + '].f_typename', material.name)
324
- // break
325
- // case '品名' :
326
- // this.$set('material[' + index + '].f_material_name', material.name)
327
- // break
328
- // case '型号' :
329
- // this.$set('material[' + index + '].f_typenumber', material.name)
330
- // this.$set('material[' + index + '].unit', material.unit)
331
- // this.$set('material[' + index + '].f_material_price', material.price)
332
- // break
333
- // }
334
- // }
335
- // this.$set('material', JSON.parse(JSON.stringify(this.material)))
336
- // })
337
- const data = {
338
- code: this.material[index].f_material_code
339
- }
340
- this.$resetpost(this.$androidUtil.getProxyUrl() + '/rs/sql/getMaterialByCode', {data}, {
341
- resolveMsg: null,
342
- rejectMsg: '获取数据失败'
343
- }).then((res) => {
344
- for (let material of res.data) {
345
- this.$set('material[' + index + '].f_typename', material.f_typename)
346
- this.$set('material[' + index + '].f_material_name', material.f_material_name)
347
- this.$set('material[' + index + '].f_typenumber', material.f_typenumber)
348
- this.$set('material[' + index + '].unit', material.unit)
349
- this.$set('material[' + index + '].f_material_price', material.f_material_price)
466
+ http.load('post', this.$androidUtil.getProxyUrl() + '/rs/sql/tel_singleTable', {data: data}, {
467
+ resolveMsg: null,
468
+ rejectMsg: '获取数据失败'
469
+ }).then(result => {
470
+ let tempArr = []
471
+ let tempArrary = []
472
+ result = result.data
473
+ for (let i = 0; i < result.length; i++) {
474
+
475
+ if (!tempArr.includes(result[i].f_path)) {
476
+ let temp = {}
477
+ temp.id = result[i].id
478
+ temp.android_file = result[i].f_path
479
+ temp.imgpath = ''
480
+ temp.path = 'http://newimg/storage/emulated/0/Download/safecheck/' + result[i].f_path
481
+ tempArr.push(result[i].f_path)
482
+ tempArrary.push(temp)
483
+ }
484
+ }
485
+ this.materialImges = tempArrary
486
+ })
487
+ },
488
+ // 获取品名规格
489
+ setTypename(i, val) {
490
+ let ac = this.$appdata.getParam(val)
491
+ this.$set('material[' + i + '].typeNameList', ac)
492
+ this.$set('material[' + i + '].typeNumberList', [])
493
+ this.$set('material[' + i + '].f_typenumber', null)
494
+ this.$set('material[' + i + '].f_material_price', 0)
495
+ },
496
+ // 获取类型
497
+ setTypenumber(i, val) {
498
+ let ac = this.$appdata.getParam(val)
499
+ this.$set('material[' + i + '].typeNumberList', ac)
500
+ this.$set('material[' + i + '].f_material_price', 0)
501
+ },
502
+ // 获取单价
503
+ setmaterialprice(i, val) {
504
+ var num
505
+ if (val == null) {
506
+ num = 0
507
+ }
508
+ num = this.$appdata.getSingleValue(val)
509
+ this.$set('material[' + i + '].f_material_price', num)
510
+ },
511
+ // 金额计算
512
+ smallnum(val, val1) {
513
+ let num = Number(val) * Number(val1)
514
+ return num
515
+ },
516
+ getCheckMessage() {
517
+ let tempArr = this.material
518
+ if (!tempArr.length > 0) {
519
+ return '请选择材料后上传'
350
520
  }
351
- this.$set('material', JSON.parse(JSON.stringify(this.material)))
352
- })
521
+ for (let i = 0; i < tempArr.length; i++) {
522
+ if (tempArr[i].f_process_id) {
523
+ continue
524
+ }
353
525
 
354
- },
355
- // 删除未保存的材料信息
356
- async deleteUserFile(index) {
357
- this.material.splice(index, 1)
358
- },
359
- // 追加材料信息
360
- addUserFile() {
361
- this.material.push({
362
- f_material_name:"",
363
- unit:"",
364
- f_material_price:"",
365
- f_typenumber:"",
366
- f_typename:"",
367
- material_type:""
368
- })
369
- },
370
- getmaterialTYPE(){
371
- let http = new HttpResetClass()
372
- let data = {
373
- tablename: 't_material_service',
374
- condition: `1=1`
375
- }
376
- http.load('post', this.$androidUtil.getProxyUrl() + '/rs/sql/tel_singleTable', {data: data}, {
377
- resolveMsg: null,
378
- rejectMsg: '获取数据失败'
379
- }).then(res => {
380
- console.log("XXX",res.data.length)
381
- for (let i = 0; i < res.data.length; i++){
526
+ if (!tempArr[i].f_material_price) {
527
+ return '请输入材料单价'
528
+ }
529
+ if (!tempArr[i].f_material_number) {
530
+ return '请输入材料数量'
531
+ }
532
+ }
533
+ /* if (this.materialImges.length == 0) {
534
+ return '材料清单需拍照'
535
+ } */
536
+ return null
382
537
 
383
- this.materialTYPE.push({
384
- label: res.data[i].f_typenumber,
385
- value: res.data[i].f_typenumber})
386
- }if (this.materialTYPE.length <= 0) {
387
- this.materialTYPE = [{}]
538
+ },
539
+ /*async saveUserFile1() {
540
+ let message = this.getCheckMessage()
541
+ if (message) {
542
+ this.$showMessage(message)
543
+ return
388
544
  }
389
- this.materialtypenumber = Array.from(new Set(this.materialTYPE.map(item => item.label)))
390
- .map(label => {
391
- return this.materialTYPE.find(item => item.label === label);
392
- })
393
- console.log("XXX",this.materialtypenumber)
394
- })
395
- return this.materialtypenumber
396
- },
397
- getmaterial(){
398
- let http = new HttpResetClass()
399
- let data = {
400
- tablename: 't_material_service',
401
- condition: `1=1`
402
- }
403
- http.load('post', this.$androidUtil.getProxyUrl() + '/rs/sql/tel_singleTable', {data: data}, {
404
- resolveMsg: null,
405
- rejectMsg: '获取数据失败'
406
- }).then(res => {
407
- console.log("XXX",res.data.length)
408
- for (var i = 0; i < res.data.length; i++) {
545
+ let imgs = []
546
+ for (let i = 0; i < this.materialImges.length; i++) {
547
+ let it = {}
548
+ if (this.materialImges[i].id) {
549
+ it = {
550
+ f_path: this.materialImges[i].path,
551
+ id: this.materialImges[i].id,
552
+ f_process_id: this.selectdata.f_process_id
553
+ }
554
+ } else {
555
+ it = {
556
+ f_path: this.materialImges[i].path,
557
+ f_process_id: this.selectdata.f_process_id
558
+ }
559
+ }
560
+ imgs.push(it)
561
+ }
562
+ for (let i = 0; i < this.material.length; i++) {
563
+ this.material[i].f_process_id = this.selectdata.f_process_id
564
+ if (isEmpty(this.material[i].f_state)) {
565
+ this.material[i].f_state = '未收费'
566
+ }
567
+ }
568
+ let data = {
569
+ model: this.material,
570
+ imgs: imgs,
571
+ f_process_id: this.selectdata.f_process_id
572
+ }
573
+ console.log('------------------',data)
574
+ new HttpResetClass().load('POST',this.$androidUtil.getProxyUrl() +`/rs/logic/saveMaterialService`, data,{resolveMsg:null,rejectMsg:null}).then(res=>{
575
+ console.log(res)
576
+ this.model.rows=res.data
577
+ }).catch((e)=>{
578
+ console.log("933",e)
579
+ })
580
+ /!* console.log('------------------',data)
581
+ HostApp.__this__ = this
582
+ HostApp.logicWithHint({
583
+ // logic别名,key必须为logic
584
+ 'logic': 'saveMaterialServiceAndroid',
585
+ // 回调执行方法名,key必须为callback
586
+ 'callback': 'javascript:HostApp.__this__.uploadCallback1()',
587
+ // logic执行需要的业务参数
588
+ 'data': data,
589
+ // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
590
+ // 执行回调方法传入key为backresult
591
+ // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
592
+ 'backresult': 1
593
+ }) *!/
594
+ },*/
595
+ uploadCallback1(result) {
409
596
 
410
- this.materialname.push({
411
- label: '['+res.data[i].f_material_code +']'+res.data[i].f_material_name,
412
- value: res.data[i].f_material_name}
413
- )
414
- }if (this.materialname.length<= 0) {
415
- this.materialname = [{}]
597
+ if (result.state == 'ok' && JSON.parse(result.result).code == 200) {
598
+ this.$showMessage('材料保存成功!!!')
599
+ } else {
600
+ this.$showMessage(JSON.parse(result.result).msg)
416
601
  }
417
- this.materialnameandcode = Array.from(new Set(this.materialname.map(item => item.label)))
418
- .map(label => {
419
- return this.materialname.find(item => item.label === label);
602
+ },
603
+ async saveUserFile(type) {
604
+ for (let i = 0; i < this.material.length; i++) {
605
+ this.material[i].f_process_id = this.selectdata.f_process_id
606
+ this.material[i].f_department = Vue.user.f_department_name
607
+ this.material[i].f_fee = this.material[i].f_material_price * this.material[i].f_material_number
608
+ if (isEmpty(this.material[i].f_state)) {
609
+ this.material[i].f_state = null
610
+ }
611
+ }
612
+ await this.saveOrder(type)
613
+ },
614
+ async saveOrder(type) {
615
+ console.log('this.material', this.material)
616
+ let otherdetail = []
617
+ if (this.payNumber == 0) {
618
+ otherdetail.push({
619
+ f_brand_spec: ['维修'],
620
+ f_typename: ['材料费'],
621
+ f_typenumber: [],
622
+ f_unitprice: 0,
623
+ f_number: this.material.length
420
624
  })
421
- this.materialname = this.materialname.map(item => {
422
- item.label = item.label.replace(/null/g, "空")
423
- return item;
424
- });
425
- console.log("XXX",this.materialnameandcode)
426
- })
427
- return this.materialnameandcode
428
- },
429
- search() {
430
- let http = new HttpResetClass()
431
- let data = {
432
- tablename: 't_material_service',
433
- condition: `f_process_id = '${this.selectdata.f_process_id}'`
434
- }
435
- http.load('post', this.$androidUtil.getProxyUrl() + '/rs/sql/tel_singleTable', {data: data}, {
436
- resolveMsg: null,
437
- rejectMsg: '获取数据失败'
438
- }).then(res => {
439
- this.material = res.data
440
- if (this.material.length <= 0) {
441
- this.addUserFile()
442
625
  } else {
443
- this.getAllMaterialImg()
444
- this.getChangePayNumber()
626
+ this.material.forEach((row) => {
627
+ if (row.f_material_price != 0) {
628
+ otherdetail.push({
629
+ f_brand_spec: ['维修'],
630
+ f_typename: [`${row.material_type ? row.material_type : '材料费'}`],
631
+ f_typenumber: [],
632
+ f_unitprice: row.f_material_price,
633
+ f_number: row.f_material_number
634
+ })
635
+ }
636
+ })
445
637
  }
446
- })
447
638
 
639
+ let param = {
640
+ model: this.material,
641
+ operator_type: type,
642
+ othercharge_id: this.othercharge_id,
643
+ f_process_id: this.selectdata.f_process_id,
644
+ other: {
645
+ "record_userinfo": this.selectdata.model.f_userinfo_id,
646
+ //"f_userfiles_id": '',
647
+ //"f_user_id": '',
648
+ "f_user_name": this.selectdata.model.f_user_name,
649
+ "f_address": this.selectdata.model.f_address,
650
+ "f_user_type": this.selectdata.model.f_user_type,
651
+ "f_gasproperties": "",
652
+ "f_collection": this.payNumber,
653
+ "f_comments": `${Vue.user.name}进行维修材料收费,收费方式-${this.payType} ${this.order.body && this.order.body.tradeNo ? '。支付订单号:' + this.order.body.tradeNo : ''}`,
654
+ "f_payment": this.payType,
655
+ "f_voucher_number": this.selectdata.f_process_id,
656
+ "f_bill_style": "普通收据",
657
+ "f_userinfo_id": this.selectdata.model.f_userinfo_id,
658
+ "f_service_person": Vue.user.name,
659
+ "f_operat_type": "维修收费",
660
+ "f_describe": "",
661
+ "f_serial_id": this.order.body ? this.order.body.tradeNo : null,
662
+ "f_state": type == 'create' ? '无效' : '有效',
663
+ "f_operator": Vue.user.name,
664
+ "f_operatorid": Vue.user.id,
665
+ "f_orgid": Vue.user.orgid,
666
+ "f_orgname": Vue.user.orgs,
667
+ "f_depid": Vue.user.depids,
668
+ "f_depname": Vue.user.f_department_name,
669
+ "t_userfees": "",
670
+ "f_fee_type": "维修费用",
671
+ "f_fee_time": "12",
672
+ "otherdetail": otherdetail
673
+ }
674
+ }
675
+ console.log("要保存了666-------data2", param)
676
+ let res = await new HttpResetClass().load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/saveMaterialService`, param, {
677
+ resolveMsg: null,
678
+ rejectMsg: null
679
+ })
680
+ console.log('res.data', res.data)
681
+ if (res.data.code == 200) {
682
+ if (type === 'create') {
683
+ // this.$showMessage('收费记录创建成功!!!')
684
+ this.othercharge_id = res.data.othercharge_id
685
+ // this.$emit('aftersave')
686
+ } else {
687
+ this.$showMessage('材料保存成功!!!')
688
+ this.$emit('aftersave')
689
+ }
448
690
 
691
+ } else {
692
+ this.$showMessage(res.data.msg)
693
+ }
694
+ },
695
+ uploadCallback(result) {
696
+ if (result.state == 'ok' && JSON.parse(result.result).code == 200) {
697
+ this.$showMessage('材料保存成功!!!')
698
+ } else {
699
+ this.$showMessage(JSON.parse(result.result).msg)
700
+ }
701
+ },
702
+ // 关闭对话框
703
+ closeModal() {
704
+ this.showCharge = false
705
+ this.charge = {
706
+ payment_terms: [{
707
+ f_payment_term: '',
708
+ f_charge_money: '',
709
+ f_amount_words: '',
710
+ f_payment_method: this.charge.f_payment_method
711
+ }]
712
+ }
713
+ },
714
+ // 金额转大写
715
+ handleInput(index) {
716
+ // 通过正则过滤小数点后两位
717
+ console.log('-----------------------')
718
+ this.charge.payment_terms[index].f_charge_money = (this.charge.payment_terms[index].f_charge_money.match(/^\d*(\.?\d{0,2})/g)[0]) || null
719
+ this.charge.payment_terms[index].f_amount_words = this.smalltoBIG(this.charge.payment_terms[index].f_charge_money)
720
+ },
721
+ // 金额转大写
722
+ smalltoBIG(n) {
723
+ let fraction = ['角', '分'];
724
+ let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
725
+ let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
726
+ let head = n < 0 ? '欠' : '';
727
+ n = Math.abs(n);
449
728
 
450
- },
451
- getAllMaterialImg() {
452
- let http = new HttpResetClass()
453
- let data = {
454
- tablename: 't_material_img',
455
- condition: `f_process_id = '${this.selectdata.f_process_id}'`
456
- }
457
- http.load('post', this.$androidUtil.getProxyUrl() + '/rs/sql/tel_singleTable', {data: data}, {
458
- resolveMsg: null,
459
- rejectMsg: '获取数据失败'
460
- }).then(result => {
461
- let tempArr = []
462
- let tempArrary = []
463
- result = result.data
464
- for (let i = 0; i < result.length; i++) {
729
+ let s = '';
465
730
 
466
- if (!tempArr.includes(result[i].f_path)) {
467
- let temp = {}
468
- temp.id = result[i].id
469
- temp.android_file = result[i].f_path
470
- temp.imgpath = ''
471
- temp.path = 'http://newimg/storage/emulated/0/Download/safecheck/' + result[i].f_path
472
- tempArr.push(result[i].f_path)
473
- tempArrary.push(temp)
731
+ for (var i = 0; i < fraction.length; i++) {
732
+ s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
733
+ }
734
+ s = s || '整';
735
+ n = Math.floor(n);
736
+
737
+ for (var i = 0; i < unit[0].length && n > 0; i++) {
738
+ let p = '';
739
+ for (var j = 0; j < unit[1].length && n > 0; j++) {
740
+ p = digit[n % 10] + unit[1][j] + p;
741
+ n = Math.floor(n / 10);
474
742
  }
743
+ s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
475
744
  }
476
- this.materialImges = tempArrary
477
- })
478
- },
479
- // 获取品名规格
480
- setTypename(i, val) {
481
- let ac = this.$appdata.getParam(val)
482
- this.$set('material[' + i + '].typeNameList', ac)
483
- this.$set('material[' + i + '].typeNumberList', [])
484
- this.$set('material[' + i + '].f_typenumber', null)
485
- this.$set('material[' + i + '].f_material_price', 0)
486
- },
487
- // 获取类型
488
- setTypenumber(i, val) {
489
- let ac = this.$appdata.getParam(val)
490
- this.$set('material[' + i + '].typeNumberList', ac)
491
- this.$set('material[' + i + '].f_material_price', 0)
492
- },
493
- // 获取单价
494
- setmaterialprice(i, val) {
495
- var num
496
- if (val == null) {
497
- num = 0
498
- }
499
- num = this.$appdata.getSingleValue(val)
500
- this.$set('material[' + i + '].f_material_price', num)
501
- },
502
- // 金额计算
503
- smallnum(val, val1) {
504
- let num = Number(val) * Number(val1)
505
- return num
506
- },
507
- getCheckMessage() {
508
- let tempArr = this.material
509
- if (!tempArr.length > 0) {
510
- return '请选择材料后上传'
511
- }
512
- for (let i = 0; i < tempArr.length; i++) {
513
- if (tempArr[i].f_process_id) {
514
- continue
745
+ return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
746
+ },
747
+ moneyChange(index) {
748
+ console.log(`当前下标----${index}`)
749
+ if (isEmpty(this.charge.payment_terms[index].f_charge_money) || Number(this.charge.payment_terms[index].f_charge_money) === 0) {
750
+ this.$showMessage('单笔收费不能为0元!!!', 'warning', 3000)
751
+ this.charge.payment_terms[index].f_charge_money = null
752
+ return
515
753
  }
754
+ },
755
+ async TimeQrCode() {
756
+ this.qrcodeTimer = setTimeout(() => {
757
+ // 关闭二维码
758
+ this.clearQrCode()
759
+ // 将定时器清除
760
+ this.qrcodeTimer = null;
761
+ clearInterval(this.orderInterval)
762
+ }, 60 * 1000)
516
763
 
517
- if (!tempArr[i].f_material_price) {
518
- return '请输入材料单价'
764
+ },
765
+ generateRandomString(length) {
766
+ let result = new Date().getTime().toString()
767
+ const characters = 'abcdefghijklmnopqrstuvwxyz0123456789';
768
+ const charactersLength = characters.length;
769
+ for (let i = 0; i < length; i++) {
770
+ result += characters.charAt(Math.floor(Math.random() * charactersLength));
519
771
  }
520
- if (!tempArr[i].f_material_number) {
521
- return '请输入材料数量'
772
+ return result.substring(0, 30);
773
+ },
774
+ // 打开二维码
775
+ async openQrCode() {
776
+ debugger
777
+ console.log(Vue.user)
778
+ const merchantMsg = this.$appdata.getSingleValue(Vue.user.orgs + "商户号")
779
+ const outTradeNo = this.generateRandomString(30)
780
+ // 下订单
781
+ let http = new HttpResetClass()
782
+ const val = {
783
+ "body": "燃气费",
784
+ "detail": "燃气费",
785
+ "totalAmount": (this.payNumber * 100).toString(),
786
+ "merchantMsg": merchantMsg,//商户id
787
+ "outTradeNo": outTradeNo,//随机数30位
788
+ "service": "nativePay",//死值
789
+ "tradeType": "wechat_jsapi"//死值
522
790
  }
523
- }
524
- /* if (this.materialImges.length == 0) {
525
- return '材料清单需拍照'
526
- } */
527
- return null
791
+ try {
792
+ let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/bank/rs/logic/BC_10001`, {data: val}, {
793
+ resolveMsg: null,
794
+ rejectMsg: null
795
+ })
796
+ if (res.data.status === 200) {
797
+ console.log("调用结果", res.data, res.data.body.url)
798
+ try {
799
+ this.order = res.data
800
+ this.othercharge_id = ''
801
+ await this.saveOrder('create')
802
+ if (this.othercharge_id) {
803
+ this.isTimeout = false
804
+ this.showQrCode = true
805
+ console.log(this.order)
806
+ this.$nextTick(() => {
807
+ this.qrcode(res.data.body.url)
808
+ })
809
+ if (this.order.body.tradeNo) {
810
+ this.timer1 = window.setInterval(this.getOrderInformation, 3000)
811
+ }
812
+ } else {
813
+ this.$showMessage('创建订单失败!')
814
+ }
815
+ } catch (e) {
816
+ this.$showMessage('创建订单失败!')
817
+ }
818
+ } else {
819
+ this.$showMessage('获取二维码失败!')
820
+ }
528
821
 
529
- },
530
- /*async saveUserFile1() {
531
- let message = this.getCheckMessage()
532
- if (message) {
533
- this.$showMessage(message)
534
- return
535
- }
536
- let imgs = []
537
- for (let i = 0; i < this.materialImges.length; i++) {
538
- let it = {}
539
- if (this.materialImges[i].id) {
540
- it = {
541
- f_path: this.materialImges[i].path,
542
- id: this.materialImges[i].id,
543
- f_process_id: this.selectdata.f_process_id
822
+ } catch (e) {
823
+ this.$showMessage('获取二维码失败,请检查网络!')
824
+ }
825
+ },
826
+ qrcode(url) {
827
+ new QRCode('qrcode', {
828
+ text: url, // 设置二维码内容或跳转地址
829
+ width: 266, // 设置宽度,单位像素
830
+ height: 266, // 设置高度,单位像素
831
+ correctLevel: QRCode.CorrectLevel.L //容错率,L/M/Hs
832
+ })
833
+ },
834
+ // 获取订单信息
835
+ async getOrderInformation() {
836
+ const merchantMsg = this.$appdata.getSingleValue(Vue.user.orgs + "商户号")
837
+ // 查询订单信息
838
+ console.log('查询订单信息!!!', this.order)
839
+ try {
840
+ let http = new HttpResetClass()
841
+ let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/bank/rs/logic/BC_10003`, {
842
+ data: {
843
+ "service": "queryOrder",
844
+ "outTradeNo": this.order.body.outTradeNo,
845
+ "merchantMsg": merchantMsg,
846
+ "tradeNo": ""
847
+ }
848
+ }, {
849
+ resolveMsg: null,
850
+ rejectMsg: null
851
+ })
852
+ // 支付成功
853
+ this.orderstatus = res.data
854
+ console.log('查询结果=======', res.data)
855
+ if (res.data.status == '200') {
856
+ window.clearInterval(this.timer1)
857
+ console.log('支付成功', this.orderstatus)
858
+ this.saveUserFile('update')
859
+ this.order = {}
544
860
  }
545
- } else {
546
- it = {
547
- f_path: this.materialImges[i].path,
548
- f_process_id: this.selectdata.f_process_id
861
+ } catch (e) {
862
+ window.clearInterval(this.timer1)
863
+ this.$showMessage('创建订单失败!')
864
+ this.order = {}
865
+ }
866
+ },
867
+ getPaymentTerm() {
868
+ let term = ''
869
+ this.charge.payment_terms.forEach((row) => {
870
+ term += `${row.f_payment_term} `
871
+ })
872
+ return term
873
+ },
874
+ closeQRCode() {
875
+ clearTimeout(this.paymentInterval)
876
+ clearTimeout(this.orderInterval)
877
+ this.timeLeft = 300
878
+ this.closeOrder()
879
+ // 清除二维码
880
+ this.clearQrCode()
881
+ this.showQrCode = false
882
+ },
883
+ clearQrCode() {
884
+ document.getElementById('qrcode').innerHTML = ''
885
+ },
886
+ /* async closeOrder() {
887
+ let data = {
888
+ "flag": "JsApiWeiNan",
889
+ "f_filiale": "weinanchengtou",
890
+ "f_out_trade_no": this.order.f_out_trade_no,// 商户单号
891
+ "isClose": "是",
892
+ "f_sys_trace": this.order.f_sys_trace // 交易流水号
893
+ }
894
+ let http = new HttpResetClass()
895
+ let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/wx/rs/pay/microPayOrderStatus`, data, {
896
+ resolveMsg: null,
897
+ rejectMsg: '关闭失败!!!'
898
+ })
899
+ },*/
900
+ async update() {
901
+ let http = new HttpResetClass()
902
+ for (let i = 0; i < this.material.length; i++) {
903
+ if (this.material[i].f_state == '未收费') {
904
+ this.material[i].f_state = '已收费'
549
905
  }
550
906
  }
551
- imgs.push(it)
552
- }
553
- for (let i = 0; i < this.material.length; i++) {
554
- this.material[i].f_process_id = this.selectdata.f_process_id
555
- if (isEmpty(this.material[i].f_state)) {
556
- this.material[i].f_state = '未收费'
907
+ let data = {
908
+ model: this.material
557
909
  }
558
- }
559
- let data = {
560
- model: this.material,
561
- imgs: imgs,
562
- f_process_id: this.selectdata.f_process_id
563
- }
564
- console.log('------------------',data)
565
- new HttpResetClass().load('POST',this.$androidUtil.getProxyUrl() +`/rs/logic/saveMaterialService`, data,{resolveMsg:null,rejectMsg:null}).then(res=>{
566
- console.log(res)
567
- this.model.rows=res.data
568
- }).catch((e)=>{
569
- console.log("933",e)
570
- })
571
- /!* console.log('------------------',data)
572
- HostApp.__this__ = this
573
- HostApp.logicWithHint({
574
- // logic别名,key必须为logic
575
- 'logic': 'saveMaterialServiceAndroid',
576
- // 回调执行方法名,key必须为callback
577
- 'callback': 'javascript:HostApp.__this__.uploadCallback1()',
578
- // logic执行需要的业务参数
579
- 'data': data,
580
- // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
581
- // 执行回调方法传入key为backresult
582
- // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
583
- 'backresult': 1
584
- }) *!/
585
- },*/
586
- uploadCallback1(result) {
587
-
588
- if (result.state == 'ok' && JSON.parse(result.result).code == 200) {
589
- this.$showMessage('材料保存成功!!!')
590
- } else {
591
- this.$showMessage(JSON.parse(result.result).msg)
592
- }
593
- },
594
- async saveUserFile(type) {
595
- for (let i = 0; i < this.material.length; i++) {
596
- this.material[i].f_process_id = this.selectdata.f_process_id
597
- this.material[i].f_department = Vue.user.f_department_name
598
- this.material[i].f_fee = this.material[i].f_material_price * this.material[i].f_material_number
599
- if (isEmpty(this.material[i].f_state)) {
600
- this.material[i].f_state = null
910
+ let res = await http.load('post', this.$androidUtil.getProxyUrl() + '/rs/logic/saveweinanmaterial', {data: data}, {
911
+ resolveMsg: null,
912
+ rejectMsg: '保存失败'
913
+ })
914
+ this.search()
915
+ },
916
+ async saveother() {
917
+ let http = new HttpResetClass()
918
+ let data1 = {
919
+ tablename: 't_material_service',
920
+ condition: `f_process_id = '${this.selectdata.f_process_id}' and f_state = '未收费'`
601
921
  }
602
- }
603
- await this.saveOrder(type)
604
- },
605
- async saveOrder(type){
606
- console.log('this.material', this.material)
607
- let otherdetail=[]
608
- if(this.payNumber == 0){
609
- otherdetail.push({
610
- f_brand_spec:['维修'],
611
- f_typename:['材料费'],
612
- f_typenumber:[],
613
- f_unitprice:0,
614
- f_number:this.material.length
922
+ let res1 = await http.load('post', this.$androidUtil.getProxyUrl() + '/rs/sql/tel_singleTable', {data: data1}, {
923
+ resolveMsg: null,
924
+ rejectMsg: '获取数据失败'
615
925
  })
616
- }else{
617
- this.material.forEach((row)=>{
618
- if(row.f_material_price != 0){
619
- otherdetail.push({
620
- f_brand_spec:['维修'],
621
- f_typename:[`${row.material_type?row.material_type:'材料费'}`],
622
- f_typenumber:[],
623
- f_unitprice:row.f_material_price,
624
- f_number:row.f_material_number
625
- })
626
- }
926
+ let data = {
927
+ tablename: 't_userfiles',
928
+ condition: `f_userinfo_id = '${this.selectdata.model.f_userinfo_id}'`
929
+ }
930
+ let res = await http.load('post', this.$androidUtil.getProxyUrl() + '/rs/sql/tel_singleTable', {data: data}, {
931
+ resolveMsg: null,
932
+ rejectMsg: '获取数据失败'
627
933
  })
628
- }
934
+ let otherdetails = []
935
+ for (let i = 0; i < res1.data.length; i++) {
936
+ otherdetails.push(
937
+ {
938
+ "f_brand_spec": [res1.data[i].f_material_name],
939
+ "f_unitprice": res1.data[i].f_material_price,
940
+ "f_typename": [res1.data[i].f_typename],
941
+ "f_typenumber": [res1.data[i].f_typenumber],
942
+ "f_number": res1.data[i].f_material_number
943
+ }
944
+ )
945
+ }
629
946
 
630
- let param = {
631
- model: this.material,
632
- operator_type:type,
633
- othercharge_id:this.othercharge_id,
634
- f_process_id: this.selectdata.f_process_id,
635
- other:{
947
+ console.log("查询的用户信息", otherdetails)
948
+ let data2 = {
636
949
  "record_userinfo": this.selectdata.model.f_userinfo_id,
637
- //"f_userfiles_id": '',
638
- //"f_user_id": '',
950
+ "f_userfiles_id": res.data[0].f_userfiles_id,
951
+ "f_user_id": res.data[0].f_user_id,
639
952
  "f_user_name": this.selectdata.model.f_user_name,
640
953
  "f_address": this.selectdata.model.f_address,
641
954
  "f_user_type": this.selectdata.model.f_user_type,
642
955
  "f_gasproperties": "",
643
- "f_collection": this.payNumber,
644
- "f_comments": `${Vue.user.name}进行维修材料收费,收费方式-${this.payType} ${this.order.body && this.order.body.tradeNo?'。支付订单号:'+this.order.body.tradeNo:''}`,
645
- "f_payment": this.payType,
646
- "f_voucher_number": this.selectdata.f_process_id,
956
+ "f_collection": this.f_cost_sum,
957
+ "f_comments": "",
958
+ "f_payment": this.charge.f_payment_method,
959
+ "f_voucher_number": "",
647
960
  "f_bill_style": "普通收据",
648
961
  "f_userinfo_id": this.selectdata.model.f_userinfo_id,
649
962
  "f_service_person": Vue.user.name,
650
- "f_operat_type": "维修收费",
963
+ "f_operat_type": "其他收费",
651
964
  "f_describe": "",
652
- "f_serial_id":this.order.body?this.order.body.tradeNo:null,
653
- "f_state": type=='create'?'无效':'有效',
965
+ "f_state": "有效",
654
966
  "f_operator": Vue.user.name,
655
967
  "f_operatorid": Vue.user.id,
656
968
  "f_orgid": Vue.user.orgid,
@@ -658,375 +970,96 @@ export default {
658
970
  "f_depid": Vue.user.depids,
659
971
  "f_depname": Vue.user.f_department_name,
660
972
  "t_userfees": "",
661
- "f_fee_type": "维修费用",
973
+ "f_fee_type": "其他费用",
662
974
  "f_fee_time": "12",
663
- "otherdetail": otherdetail
664
- }
665
- }
666
- console.log("要保存了666-------data2",param)
667
- let res=await new HttpResetClass().load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/saveMaterialService`, param, {
668
- resolveMsg: null,
669
- rejectMsg: null
670
- })
671
- console.log('res.data',res.data)
672
- if(res.data.code==200){
673
- if(type==='create'){
674
- // this.$showMessage('收费记录创建成功!!!')
675
- this.othercharge_id=res.data.othercharge_id
676
- // this.$emit('aftersave')
677
- }else{
678
- this.$showMessage('材料保存成功!!!')
679
- this.$emit('aftersave')
975
+ "otherdetail": otherdetails
680
976
  }
681
977
 
682
- }else{
683
- this.$showMessage(res.data.msg)
684
- }
685
- },
686
- uploadCallback(result) {
687
- if (result.state == 'ok' && JSON.parse(result.result).code == 200) {
688
- this.$showMessage('材料保存成功!!!')
689
- } else {
690
- this.$showMessage(JSON.parse(result.result).msg)
691
- }
692
- },
693
- // 关闭对话框
694
- closeModal() {
695
- this.showCharge = false
696
- this.charge = {
697
- payment_terms: [{
698
- f_payment_term: '',
699
- f_charge_money: '',
700
- f_amount_words: '',
701
- f_payment_method: this.charge.f_payment_method
702
- }]
703
- }
704
- },
705
- // 金额转大写
706
- handleInput(index) {
707
- // 通过正则过滤小数点后两位
708
- console.log('-----------------------')
709
- this.charge.payment_terms[index].f_charge_money = (this.charge.payment_terms[index].f_charge_money.match(/^\d*(\.?\d{0,2})/g)[0]) || null
710
- this.charge.payment_terms[index].f_amount_words = this.smalltoBIG(this.charge.payment_terms[index].f_charge_money)
711
- },
712
- // 金额转大写
713
- smalltoBIG(n) {
714
- let fraction = ['角', '分'];
715
- let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
716
- let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
717
- let head = n < 0 ? '欠' : '';
718
- n = Math.abs(n);
719
-
720
- let s = '';
721
-
722
- for (var i = 0; i < fraction.length; i++) {
723
- s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
724
- }
725
- s = s || '整';
726
- n = Math.floor(n);
727
-
728
- for (var i = 0; i < unit[0].length && n > 0; i++) {
729
- let p = '';
730
- for (var j = 0; j < unit[1].length && n > 0; j++) {
731
- p = digit[n % 10] + unit[1][j] + p;
732
- n = Math.floor(n / 10);
733
- }
734
- s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
735
- }
736
- return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
737
- },
738
- moneyChange(index) {
739
- console.log(`当前下标----${index}`)
740
- if (isEmpty(this.charge.payment_terms[index].f_charge_money) || Number(this.charge.payment_terms[index].f_charge_money) === 0) {
741
- this.$showMessage('单笔收费不能为0元!!!', 'warning', 3000)
742
- this.charge.payment_terms[index].f_charge_money = null
743
- return
744
- }
745
-
746
- },
747
- async TimeQrCode(){ this.qrcodeTimer = setTimeout(() => {
748
- // 关闭二维码
749
- this.clearQrCode()
750
- // 将定时器清除
751
- this.qrcodeTimer = null;
752
- clearInterval(this.orderInterval)
753
- }, 60 * 1000)
754
-
755
- },
756
- // 打开二维码
757
- // 打开二维码
758
- async openQrCode() {
759
- // 下订单
760
- let http = new HttpResetClass()
761
- const val ={
762
- "body":"燃气费",
763
- "detail":"燃气费",
764
- "totalAmount":(this.payNumber * 100).toString()
765
- }
766
- try {
767
- let res=await http.load('POST', `${this.$androidUtil.getProxyUrl()}/bank/rs/logic/BC_10001`,{data: val}, {resolveMsg: null,rejectMsg: null})
768
- if(res.data.status===200){
769
- console.log("调用结果",res.data,res.data.body.url)
770
- try {
771
- this.order = res.data
772
- this.othercharge_id=''
773
- await this.saveOrder('create')
774
- if(this.othercharge_id){
775
- this.isTimeout = false
776
- this.showQrCode = true
777
- console.log(this.order)
778
- this.$nextTick(()=>{
779
- this.qrcode(res.data.body.url)
780
- })
781
- if (this.order.body.tradeNo) {
782
- this.timer1 = window.setInterval (this.getOrderInformation,3000)
783
- }
784
- }else{
785
- this.$showMessage('创建订单失败!')
786
- }
787
- }catch (e) {
788
- this.$showMessage('创建订单失败!')
789
- }
790
- }else{
791
- this.$showMessage('获取二维码失败!')
792
- }
793
-
794
- }catch (e) {
795
- this.$showMessage('获取二维码失败,请检查网络!')
796
- }
797
- },
798
- qrcode(url) {
799
- new QRCode('qrcode', {
800
- text: url, // 设置二维码内容或跳转地址
801
- width: 266, // 设置宽度,单位像素
802
- height: 266, // 设置高度,单位像素
803
- correctLevel: QRCode.CorrectLevel.L //容错率,L/M/Hs
804
- })
805
- },
806
- // 获取订单信息
807
- async getOrderInformation() {
808
- // 查询订单信息
809
- console.log('查询订单信息!!!',this.order)
810
- try {
978
+ let res2 = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/sale_othercharge_logic`, {data: data2}, {
979
+ resolveMsg: null,
980
+ rejectMsg: '保存数据失败'
981
+ })
982
+ },
983
+ async shoufei() {
811
984
  let http = new HttpResetClass()
812
- let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/bank/rs/logic/BC_10003`, {
813
- data: {
814
- "outTradeNo":this.order.body.tradeNo,
815
- "mchNo":'D2023011010100739'
816
- }
817
- }, {
985
+ let data = {
986
+ tablename: 't_material_service',
987
+ condition: `f_process_id = '${this.selectdata.f_process_id}' and f_state = '未收费'`
988
+ }
989
+ let res = await http.load('post', this.$androidUtil.getProxyUrl() + '/rs/sql/tel_singleTable', {data: data}, {
818
990
  resolveMsg: null,
819
- rejectMsg: null
991
+ rejectMsg: '获取数据失败'
820
992
  })
821
- // 支付成功
822
- this.orderstatus = res.data
823
- console.log('查询结果=======',res.data)
824
- if (res.data.status =='200') {
825
- window.clearInterval(this.timer1)
826
- console.log('支付成功',this.orderstatus)
827
- this.saveUserFile('update')
828
- this.order={}
993
+ if (res.data.length <= 0) {
994
+ this.$showMessage('请先添加未收费的材料!!!')
995
+ return
829
996
  }
830
- }catch (e) {
831
- window.clearInterval(this.timer1)
832
- this.$showMessage('创建订单失败!')
833
- this.order={}
834
- }
835
- },
836
- getPaymentTerm() {
837
- let term = ''
838
- this.charge.payment_terms.forEach((row) => {
839
- term += `${row.f_payment_term} `
840
- })
841
- return term
842
- },
843
- closeQRCode() {
844
- clearTimeout(this.paymentInterval)
845
- clearTimeout(this.orderInterval)
846
- this.timeLeft = 300
847
- this.closeOrder()
848
- // 清除二维码
849
- this.clearQrCode()
850
- this.showQrCode = false
851
- },
852
- clearQrCode() {
853
- document.getElementById('qrcode').innerHTML = ''
854
- },
855
- /* async closeOrder() {
856
- let data = {
857
- "flag": "JsApiWeiNan",
858
- "f_filiale": "weinanchengtou",
859
- "f_out_trade_no": this.order.f_out_trade_no,// 商户单号
860
- "isClose": "是",
861
- "f_sys_trace": this.order.f_sys_trace // 交易流水号
862
- }
863
- let http = new HttpResetClass()
864
- let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/wx/rs/pay/microPayOrderStatus`, data, {
865
- resolveMsg: null,
866
- rejectMsg: '关闭失败!!!'
867
- })
868
- },*/
869
- async update() {
870
- let http = new HttpResetClass()
871
- for (let i = 0; i < this.material.length; i++) {
872
- if (this.material[i].f_state == '未收费') {
873
- this.material[i].f_state = '已收费'
997
+ this.f_cost_sum = 0
998
+ for (let i = 0; i < res.data.length; i++) {
999
+ this.f_cost_sum += Number(res.data[i].f_fee)
874
1000
  }
875
- }
876
- let data = {
877
- model: this.material
878
- }
879
- let res = await http.load('post', this.$androidUtil.getProxyUrl() + '/rs/logic/saveweinanmaterial', {data: data}, {
880
- resolveMsg: null,
881
- rejectMsg: '保存失败'
882
- })
883
- this.search()
884
- },
885
- async saveother() {
886
- let http = new HttpResetClass()
887
- let data1 = {
888
- tablename: 't_material_service',
889
- condition: `f_process_id = '${this.selectdata.f_process_id}' and f_state = '未收费'`
890
- }
891
- let res1 = await http.load('post', this.$androidUtil.getProxyUrl() + '/rs/sql/tel_singleTable', {data: data1}, {
892
- resolveMsg: null,
893
- rejectMsg: '获取数据失败'
894
- })
895
- let data = {
896
- tablename: 't_userfiles',
897
- condition: `f_userinfo_id = '${this.selectdata.model.f_userinfo_id}'`
898
- }
899
- let res = await http.load('post', this.$androidUtil.getProxyUrl() + '/rs/sql/tel_singleTable', {data: data}, {
900
- resolveMsg: null,
901
- rejectMsg: '获取数据失败'
902
- })
903
- let otherdetails = []
904
- for (let i = 0; i < res1.data.length; i++) {
905
- otherdetails.push(
906
- {
907
- "f_brand_spec": [res1.data[i].f_material_name],
908
- "f_unitprice": res1.data[i].f_material_price,
909
- "f_typename": [res1.data[i].f_typename],
910
- "f_typenumber": [res1.data[i].f_typenumber],
911
- "f_number": res1.data[i].f_material_number
912
- }
913
- )
914
- }
915
-
916
- console.log("查询的用户信息", otherdetails)
917
- let data2 = {
918
- "record_userinfo": this.selectdata.model.f_userinfo_id,
919
- "f_userfiles_id": res.data[0].f_userfiles_id,
920
- "f_user_id": res.data[0].f_user_id,
921
- "f_user_name": this.selectdata.model.f_user_name,
922
- "f_address": this.selectdata.model.f_address,
923
- "f_user_type": this.selectdata.model.f_user_type,
924
- "f_gasproperties": "",
925
- "f_collection": this.f_cost_sum,
926
- "f_comments": "",
927
- "f_payment": this.charge.f_payment_method,
928
- "f_voucher_number": "",
929
- "f_bill_style": "普通收据",
930
- "f_userinfo_id": this.selectdata.model.f_userinfo_id,
931
- "f_service_person": Vue.user.name,
932
- "f_operat_type": "其他收费",
933
- "f_describe": "",
934
- "f_state": "有效",
935
- "f_operator": Vue.user.name,
936
- "f_operatorid": Vue.user.id,
937
- "f_orgid": Vue.user.orgid,
938
- "f_orgname": Vue.user.orgs,
939
- "f_depid": Vue.user.depids,
940
- "f_depname": Vue.user.f_department_name,
941
- "t_userfees": "",
942
- "f_fee_type": "其他费用",
943
- "f_fee_time": "12",
944
- "otherdetail": otherdetails
945
- }
946
-
947
- let res2 = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/sale_othercharge_logic`, {data: data2}, {
948
- resolveMsg: null,
949
- rejectMsg: '保存数据失败'
950
- })
1001
+ this.showCharge = true
1002
+ this.charge.payment_terms[0].f_charge_money = this.f_cost_sum
1003
+ },
1004
+ accMul(arg1, arg2) {
1005
+ let m = 0, s1 = arg1.toString(), s2 = arg2.toString();
1006
+ try {
1007
+ m += s1.split(".")[1].length
1008
+ } catch (e) {
1009
+ }
1010
+ try {
1011
+ m += s2.split(".")[1].length
1012
+ } catch (e) {
1013
+ }
1014
+ return Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m)
1015
+ },
951
1016
  },
952
- async shoufei() {
953
- let http = new HttpResetClass()
954
- let data = {
955
- tablename: 't_material_service',
956
- condition: `f_process_id = '${this.selectdata.f_process_id}' and f_state = '未收费'`
957
- }
958
- let res = await http.load('post', this.$androidUtil.getProxyUrl() + '/rs/sql/tel_singleTable', {data: data}, {
959
- resolveMsg: null,
960
- rejectMsg: '获取数据失败'
961
- })
962
- if (res.data.length <= 0) {
963
- this.$showMessage('请先添加未收费的材料!!!')
964
- return
965
- }
966
- this.f_cost_sum = 0
967
- for (let i = 0; i < res.data.length; i++) {
968
- this.f_cost_sum += Number(res.data[i].f_fee)
969
- }
970
- this.showCharge = true
971
- this.charge.payment_terms[0].f_charge_money = this.f_cost_sum
1017
+ beforeDestroy() {
1018
+ console.log('销毁了-----111', this.timer1)
1019
+ window.clearInterval(this.timer1)
972
1020
  },
973
- accMul(arg1, arg2) {
974
- let m = 0, s1 = arg1.toString(), s2 = arg2.toString();
975
- try {
976
- m += s1.split(".")[1].length
977
- } catch (e) {
978
- }
979
- try {
980
- m += s2.split(".")[1].length
981
- } catch (e) {
1021
+ events: {},
1022
+ computed: {
1023
+ paymentMethod() {
1024
+ return this.$appdata.getParam("付款方式")
1025
+ },
1026
+ paymentTerm() {
1027
+ return this.$appdata.getParam("收费项目")
982
1028
  }
983
- return Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m)
984
1029
  },
985
- },
986
- beforeDestroy(){
987
- console.log('销毁了-----111',this.timer1)
988
- window.clearInterval(this.timer1)
989
- },
990
- events: {},
991
- computed: {
992
- paymentMethod() {
993
- return this.$appdata.getParam("付款方式")
994
- },
995
- paymentTerm() {
996
- return this.$appdata.getParam("收费项目")
997
- }
998
- },
999
- watch: {}
1000
- }
1030
+ watch: {}
1031
+ }
1001
1032
  </script>
1002
1033
  <style lang="less" scoped>
1003
- .head-but {
1004
- margin-left: 5px;
1005
- height: 34px;
1006
- /*background-color: #6aa6e2;*/
1007
- border-radius: 4px;
1008
- font-family: PingFang;
1009
- color: #ffffff;
1010
- }
1034
+ .head-but {
1035
+ margin-left: 5px;
1036
+ height: 34px;
1037
+ /*background-color: #6aa6e2;*/
1038
+ border-radius: 4px;
1039
+ font-family: PingFang;
1040
+ color: #ffffff;
1041
+ }
1042
+
1043
+ /*清除model中的浮动*/
1044
+ .clearfix:after, .clearfix:before {
1045
+ display: table;
1046
+ }
1047
+
1048
+ .clearfix:after {
1049
+ clear: both;
1050
+ }
1011
1051
 
1012
- /*清除model中的浮动*/
1013
- .clearfix:after, .clearfix:before {
1014
- display: table;
1015
- }
1052
+ .lab_sty {
1053
+ margin-bottom: 0;
1054
+ display: flex;
1055
+ flex-direction: row-reverse;
1056
+ align-items: center;
1057
+ }
1016
1058
 
1017
- .clearfix:after {
1018
- clear: both;
1019
- }
1020
- .lab_sty{
1021
- margin-bottom: 0;
1022
- display: flex;
1023
- flex-direction: row-reverse;
1024
- align-items: center;
1025
- }
1026
- .row_sty{
1027
- display: flex;
1028
- align-items: center;
1029
- margin: 5px;
1030
- }
1059
+ .row_sty {
1060
+ display: flex;
1061
+ align-items: center;
1062
+ margin: 5px;
1063
+ }
1031
1064
 
1032
1065
  </style>