sale-client 3.6.475 → 3.6.476

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "3.6.475",
3
+ "version": "3.6.476",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -470,6 +470,10 @@
470
470
  this.validateOk = !val.isOk
471
471
  this.billData.bill = val.bill
472
472
  },
473
+ roundToDecimalPlace (number, decimalPlaces) {
474
+ const factor = Math.pow(10, decimalPlaces)
475
+ return Math.round(number * factor) / factor
476
+ },
473
477
  getcollection () {
474
478
  let money = 0
475
479
  let flag = true
@@ -479,8 +483,10 @@
479
483
  money += ((item.f_unitprice - 0) * (item.f_number - 0)) - 0
480
484
  }
481
485
  })
486
+ console.log(money)
482
487
  if (money != 0) {
483
- this.model.f_collection = money.toFixed(2)
488
+ this.model.f_collection = this.roundToDecimalPlace(money, 2)
489
+ console.log(this.model.f_collection)
484
490
  }
485
491
  if (!flag) this.model.f_collection = ''
486
492
  },
@@ -20,7 +20,7 @@ let GetSaleParam = {
20
20
  bookcodes:[],
21
21
  inputtors: [],
22
22
  async initinputtor () {
23
- let res = await Vue.resetpost('rs/sql/sale_getAlluserRes', {data: {
23
+ let res = await Vue.resetpost('rs/sql/sale_getAlluserRes?pageNo=1&pageSize=999999', {data: {
24
24
  condition: ' 1=1'
25
25
  }}, {resolveMsg: null, rejectMsg: '获取用户出错!!!'})
26
26
  console.log('resdata:', res.data)
@@ -38,11 +38,12 @@ let GetSaleParam = {
38
38
  return res.rolestr.indexOf('抄表员') > -1 && res.f_orgid == orgid
39
39
  }
40
40
  })
41
-
41
+ console.log(arr)
42
42
  arr.forEach((res) => {
43
43
  inputtors.push({label: res.name, value: res.name})
44
44
  })
45
45
  }
46
+ console.log(inputtors)
46
47
  return inputtors
47
48
  },
48
49
  getGasstyle (key) {