|
@@ -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
|
|
|
}
|