|
@@ -796,6 +796,10 @@ export default {
|
|
|
//币别
|
|
|
this.getWorkDicts("currency").then(res =>{
|
|
|
this.currencyDic = res.data.data
|
|
|
+ if(!this.detailData.id){
|
|
|
+ this.$set(this.form,"currency","USD")
|
|
|
+ this.currencyChange("USD")
|
|
|
+ }
|
|
|
})
|
|
|
if(this.detailData.view){
|
|
|
this.viewDisabled = true
|
|
@@ -824,8 +828,6 @@ export default {
|
|
|
this.buttonLoading = false
|
|
|
})
|
|
|
}else{
|
|
|
- this.$set(this.form,"currency","USD")
|
|
|
- this.$set(this.form,"exchangeRate",6.3686)
|
|
|
//采购日期默认当天
|
|
|
let date = new Date();
|
|
|
let strDate = date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
|
|
@@ -857,17 +859,13 @@ export default {
|
|
|
this.$set(this.form,"invoiceWeight", invoiceList.reduce((n,m) => n + m))
|
|
|
this.$set(this.form,"billWeight", billList.reduce((n,m) => n + m))
|
|
|
},
|
|
|
- //汇率
|
|
|
+ //带出汇率
|
|
|
currencyChange(value){
|
|
|
- if(this.form.exchangeRate == 1 || this.form.exchangeRate == 6.368600 || this.form.exchangeRate == 7.174900){
|
|
|
- if(value == "CNY"){
|
|
|
- this.$set(this.form,"exchangeRate",1)
|
|
|
- }else if(value == "USD"){
|
|
|
- this.$set(this.form,"exchangeRate",6.368600)
|
|
|
- }else if(value == "EUR"){
|
|
|
- this.$set(this.form,"exchangeRate",7.174900)
|
|
|
+ this.currencyDic.forEach(item =>{
|
|
|
+ if(item.dictValue === value){
|
|
|
+ this.$set(this.form,"exchangeRate",item.remark)
|
|
|
}
|
|
|
- }
|
|
|
+ })
|
|
|
},
|
|
|
//单价
|
|
|
priceChange(row) {
|