Browse Source

收款条件设置调整

qymljy 1 year ago
parent
commit
d93743ac32

+ 3 - 3
src/HDrpManagement/collectionRule/components/add.vue

@@ -132,11 +132,11 @@ export default {
         this.invoiceList = []
       }
       let newArr = this.auditList.concat(this.shipmentList.concat(this.invoiceList))
-      let allAmountrate = parseFloat(0)
+      let allAmountrate = 0
       newArr.forEach(item=>{
-        allAmountrate = parseFloat(allAmountrate) + parseFloat(item.amountrate)
+        allAmountrate = allAmountrate + Math.round((item.amountrate * 100)*100)/100
       })
-      if (allAmountrate !== 1){
+      if (allAmountrate !== 100){
         this.$message({
           message: '已选节点立账额度合计需等于100%',
           center: true,

+ 9 - 4
src/HDrpManagement/collectionRule/components/edit.vue

@@ -67,7 +67,12 @@ export default {
       form:{
         "sa_receivableruleid":0,
         "remarks":"",
-        "isdefault":1
+        "isdefault":1,
+        "accountingnodes":{
+          "ordercheck":[],
+          "logisticscheck":[],
+          "invoiceapplycheck":[]
+        }
       },
       rules:{
         point:[
@@ -172,11 +177,11 @@ export default {
         this.invoiceList = []
       }
       let newArr = this.auditList.concat(this.shipmentList.concat(this.invoiceList))
-      let allAmountrate = parseFloat(0)
+      let allAmountrate = 0
       newArr.forEach(item=>{
-        allAmountrate = parseFloat(allAmountrate) + parseFloat(item.amountrate)
+        allAmountrate = allAmountrate + Math.round((item.amountrate * 100)*100)/100
       })
-      if (allAmountrate !== 1){
+      if (allAmountrate !== 100){
         this.$message({
           message: '已选节点立账额度合计需等于100%',
           center: true,