|  | @@ -484,7 +484,9 @@ export default {
 | 
	
		
			
				|  |  |        switchDialog: false,
 | 
	
		
			
				|  |  |        form: {
 | 
	
		
			
				|  |  |          orderStatus: "录入",
 | 
	
		
			
				|  |  | -        businesDate: dateFormat(new Date(), "yyyy-MM-dd") + " 00:00:00"
 | 
	
		
			
				|  |  | +        businesDate: dateFormat(new Date(), "yyyy-MM-dd") + " 00:00:00",
 | 
	
		
			
				|  |  | +        currency: "CNY",
 | 
	
		
			
				|  |  | +        exchangeRate: "1"
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        disabled: false,
 | 
	
		
			
				|  |  |        dialogVisible: false,
 | 
	
	
		
			
				|  | @@ -766,7 +768,9 @@ export default {
 | 
	
		
			
				|  |  |        orderFeesList: [],
 | 
	
		
			
				|  |  |        oldform: {
 | 
	
		
			
				|  |  |          orderStatus: "录入",
 | 
	
		
			
				|  |  | -        businesDate: dateFormat(new Date(), "yyyy-MM-dd") + " 00:00:00"
 | 
	
		
			
				|  |  | +        businesDate: dateFormat(new Date(), "yyyy-MM-dd") + " 00:00:00",
 | 
	
		
			
				|  |  | +        currency: "CNY",
 | 
	
		
			
				|  |  | +        exchangeRate: "1"
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        olddata: [],
 | 
	
		
			
				|  |  |        oldorderFeesList: [],
 | 
	
	
		
			
				|  | @@ -866,6 +870,9 @@ export default {
 | 
	
		
			
				|  |  |        if (!this.form.corpId) {
 | 
	
		
			
				|  |  |          return this.$message.error("请选择客户名称");
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  | +      if (!this.form.currency) {
 | 
	
		
			
				|  |  | +        return this.$message.error("请选择币别");
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  |        this.$refs.library.init(this.partType, this.partreData != null);
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      rowCorpdata(row) {
 | 
	
	
		
			
				|  | @@ -922,6 +929,29 @@ export default {
 | 
	
		
			
				|  |  |      importPart(rows, sum, index) {
 | 
	
		
			
				|  |  |        this.data[index].partsList = rows;
 | 
	
		
			
				|  |  |        this.data[index].partsPrice = sum;
 | 
	
		
			
				|  |  | +      // 销售价=(配件采购价格+产品价格)/汇率 *(1+客户FOB系数/100)
 | 
	
		
			
				|  |  | +      // this.data[index].price=_.multiply(multiplier, multiplicand)
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      this.data[index].price = Number(
 | 
	
		
			
				|  |  | +        _.multiply(
 | 
	
		
			
				|  |  | +          _.divide(
 | 
	
		
			
				|  |  | +            _.add(
 | 
	
		
			
				|  |  | +              Number(sum),
 | 
	
		
			
				|  |  | +              Number(
 | 
	
		
			
				|  |  | +                this.data[index].partsPrice ? this.data[index].partsPrice : 0
 | 
	
		
			
				|  |  | +              )
 | 
	
		
			
				|  |  | +            ),
 | 
	
		
			
				|  |  | +            Number(this.form.exchangeRate ? this.form.exchangeRate : 1)
 | 
	
		
			
				|  |  | +          ),
 | 
	
		
			
				|  |  | +          _.add(
 | 
	
		
			
				|  |  | +            1,
 | 
	
		
			
				|  |  | +            _.divide(
 | 
	
		
			
				|  |  | +              Number(this.form.coefficient ? this.form.coefficient : 0),
 | 
	
		
			
				|  |  | +              100
 | 
	
		
			
				|  |  | +            )
 | 
	
		
			
				|  |  | +          )
 | 
	
		
			
				|  |  | +        )
 | 
	
		
			
				|  |  | +      ).toFixed(2);
 | 
	
		
			
				|  |  |        const names = [];
 | 
	
		
			
				|  |  |        const namePrices = [];
 | 
	
		
			
				|  |  |        rows.map(e => {
 | 
	
	
		
			
				|  | @@ -959,21 +989,18 @@ export default {
 | 
	
		
			
				|  |  |      priceChange(row) {
 | 
	
		
			
				|  |  |        const sum = _.multiply(
 | 
	
		
			
				|  |  |          _.add(
 | 
	
		
			
				|  |  | -          _.add(
 | 
	
		
			
				|  |  | -            Number(
 | 
	
		
			
				|  |  | -              _.multiply(
 | 
	
		
			
				|  |  | -                row.price ? row.price : 0,
 | 
	
		
			
				|  |  | -                row.orderQuantity ? row.orderQuantity : 0
 | 
	
		
			
				|  |  | -              )
 | 
	
		
			
				|  |  | -            ),
 | 
	
		
			
				|  |  | -            Number(
 | 
	
		
			
				|  |  | -              _.add(
 | 
	
		
			
				|  |  | -                Number(row.insurance ? row.insurance : 0),
 | 
	
		
			
				|  |  | -                Number(row.freight ? row.freight : 0)
 | 
	
		
			
				|  |  | -              )
 | 
	
		
			
				|  |  | +          Number(
 | 
	
		
			
				|  |  | +            _.multiply(
 | 
	
		
			
				|  |  | +              row.price ? row.price : 0,
 | 
	
		
			
				|  |  | +              row.orderQuantity ? row.orderQuantity : 0
 | 
	
		
			
				|  |  |              )
 | 
	
		
			
				|  |  |            ),
 | 
	
		
			
				|  |  | -          Number(row.partsPrice ? row.partsPrice : 0)
 | 
	
		
			
				|  |  | +          Number(
 | 
	
		
			
				|  |  | +            _.add(
 | 
	
		
			
				|  |  | +              Number(row.insurance ? row.insurance : 0),
 | 
	
		
			
				|  |  | +              Number(row.freight ? row.freight : 0)
 | 
	
		
			
				|  |  | +            )
 | 
	
		
			
				|  |  | +          )
 | 
	
		
			
				|  |  |          ),
 | 
	
		
			
				|  |  |          _.divide(row.discount ? row.discount : 10, 10)
 | 
	
		
			
				|  |  |        );
 | 
	
	
		
			
				|  | @@ -1214,8 +1241,8 @@ export default {
 | 
	
		
			
				|  |  |                goodTypeName: e.goodsTypeName,
 | 
	
		
			
				|  |  |                goodName: e.cname,
 | 
	
		
			
				|  |  |                price: e.purchaseAmount,
 | 
	
		
			
				|  |  | -              goodNumber: 0,
 | 
	
		
			
				|  |  | -              amout: 0,
 | 
	
		
			
				|  |  | +              goodNumber: 1,
 | 
	
		
			
				|  |  | +              amout: e.purchaseAmount,
 | 
	
		
			
				|  |  |                $cellEdit: true
 | 
	
		
			
				|  |  |              });
 | 
	
		
			
				|  |  |            });
 | 
	
	
		
			
				|  | @@ -1231,22 +1258,33 @@ export default {
 | 
	
		
			
				|  |  |              itemProp: e.goodNature,
 | 
	
		
			
				|  |  |              corpId: e.corpId,
 | 
	
		
			
				|  |  |              corpName: e.corpName,
 | 
	
		
			
				|  |  | -            itemDescription:e.cnameDescription,
 | 
	
		
			
				|  |  | +            itemDescription: e.cnameDescription,
 | 
	
		
			
				|  |  |              partsList: [],
 | 
	
		
			
				|  |  |              partsPrice: 0,
 | 
	
		
			
				|  |  |              itemType: e.specs,
 | 
	
		
			
				|  |  |              tradeTerms: null,
 | 
	
		
			
				|  |  | +            productPrice: Number(
 | 
	
		
			
				|  |  | +              _.multiply(
 | 
	
		
			
				|  |  | +                Number(e.purchaseAmount),
 | 
	
		
			
				|  |  | +                Number(_.add(1, _.divide(Number(this.form.coefficient), 100)))
 | 
	
		
			
				|  |  | +              )
 | 
	
		
			
				|  |  | +            ).toFixed(2),
 | 
	
		
			
				|  |  |              price: Number(
 | 
	
		
			
				|  |  |                _.multiply(
 | 
	
		
			
				|  |  |                  Number(e.purchaseAmount),
 | 
	
		
			
				|  |  |                  Number(_.add(1, _.divide(Number(this.form.coefficient), 100)))
 | 
	
		
			
				|  |  |                )
 | 
	
		
			
				|  |  |              ).toFixed(2),
 | 
	
		
			
				|  |  | -            orderQuantity: 0,
 | 
	
		
			
				|  |  | +            orderQuantity: 1,
 | 
	
		
			
				|  |  |              insurance: 0,
 | 
	
		
			
				|  |  |              freight: 0,
 | 
	
		
			
				|  |  |              discount: null,
 | 
	
		
			
				|  |  | -            amount: 0,
 | 
	
		
			
				|  |  | +            amount: Number(
 | 
	
		
			
				|  |  | +              _.multiply(
 | 
	
		
			
				|  |  | +                Number(e.purchaseAmount),
 | 
	
		
			
				|  |  | +                Number(_.add(1, _.divide(Number(this.form.coefficient), 100)))
 | 
	
		
			
				|  |  | +              )
 | 
	
		
			
				|  |  | +            ).toFixed(2),
 | 
	
		
			
				|  |  |              taxRate: 0,
 | 
	
		
			
				|  |  |              unit: e.unit,
 | 
	
		
			
				|  |  |              remarks: null,
 |