Sfoglia il codice sorgente

项目预测修改

qymljy 1 anno fa
parent
commit
549e125832

+ 8 - 8
src/HDrpManagement/projectPredictionManage/details/modules/projectList.vue

@@ -243,9 +243,9 @@ export default {
       const res = await this.$api.requested(this.productParam)
       this.productList = res.data
       /* console.log(typeof res.data[4].marketprice)*/
-      this.productList.forEach(item=>{
+     /* this.productList.forEach(item=>{
         item.price = Number(this.tool.formatAmount(item.price,2))
-      })
+      })*/
       this.totalProduct = res.total
       if (res.data.length > 0){
         this.productPrice = res.data[0].sumorderamount
@@ -507,7 +507,7 @@ export default {
         "id": 20230705145404,
         "content": {
           "sa_salesforecastbillid":this.id,
-          "sa_salesforecastprojectid":this.selectProjectid,
+          "sa_salesforecastprojectid":this.productParam.content.sa_salesforecastprojectid,
           "sa_salesforecastids":[val.sa_salesforecastid]
         }
       })
@@ -528,7 +528,7 @@ export default {
           "id": 20230705145404,
           "content": {
             "sa_salesforecastbillid":this.id,
-            "sa_salesforecastprojectid":this.selectProjectid,
+            "sa_salesforecastprojectid":this.productParam.content.sa_salesforecastprojectid,
             "sa_salesforecastids":ids
           }
         })
@@ -599,7 +599,7 @@ export default {
         "id": 20230705145204,
         "content": {
           "sa_salesforecastbillid": this.id,
-          "sa_salesforecastprojectid": this.selectProject,
+          "sa_salesforecastprojectid": this.productParam.content.sa_salesforecastprojectid,
           "salesforecast": [
             {
               "itemid": val.itemid,
@@ -620,9 +620,9 @@ export default {
       }else if(val > data.marketprice){
         data.price = data.marketprice
       } else {
-        data.price = this.tool.formatAmount(val ,4)
+        data.price = Number(val).toFixed(4)
       }
-      data.orderamount = this.tool.formatAmount(data.price * data.orderqty,4)
+      data.orderamount = (data.price * data.orderqty).toFixed(4)
       this.$set(this.productList,index,data)
       /*setTimeout(()=>{*/
       this.onChangeQty(data)
@@ -641,7 +641,7 @@ export default {
           "ownertable": "sa_project",
           "salesforecastproject": [
             {
-              "sa_salesforecastprojectid": this.selectProject,
+              "sa_salesforecastprojectid": this.productParam.content.sa_salesforecastprojectid,
               "ownerid": this.selectProjectid,
               "discountrate": this.discountrate/100
             }

+ 4 - 4
src/HDrpManagement/projectPredictionManage/details/modules/projectListDetail.vue

@@ -499,7 +499,7 @@ export default {
         "id": 20230705145404,
         "content": {
           "sa_salesforecastbillid":this.id,
-          "sa_salesforecastprojectid":this.selectProjectid,
+          "sa_salesforecastprojectid":this.productParam.content.sa_salesforecastprojectid,
           "sa_salesforecastids":[val.sa_salesforecastid]
         }
       })
@@ -520,7 +520,7 @@ export default {
           "id": 20230705145404,
           "content": {
             "sa_salesforecastbillid":this.id,
-            "sa_salesforecastprojectid":this.selectProjectid,
+            "sa_salesforecastprojectid":this.productParam.content.sa_salesforecastprojectid,
             "sa_salesforecastids":ids
           }
         })
@@ -591,7 +591,7 @@ export default {
         "id": 20230705145204,
         "content": {
           "sa_salesforecastbillid": this.id,
-          "sa_salesforecastprojectid": this.selectProject,
+          "sa_salesforecastprojectid":this.productParam.content.sa_salesforecastprojectid,
           "salesforecast": [
             {
               "itemid": val.itemid,
@@ -633,7 +633,7 @@ export default {
           "ownertable": "sa_project",
           "salesforecastproject": [
             {
-              "sa_salesforecastprojectid": this.selectProject,
+              "sa_salesforecastprojectid": this.productParam.content.sa_salesforecastprojectid,
               "ownerid": this.selectProjectid,
               "discountrate": this.discountrate/100
             }

+ 5 - 5
src/SDrpManagement/projectPrediction/detail/projectListDetail.vue

@@ -479,7 +479,7 @@ export default {
           "id": 20230705145404,
           "content": {
             "sa_salesforecastbillid":this.id,
-            "sa_salesforecastprojectid":this.selectProject,
+            "sa_salesforecastprojectid":this.productParam.content.sa_salesforecastprojectid,
             "sa_salesforecastids":[],
             "isAll":1,
           }
@@ -504,7 +504,7 @@ export default {
         "id": 20230705145404,
         "content": {
           "sa_salesforecastbillid":this.id,
-          "sa_salesforecastprojectid":this.selectProjectid,
+          "sa_salesforecastprojectid":this.productParam.content.sa_salesforecastprojectid,
           "sa_salesforecastids":[val.sa_salesforecastid]
         }
       })
@@ -525,7 +525,7 @@ export default {
           "id": 20230705145404,
           "content": {
             "sa_salesforecastbillid":this.id,
-            "sa_salesforecastprojectid":this.selectProjectid,
+            "sa_salesforecastprojectid":this.productParam.content.sa_salesforecastprojectid,
             "sa_salesforecastids":ids
           }
         })
@@ -596,7 +596,7 @@ export default {
         "id": 20230705145204,
         "content": {
           "sa_salesforecastbillid": this.id,
-          "sa_salesforecastprojectid": this.selectProject,
+          "sa_salesforecastprojectid": this.productParam.content.sa_salesforecastprojectid,
           "salesforecast": [
             {
               "itemid": val.itemid,
@@ -638,7 +638,7 @@ export default {
           "ownertable": "sa_project",
           "salesforecastproject": [
             {
-              "sa_salesforecastprojectid": this.selectProject,
+              "sa_salesforecastprojectid": this.productParam.content.sa_salesforecastprojectid,
               "ownerid": this.selectProjectid,
               "discountrate": this.discountrate/100
             }

+ 4 - 4
src/template/prediction/addProjectTemp.vue

@@ -105,12 +105,12 @@ export default {
       this.items = val
     },
     adds(){
-      this.$confirm('添加已选'+this.items.length+'个项目, 是否继续?', '提示', {
+      /*this.$confirm('添加已选'+this.items.length+'个项目, 是否继续?', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         closeOnClickModal:false,
         type: 'warning'
-      }).then(() => {
+      }).then(() => {*/
         let addItems = []
         addItems = this.items.map(item=>{
           return {
@@ -121,12 +121,12 @@ export default {
         })
         this.dialogVisible = false
         this.$emit('adds',addItems)
-      }).catch(() => {
+      /*})*//*.catch(() => {
         this.$message({
           type: 'info',
           message: '已取消删除'
         });
-      });
+      });*/
     },
     handleSizeChange(val) {
       // console.log(`每页 ${val} 条`);