Procházet zdrojové kódy

合同编辑调整

qymljy před 2 roky
rodič
revize
dd8032bd14

+ 8 - 8
src/HDrpManagement/contractManage/components/editContract.vue

@@ -879,9 +879,9 @@ export default {
                 } else {
                 } else {
                   this.form.type = this.$route.query.type
                   this.form.type = this.$route.query.type
                 }
                 }
-                this.form.discountrate ? this.form.discountrate =  (parseInt(this.form.discountrate) / 100).toFixed(4) : ''
-                this.form.productdiscount ? this.form.productdiscount =  (parseInt(this.form.productdiscount) / 100).toFixed(4) : ''
-                this.form.orderratio ? this.form.orderratio =  (parseInt(this.form.orderratio) / 100).toFixed(4) : ''
+                this.form.discountrate ? this.form.discountrate =  (parseFloat(this.form.discountrate) / 100).toFixed(4) : ''
+                this.form.productdiscount ? this.form.productdiscount =  (parseFloat(this.form.productdiscount) / 100).toFixed(4) : ''
+                this.form.orderratio ? this.form.orderratio =  (parseFloat(this.form.orderratio) / 100).toFixed(4) : ''
                 let res = await this.$api.requested({
                 let res = await this.$api.requested({
                   "id":20221121185302,
                   "id":20221121185302,
                   "content": this.form
                   "content": this.form
@@ -900,8 +900,8 @@ export default {
               }
               }
 
 
             } else {
             } else {
-              this.form.orderratio ? this.form.orderratio =  (parseInt(this.form.orderratio) / 100).toFixed(4) : ''
-              this.form.productdiscount ? this.form.productdiscount =  (parseInt(this.form.productdiscount) / 100).toFixed(4) : ''
+              this.form.orderratio ? this.form.orderratio =  (parseFloat(this.form.orderratio) / 100).toFixed(4) : ''
+              this.form.productdiscount ? this.form.productdiscount =  (parseFloat(this.form.productdiscount) / 100).toFixed(4) : ''
               let res = await this.$api.requested({
               let res = await this.$api.requested({
                 "id":20221121185302,
                 "id":20221121185302,
                 "content": this.form
                 "content": this.form
@@ -928,9 +928,9 @@ export default {
             } else {
             } else {
               this.form.type = this.$route.query.type
               this.form.type = this.$route.query.type
             }
             }
-            this.form.discountrate ? this.form.discountrate =  (parseInt(this.form.discountrate) / 100).toFixed(4) : ''
-            this.form.productdiscount ? this.form.productdiscount =  (parseInt(this.form.productdiscount) / 100).toFixed(4) : ''
-            this.form.orderratio ? this.form.orderratio =  (parseInt(this.form.orderratio) / 100).toFixed(4) : ''
+            this.form.discountrate ? this.form.discountrate =  (parseFloat(this.form.discountrate) / 100).toFixed(4) : ''
+            this.form.productdiscount ? this.form.productdiscount =  (parseFloat(this.form.productdiscount) / 100).toFixed(4) : ''
+            this.form.orderratio ? this.form.orderratio =  (parseFloat(this.form.orderratio) / 100).toFixed(4) : ''
             let res = await this.$api.requested({
             let res = await this.$api.requested({
               "id":20221121185302,
               "id":20221121185302,
               "content": this.form
               "content": this.form