|
@@ -57,6 +57,13 @@
|
|
|
:disabled="detailData.status == 1"
|
|
|
></crop-select>
|
|
|
</template>
|
|
|
+ <template slot="belongToCorpId">
|
|
|
+ <crop-select
|
|
|
+ v-model="form.belongToCorpId"
|
|
|
+ corpType="GS"
|
|
|
+ :disabled="detailData.status == 1"
|
|
|
+ ></crop-select>
|
|
|
+ </template>
|
|
|
<template slot="priceTerms">
|
|
|
<el-select
|
|
|
size="small"
|
|
@@ -91,9 +98,36 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</template>
|
|
|
+ <template slot="currency">
|
|
|
+ <el-select
|
|
|
+ size="small"
|
|
|
+ v-model="form.currency"
|
|
|
+ placeholder="请选择"
|
|
|
+ @change="currencyChange"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in currencyList"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.dictValue"
|
|
|
+ :value="item.dictValue"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ <template slot="exchangeRate">
|
|
|
+ <el-input
|
|
|
+ size="small"
|
|
|
+ v-model="form.exchangeRate"
|
|
|
+ oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d\d\d).*$/,
|
|
|
+ "$1.$2")'
|
|
|
+ placeholder="请输入 汇率"
|
|
|
+ :disabled="detailData.status == 1"
|
|
|
+ @change="exchangeRateChange"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
<template slot="boxNumber">
|
|
|
<el-input
|
|
|
- size="mini"
|
|
|
+ size="small"
|
|
|
v-model="form.boxNumber"
|
|
|
oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/,
|
|
|
"$1.$2")'
|
|
@@ -103,7 +137,7 @@
|
|
|
</template>
|
|
|
<template slot="minOrder">
|
|
|
<el-input
|
|
|
- size="mini"
|
|
|
+ size="small"
|
|
|
v-model="form.minOrder"
|
|
|
oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/,
|
|
|
"$1.$2")'
|
|
@@ -113,7 +147,7 @@
|
|
|
</template>
|
|
|
<template slot="predictOceanFreight">
|
|
|
<el-input
|
|
|
- size="mini"
|
|
|
+ size="small"
|
|
|
v-model="form.predictOceanFreight"
|
|
|
oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/,
|
|
|
"$1.$2")'
|
|
@@ -123,7 +157,7 @@
|
|
|
</template>
|
|
|
<template slot="referenceOceanFreight">
|
|
|
<el-input
|
|
|
- size="mini"
|
|
|
+ size="small"
|
|
|
v-model="form.referenceOceanFreight"
|
|
|
oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/,
|
|
|
"$1.$2")'
|
|
@@ -133,7 +167,7 @@
|
|
|
</template>
|
|
|
<template slot="oceanFreight">
|
|
|
<el-input
|
|
|
- size="mini"
|
|
|
+ size="small"
|
|
|
v-model="form.oceanFreight"
|
|
|
oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/,
|
|
|
"$1.$2")'
|
|
@@ -232,15 +266,23 @@
|
|
|
</el-select>
|
|
|
<span v-else>{{ row.itemType }}</span>
|
|
|
</template>
|
|
|
+ <template slot="itemProp" slot-scope="{ row, index }">
|
|
|
+ <span v-if="row.$cellEdit" style="display:flex">
|
|
|
+ <el-input
|
|
|
+ v-model="row.itemProp"
|
|
|
+ :readonly="true"
|
|
|
+ size="small"
|
|
|
+ placeholder="请点击右边按钮"
|
|
|
+ ></el-input>
|
|
|
+ <el-button
|
|
|
+ icon="el-icon-edit"
|
|
|
+ size="mini"
|
|
|
+ @click="openProperty(row, index)"
|
|
|
+ ></el-button>
|
|
|
+ </span>
|
|
|
+ <span v-else>{{ row.itemProp }}</span>
|
|
|
+ </template>
|
|
|
<template slot="cname" slot-scope="{ row, index }">
|
|
|
- <!-- <el-button
|
|
|
- size="small"
|
|
|
- type="text"
|
|
|
- @click="rePick(row, index)"
|
|
|
- :disabled="disabled"
|
|
|
- style="padding:4px 10px;float:left"
|
|
|
- >选择</el-button
|
|
|
- > -->
|
|
|
<span v-if="row.$cellEdit" style="display:flex">
|
|
|
<el-select
|
|
|
v-model="row.cname"
|
|
@@ -299,7 +341,7 @@
|
|
|
v-model="row.purchaseAmount"
|
|
|
size="small"
|
|
|
placeholder="请输入"
|
|
|
- @change="priceChange(row)"
|
|
|
+ @change="purchaseAmountChange(row)"
|
|
|
oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
|
|
|
></el-input>
|
|
|
<span v-else>{{ row.purchaseAmount | micrometerFormat }}</span>
|
|
@@ -395,7 +437,11 @@
|
|
|
<div>
|
|
|
<el-scrollbar>
|
|
|
<basic-container>
|
|
|
- <avue-tree :option="treeOption" @node-click="nodeClick" :style="treeStyle"/>
|
|
|
+ <avue-tree
|
|
|
+ :option="treeOption"
|
|
|
+ @node-click="nodeClick"
|
|
|
+ :style="treeStyle"
|
|
|
+ />
|
|
|
</basic-container>
|
|
|
</el-scrollbar>
|
|
|
</div>
|
|
@@ -440,6 +486,7 @@
|
|
|
@importPart="importPart"
|
|
|
@partClosed="partClosed"
|
|
|
/>
|
|
|
+ <property-dialog ref="property" @importProperty="importProperty" />
|
|
|
<price-library ref="library" @importLibray="importLibray" />
|
|
|
</div>
|
|
|
</template>
|
|
@@ -450,6 +497,7 @@ import goodsOption from "./config/commodity.json";
|
|
|
import feeInfo from "@/components/fee-info/main";
|
|
|
import customerDialog from "@/components/customer-dialog/main";
|
|
|
import partDialog from "@/components/part-dialog/main";
|
|
|
+import propertyDialog from "@/components/property-dialog/main";
|
|
|
import {
|
|
|
detail,
|
|
|
submit,
|
|
@@ -467,12 +515,18 @@ import priceLibrary from "@/components/price-Library/main";
|
|
|
import { isDiscount, isPercentage, micrometerFormat } from "@/util/validate";
|
|
|
import { contrastObj, contrastList } from "@/util/contrastData";
|
|
|
import { dateFormat } from "@/util/date";
|
|
|
-
|
|
|
+import {
|
|
|
+ productCal,
|
|
|
+ sellingCal,
|
|
|
+ amountCal,
|
|
|
+ transformCal
|
|
|
+} from "@/util/calculate";
|
|
|
import _ from "lodash";
|
|
|
export default {
|
|
|
name: "detailsPageEdit",
|
|
|
data() {
|
|
|
return {
|
|
|
+ oldExchange: 1,
|
|
|
treeStyle: "height:" + (window.innerHeight - 360) + "px",
|
|
|
itemtypeList: [],
|
|
|
configuration: {
|
|
@@ -516,6 +570,12 @@ export default {
|
|
|
disabled: true
|
|
|
},
|
|
|
{
|
|
|
+ label: "公司主体",
|
|
|
+ prop: "belongToCorpId",
|
|
|
+ span: 16,
|
|
|
+ row: true
|
|
|
+ },
|
|
|
+ {
|
|
|
label: "联系人",
|
|
|
prop: "corpAttn",
|
|
|
span: 8
|
|
@@ -635,20 +695,20 @@ export default {
|
|
|
label: "币别",
|
|
|
prop: "currency",
|
|
|
span: 8,
|
|
|
- type: "select",
|
|
|
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=currency",
|
|
|
- props: {
|
|
|
- label: "dictValue",
|
|
|
- value: "dictValue"
|
|
|
- },
|
|
|
- change: ({ value }) => {
|
|
|
- if (value == "CNY") {
|
|
|
- this.form.exchangeRate = 1;
|
|
|
- }
|
|
|
- if (value == "USD") {
|
|
|
- this.form.exchangeRate = 6.3843;
|
|
|
- }
|
|
|
- },
|
|
|
+ // type: "select",
|
|
|
+ // dicUrl: "/api/blade-system/dict-biz/dictionary?code=currency",
|
|
|
+ // props: {
|
|
|
+ // label: "dictValue",
|
|
|
+ // value: "dictValue"
|
|
|
+ // },
|
|
|
+ // change: ({ value }) => {
|
|
|
+ // if (value == "CNY") {
|
|
|
+ // this.form.exchangeRate = 1;
|
|
|
+ // }
|
|
|
+ // if (value == "USD") {
|
|
|
+ // this.form.exchangeRate = 6.3843;
|
|
|
+ // }
|
|
|
+ // },
|
|
|
rules: [
|
|
|
{
|
|
|
required: true,
|
|
@@ -789,7 +849,8 @@ export default {
|
|
|
partList: [],
|
|
|
goodsoptions: [],
|
|
|
priceTermsList: [],
|
|
|
- paymentTermList: []
|
|
|
+ paymentTermList: [],
|
|
|
+ currencyList: []
|
|
|
};
|
|
|
},
|
|
|
props: {
|
|
@@ -802,7 +863,8 @@ export default {
|
|
|
feeInfo,
|
|
|
customerDialog,
|
|
|
partDialog,
|
|
|
- priceLibrary
|
|
|
+ priceLibrary,
|
|
|
+ propertyDialog
|
|
|
},
|
|
|
async created() {
|
|
|
if (this.detailData.id) {
|
|
@@ -833,6 +895,9 @@ export default {
|
|
|
this.getWorkDicts("payment_term").then(res => {
|
|
|
this.paymentTermList = res.data.data;
|
|
|
});
|
|
|
+ this.getWorkDicts("currency").then(res => {
|
|
|
+ this.currencyList = res.data.data;
|
|
|
+ });
|
|
|
getPorts().then(res => {
|
|
|
this.findObject(this.option.column, "portOfLoad").dicData = res.data;
|
|
|
this.findObject(this.option.column, "portOfDestination").dicData =
|
|
@@ -859,6 +924,24 @@ export default {
|
|
|
},
|
|
|
getCorpData(row) {
|
|
|
this.form.coefficient = row.coefficient;
|
|
|
+ if (this.data.length > 0) {
|
|
|
+ this.data.forEach(e => {
|
|
|
+ e.productPrice = productCal(e.purchaseAmount, this.form.coefficient);
|
|
|
+ e.price = sellingCal(
|
|
|
+ e.productPrice,
|
|
|
+ e.partsPrice,
|
|
|
+ this.form.coefficient,
|
|
|
+ this.form.exchangeRate
|
|
|
+ );
|
|
|
+ e.amount = amountCal(
|
|
|
+ e.price,
|
|
|
+ e.orderQuantity,
|
|
|
+ e.freight,
|
|
|
+ e.insurance,
|
|
|
+ e.discount
|
|
|
+ );
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
rowCorpData(row) {
|
|
|
this.data[row.index].corpName = row.cname;
|
|
@@ -930,48 +1013,23 @@ export default {
|
|
|
this.data[index].partsList = rows;
|
|
|
this.data[index].partsPrice = sum;
|
|
|
// 销售价=(配件采购价格+产品价格)/汇率 *(1+客户FOB系数/100)
|
|
|
- // this.data[index].price=_.multiply(multiplier, multiplicand)
|
|
|
- this.data[index].productPrice = Number(
|
|
|
- _.multiply(
|
|
|
- _.add(
|
|
|
- Number(sum),
|
|
|
- Number(
|
|
|
- this.data[index].purchaseAmount
|
|
|
- ? this.data[index].purchaseAmount
|
|
|
- : 0
|
|
|
- )
|
|
|
- ),
|
|
|
- _.add(
|
|
|
- 1,
|
|
|
- _.divide(
|
|
|
- Number(this.form.coefficient ? this.form.coefficient : 0),
|
|
|
- 100
|
|
|
- )
|
|
|
- )
|
|
|
- )
|
|
|
- ).toFixed(2);
|
|
|
- this.data[index].price = Number(
|
|
|
- _.divide(
|
|
|
- _.multiply(
|
|
|
- _.add(
|
|
|
- Number(sum),
|
|
|
- Number(
|
|
|
- this.data[index].purchaseAmount
|
|
|
- ? this.data[index].purchaseAmount
|
|
|
- : 0
|
|
|
- )
|
|
|
- ),
|
|
|
- _.add(
|
|
|
- 1,
|
|
|
- _.divide(
|
|
|
- Number(this.form.coefficient ? this.form.coefficient : 0),
|
|
|
- 100
|
|
|
- )
|
|
|
- )
|
|
|
- ),
|
|
|
- Number(this.form.exchangeRate ? this.form.exchangeRate : 1)
|
|
|
- )
|
|
|
- ).toFixed(2);
|
|
|
+ this.data[index].productPrice = productCal(
|
|
|
+ this.data[index].purchaseAmount,
|
|
|
+ this.form.coefficient
|
|
|
+ );
|
|
|
+ this.data[index].price = sellingCal(
|
|
|
+ this.data[index].productPrice,
|
|
|
+ this.data[index].partsPrice,
|
|
|
+ this.form.coefficient,
|
|
|
+ this.form.exchangeRate
|
|
|
+ );
|
|
|
+ this.data[index].amount = amountCal(
|
|
|
+ this.data[index].price,
|
|
|
+ this.data[index].orderQuantity,
|
|
|
+ this.data[index].freight,
|
|
|
+ this.data[index].insurance,
|
|
|
+ this.data[index].discount
|
|
|
+ );
|
|
|
const names = [];
|
|
|
const namePrices = [];
|
|
|
rows.map(e => {
|
|
@@ -982,6 +1040,20 @@ export default {
|
|
|
this.data[index].partsPriceDescribe = namePrices.join(";");
|
|
|
this.priceChange(this.data[index]);
|
|
|
},
|
|
|
+ importProperty(row, index) {
|
|
|
+ const arr = [];
|
|
|
+ for (let key in row) {
|
|
|
+ if (row[key]) {
|
|
|
+ arr.push(row[key]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.data[index].itemProp = arr.join(",");
|
|
|
+ this.data[index].remarksOne = row.remarksOne;
|
|
|
+ this.data[index].customTwo = row.customTwo;
|
|
|
+ this.data[index].customThree = row.customThree;
|
|
|
+ this.data[index].customFour = row.customFour;
|
|
|
+ this.data[index].customFive = row.customFive;
|
|
|
+ },
|
|
|
partClosed() {
|
|
|
this.partList = [];
|
|
|
},
|
|
@@ -999,56 +1071,89 @@ export default {
|
|
|
this.itemtypeList = data.map(item => ({ value: item }));
|
|
|
});
|
|
|
},
|
|
|
+ purchaseAmountChange(row) {
|
|
|
+ row.productPrice = productCal(row.purchaseAmount, this.form.coefficient);
|
|
|
+ row.price = sellingCal(
|
|
|
+ row.productPrice,
|
|
|
+ row.partsPrice,
|
|
|
+ this.form.coefficient,
|
|
|
+ this.form.exchangeRate
|
|
|
+ );
|
|
|
+ row.amount = amountCal(
|
|
|
+ row.price,
|
|
|
+ row.orderQuantity,
|
|
|
+ row.freight,
|
|
|
+ row.insurance,
|
|
|
+ row.discount
|
|
|
+ );
|
|
|
+ },
|
|
|
priceChange(row) {
|
|
|
- const sum = _.multiply(
|
|
|
- _.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)
|
|
|
- )
|
|
|
- )
|
|
|
- ),
|
|
|
- _.divide(row.discount ? row.discount : 10, 10)
|
|
|
+ row.amount = amountCal(
|
|
|
+ row.price,
|
|
|
+ row.orderQuantity,
|
|
|
+ row.freight,
|
|
|
+ row.insurance,
|
|
|
+ row.discount
|
|
|
);
|
|
|
- row.amount = Number(sum ? sum : 0).toFixed(2);
|
|
|
- // let amountSum = 0;
|
|
|
- // let purchaseAmountSum = 0;
|
|
|
- // let grossProfitRate = 0;
|
|
|
- // let grossProfit = 0;
|
|
|
- // this.data.forEach(e => {
|
|
|
- // amountSum = _.add(amountSum, Number(e.amount));
|
|
|
- // purchaseAmountSum = _.add(
|
|
|
- // purchaseAmountSum,
|
|
|
- // Number(
|
|
|
- // _.multiply(
|
|
|
- // Number(e.purchaseAmount ? e.purchaseAmount : 0),
|
|
|
- // Number(e.orderQuantity)
|
|
|
- // )
|
|
|
- // )
|
|
|
- // );
|
|
|
- // grossProfit = _.subtract(amountSum, purchaseAmountSum);
|
|
|
- // grossProfitRate =
|
|
|
- // amountSum != 0
|
|
|
- // ? _.multiply(
|
|
|
- // _.divide(_.subtract(amountSum, purchaseAmountSum), amountSum),
|
|
|
- // 100
|
|
|
- // )
|
|
|
- // : 0;
|
|
|
- // this.form.grossProfit = Number(grossProfit ? grossProfit : 0).toFixed(
|
|
|
- // 2
|
|
|
- // );
|
|
|
-
|
|
|
- // this.form.grossProfitRate = Number(
|
|
|
- // grossProfitRate ? grossProfitRate : 0
|
|
|
- // ).toFixed(2);
|
|
|
- // });
|
|
|
+ },
|
|
|
+ currencyChange(row) {
|
|
|
+ if (row == "CNY") {
|
|
|
+ this.form.exchangeRate = 1;
|
|
|
+ } else if (row == "USD") {
|
|
|
+ this.form.exchangeRate = 6.3843;
|
|
|
+ } else {
|
|
|
+ this.form.exchangeRate = 1;
|
|
|
+ }
|
|
|
+ if (this.data.length > 0) {
|
|
|
+ this.data.forEach(e => {
|
|
|
+ e.freight = transformCal(
|
|
|
+ e.freight,
|
|
|
+ this.oldExchange,
|
|
|
+ this.form.exchangeRate
|
|
|
+ );
|
|
|
+ e.insurance = transformCal(
|
|
|
+ e.insurance,
|
|
|
+ this.oldExchange,
|
|
|
+ this.form.exchangeRate
|
|
|
+ );
|
|
|
+ e.price = sellingCal(
|
|
|
+ e.productPrice,
|
|
|
+ e.partsPrice,
|
|
|
+ this.form.coefficient,
|
|
|
+ this.form.exchangeRate
|
|
|
+ );
|
|
|
+ e.amount = amountCal(
|
|
|
+ e.price,
|
|
|
+ e.orderQuantity,
|
|
|
+ e.freight,
|
|
|
+ e.insurance,
|
|
|
+ e.discount
|
|
|
+ );
|
|
|
+ });
|
|
|
+ }
|
|
|
+ this.oldExchange = this.deepClone(this.form.exchangeRate);
|
|
|
+ },
|
|
|
+ exchangeRateChange(row) {
|
|
|
+ if (this.data.length > 0) {
|
|
|
+ this.data.forEach(e => {
|
|
|
+ e.freight = transformCal(e.freight, this.oldExchange, row);
|
|
|
+ e.insurance = transformCal(e.insurance, this.oldExchange, row);
|
|
|
+ e.price = sellingCal(
|
|
|
+ e.productPrice,
|
|
|
+ e.partsPrice,
|
|
|
+ this.form.coefficient,
|
|
|
+ row
|
|
|
+ );
|
|
|
+ e.amount = amountCal(
|
|
|
+ e.price,
|
|
|
+ e.orderQuantity,
|
|
|
+ e.freight,
|
|
|
+ e.insurance,
|
|
|
+ e.discount
|
|
|
+ );
|
|
|
+ });
|
|
|
+ }
|
|
|
+ this.oldExchange = this.deepClone(row);
|
|
|
},
|
|
|
discountChange(row) {
|
|
|
if (row.discount >= 10) {
|
|
@@ -1141,6 +1246,11 @@ export default {
|
|
|
item.priceCategory = e.goodsTypeName;
|
|
|
item.itemUrl = e.url;
|
|
|
item.itemProp = this.reData.itemProp;
|
|
|
+ item.remarksOne = this.reData.remarksOne;
|
|
|
+ item.customTwo = this.reData.customTwo;
|
|
|
+ item.customThree = this.reData.customThree;
|
|
|
+ item.customFour = this.reData.customFour;
|
|
|
+ item.customFive = this.reData.customFive;
|
|
|
item.partsList = this.reData.partsList;
|
|
|
item.partsPrice = this.reData.ppartsPrice;
|
|
|
item.itemDescription = e.cnameDescription;
|
|
@@ -1169,6 +1279,11 @@ export default {
|
|
|
priceCategory: e.goodsTypeName,
|
|
|
itemUrl: e.url,
|
|
|
itemProp: null,
|
|
|
+ remarksOne: null,
|
|
|
+ customTwo: null,
|
|
|
+ customThree: null,
|
|
|
+ customFour: null,
|
|
|
+ customFive: null,
|
|
|
itemDescription: e.cnameDescription,
|
|
|
partsList: [],
|
|
|
partsPrice: 0,
|
|
@@ -1229,7 +1344,12 @@ export default {
|
|
|
cname: e.cname,
|
|
|
priceCategory: e.goodsTypeName,
|
|
|
purchaseAmount: e.purchaseAmount,
|
|
|
- itemProp: e.goodNature,
|
|
|
+ itemProp: null,
|
|
|
+ remarksOne: null,
|
|
|
+ customTwo: null,
|
|
|
+ customThree: null,
|
|
|
+ customFour: null,
|
|
|
+ customFive: null,
|
|
|
corpId: e.corpId,
|
|
|
corpName: e.corpName,
|
|
|
itemDescription: e.cnameDescription,
|
|
@@ -1237,28 +1357,23 @@ export default {
|
|
|
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),
|
|
|
+ productPrice: productCal(e.purchaseAmount, this.form.coefficient),
|
|
|
+ price: sellingCal(
|
|
|
+ productCal(e.purchaseAmount, this.form.coefficient),
|
|
|
+ 0,
|
|
|
+ this.form.coefficient,
|
|
|
+ this.form.exchangeRate
|
|
|
+ ),
|
|
|
orderQuantity: 1,
|
|
|
insurance: 0,
|
|
|
freight: 0,
|
|
|
discount: null,
|
|
|
- amount: Number(
|
|
|
- _.multiply(
|
|
|
- Number(e.purchaseAmount),
|
|
|
- Number(_.add(1, _.divide(Number(this.form.coefficient), 100)))
|
|
|
- )
|
|
|
- ).toFixed(2),
|
|
|
+ amount: sellingCal(
|
|
|
+ productCal(e.purchaseAmount, this.form.coefficient),
|
|
|
+ 0,
|
|
|
+ this.form.coefficient,
|
|
|
+ this.form.exchangeRate
|
|
|
+ ),
|
|
|
taxRate: 0,
|
|
|
unit: e.unit,
|
|
|
remarks: null,
|
|
@@ -1285,6 +1400,7 @@ export default {
|
|
|
this.oldform = res.data.data;
|
|
|
this.olddata = this.deepClone(res.data.data.orderItemsList);
|
|
|
this.oldorderFeesList = this.deepClone(res.data.data.orderFeesList);
|
|
|
+ this.oldExchange = this.deepClone(this.form.exchangeRate);
|
|
|
})
|
|
|
.finally(() => {
|
|
|
this.loading = false;
|
|
@@ -1333,6 +1449,7 @@ export default {
|
|
|
this.oldorderFeesList = this.deepClone(
|
|
|
res.data.data.orderFeesList
|
|
|
);
|
|
|
+ this.oldExchange = this.deepClone(this.form.exchangeRate);
|
|
|
if (status == "goBack") {
|
|
|
this.$emit("goBack");
|
|
|
}
|
|
@@ -1372,6 +1489,9 @@ export default {
|
|
|
openReport() {
|
|
|
this.switchDialog = !this.switchDialog;
|
|
|
},
|
|
|
+ openProperty(row, index) {
|
|
|
+ this.$refs.property.init(row, index);
|
|
|
+ },
|
|
|
onClose(val) {
|
|
|
this.switchDialog = val;
|
|
|
},
|