doway-coms 1.2.4 → 1.2.5

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": "doway-coms",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "description": "doway组件库",
5
5
  "author": "dowaysoft",
6
6
  "main": "packages/index.js",
@@ -45,16 +45,34 @@ export default {
45
45
  }
46
46
  },
47
47
  methods: {
48
- showPreview(url, data, isReplace) {
48
+ showPreview(url, data, isReplace, method) {
49
49
  this.isShow = true
50
- let ids = ''
51
- if (isReplace) {
52
- ids = JSON.stringify(data).replaceAll('"', '')
50
+ if (method == 'post') {
51
+ this.isShow = true
52
+ this.$nextTick(() => {
53
+ const formExport = document.createElement('form')
54
+ formExport.method = 'post'
55
+ formExport.action = url + '?token=' + this.$store.getters.token
56
+ const inputValue = document.createElement('input')
57
+ inputValue.type = 'hidden'
58
+ inputValue.name = 'ids'
59
+ inputValue.value = JSON.stringify(data)
60
+ formExport.target = 'printFrame'
61
+ formExport.appendChild(inputValue)
62
+ document.body.appendChild(formExport)
63
+ formExport.submit()
64
+ formExport.removeChild(inputValue)
65
+ document.body.removeChild(formExport)
66
+ })
53
67
  } else {
54
- ids = JSON.stringify(data)
68
+ let ids = ''
69
+ if (isReplace) {
70
+ ids = JSON.stringify(data).replaceAll('"', '')
71
+ } else {
72
+ ids = JSON.stringify(data)
73
+ }
74
+ this.url = url + '?token=' + this.$store.getters.token + '&ids=' + ids
55
75
  }
56
- this.url = url + '?token=' + this.$store.getters.token + '&ids=' + ids
57
- console.debug(VxeModal)
58
76
  },
59
77
  closeModal() {
60
78
  this.$emit('close')
@@ -294,9 +294,8 @@ export function supplyUnitPriceNotTaxAmount(rowInfo, taxRate, colInfo) {
294
294
 
295
295
  rowInfo[colInfo.unitPriceField] = XEUtils.round(
296
296
  XEUtils.divide(rowInfo[colInfo.amountField], rowInfo[colInfo.qtyField]),
297
- 2
297
+ store.getters.supplyPricePrecision,
298
298
  )
299
- console.debug(rowInfo[colInfo.unitPriceField])
300
299
 
301
300
  if (colInfo.direction) {
302
301
  rowInfo[colInfo.taxField] = XEUtils.multiply(
@@ -351,7 +350,7 @@ export function supplyUnitPriceAmount(rowInfo, taxRate, colInfo) {
351
350
  rowInfo[colInfo.amountNotTaxField],
352
351
  rowInfo[colInfo.qtyField]
353
352
  ),
354
- 2
353
+ store.getters.supplyPriceNotTaxPrecision,
355
354
  )
356
355
 
357
356
  if (colInfo.direction) {
@@ -407,7 +406,7 @@ export function custUnitPriceAmount(rowInfo, taxRate, colInfo) {
407
406
  rowInfo[colInfo.amountNotTaxField],
408
407
  rowInfo[colInfo.qtyField]
409
408
  ),
410
- store.getters.custPriceNotTaxPrecision
409
+ store.getters.custPriceNotTaxPrecision,
411
410
  )
412
411
  if (colInfo.direction) {
413
412
  rowInfo[colInfo.taxField] = XEUtils.multiply(
@@ -458,7 +457,7 @@ export function custUnitPriceNotTaxAmount(rowInfo, taxRate, colInfo) {
458
457
  //返回来计算含税单价
459
458
  rowInfo[colInfo.unitPriceField] = XEUtils.round(
460
459
  XEUtils.divide(rowInfo[colInfo.amountField], rowInfo[colInfo.qtyField]),
461
- store.getters.custPricePrecision
460
+ store.getters.custPricePrecision,
462
461
  )
463
462
 
464
463
  if (colInfo.direction) {