|
@@ -118,8 +118,7 @@
|
|
|
<el-input
|
|
|
size="small"
|
|
|
v-model="form.exchangeRate"
|
|
|
- oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d\d\d).*$/,
|
|
|
- "$1.$2")'
|
|
|
+ oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
|
|
|
placeholder="请输入 汇率"
|
|
|
:disabled="detailData.status == 1"
|
|
|
@change="exchangeRateChange"
|
|
@@ -129,8 +128,7 @@
|
|
|
<el-input
|
|
|
size="small"
|
|
|
v-model="form.boxNumber"
|
|
|
- oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/,
|
|
|
- "$1.$2")'
|
|
|
+ oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
|
|
|
placeholder="请输入 起订量"
|
|
|
:disabled="detailData.status == 1"
|
|
|
/>
|
|
@@ -139,8 +137,7 @@
|
|
|
<el-input
|
|
|
size="small"
|
|
|
v-model="form.minOrder"
|
|
|
- oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/,
|
|
|
- "$1.$2")'
|
|
|
+ oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
|
|
|
placeholder="请输入 起订量"
|
|
|
:disabled="detailData.status == 1"
|
|
|
/>
|
|
@@ -149,8 +146,7 @@
|
|
|
<el-input
|
|
|
size="small"
|
|
|
v-model="form.predictOceanFreight"
|
|
|
- oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/,
|
|
|
- "$1.$2")'
|
|
|
+ oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
|
|
|
placeholder="请输入 预计海运费"
|
|
|
:disabled="detailData.status == 1"
|
|
|
/>
|
|
@@ -159,8 +155,7 @@
|
|
|
<el-input
|
|
|
size="small"
|
|
|
v-model="form.referenceOceanFreight"
|
|
|
- oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/,
|
|
|
- "$1.$2")'
|
|
|
+ oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
|
|
|
placeholder="请输入 参考海运费"
|
|
|
:disabled="detailData.status == 1"
|
|
|
/>
|
|
@@ -169,8 +164,7 @@
|
|
|
<el-input
|
|
|
size="small"
|
|
|
v-model="form.oceanFreight"
|
|
|
- oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/,
|
|
|
- "$1.$2")'
|
|
|
+ oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
|
|
|
placeholder="请输入 实际海运费"
|
|
|
:disabled="detailData.status == 1"
|
|
|
/>
|
|
@@ -342,7 +336,7 @@
|
|
|
size="small"
|
|
|
placeholder="请输入"
|
|
|
@change="purchaseAmountChange(row)"
|
|
|
- oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
|
|
|
+ oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
|
|
|
></el-input>
|
|
|
<span v-else>{{ row.purchaseAmount | micrometerFormat }}</span>
|
|
|
</template>
|
|
@@ -351,7 +345,7 @@
|
|
|
v-if="row.$cellEdit"
|
|
|
v-model="row.price"
|
|
|
size="small"
|
|
|
- oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
|
|
|
+ oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
|
|
|
@change="priceChange(row)"
|
|
|
></el-input>
|
|
|
<span v-else>{{ row.price | micrometerFormat }}</span>
|
|
@@ -364,7 +358,7 @@
|
|
|
v-if="row.$cellEdit"
|
|
|
v-model="row.orderQuantity"
|
|
|
size="small"
|
|
|
- oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
|
|
|
+ oninput='this.value=this.value.replace(/[^(\d)]/g,"")'
|
|
|
@change="priceChange(row)"
|
|
|
></el-input>
|
|
|
<span v-else>{{ row.orderQuantity }}</span>
|
|
@@ -374,7 +368,7 @@
|
|
|
v-if="row.$cellEdit"
|
|
|
v-model="row.discount"
|
|
|
size="small"
|
|
|
- oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
|
|
|
+ oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
|
|
|
@change="discountChange(row)"
|
|
|
></el-input>
|
|
|
<span v-else>{{ row.discount | isDiscount }}</span>
|
|
@@ -384,7 +378,7 @@
|
|
|
v-if="row.$cellEdit"
|
|
|
v-model="row.insurance"
|
|
|
size="small"
|
|
|
- oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
|
|
|
+ oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
|
|
|
@change="priceChange(row)"
|
|
|
></el-input>
|
|
|
<span v-else>{{ row.insurance | micrometerFormat }}</span>
|
|
@@ -394,7 +388,7 @@
|
|
|
v-if="row.$cellEdit"
|
|
|
v-model="row.freight"
|
|
|
size="small"
|
|
|
- oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
|
|
|
+ oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
|
|
|
@change="priceChange(row)"
|
|
|
></el-input>
|
|
|
<span v-else>{{ row.freight | micrometerFormat }}</span>
|
|
@@ -404,7 +398,7 @@
|
|
|
v-if="row.$cellEdit"
|
|
|
v-model="row.taxRate"
|
|
|
size="small"
|
|
|
- oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
|
|
|
+ oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
|
|
|
@change="taxRateChange(row)"
|
|
|
></el-input>
|
|
|
<span v-else>{{ row.taxRate | isPercentage }}</span>
|
|
@@ -530,19 +524,11 @@ export default {
|
|
|
oldExchange: 1,
|
|
|
treeStyle: "height:" + (window.innerHeight - 315) + "px",
|
|
|
itemtypeList: [],
|
|
|
- configuration: {
|
|
|
- multipleChoices: false,
|
|
|
- multiple: false,
|
|
|
- collapseTags: false,
|
|
|
- placeholder: "请点击右边按钮选择",
|
|
|
- dicData: []
|
|
|
- },
|
|
|
switchDialog: false,
|
|
|
form: {
|
|
|
orderStatus: "录入",
|
|
|
businesDate: dateFormat(new Date(), "yyyy-MM-dd") + " 00:00:00",
|
|
|
- currency: "CNY",
|
|
|
- exchangeRate: "1"
|
|
|
+ currency: "USD"
|
|
|
},
|
|
|
disabled: false,
|
|
|
dialogVisible: false,
|
|
@@ -665,7 +651,7 @@ export default {
|
|
|
span: 16
|
|
|
},
|
|
|
{
|
|
|
- label: "订单日期",
|
|
|
+ label: "报价日期",
|
|
|
prop: "businesDate",
|
|
|
span: 8,
|
|
|
type: "date",
|
|
@@ -747,20 +733,25 @@ export default {
|
|
|
span: 8
|
|
|
},
|
|
|
{
|
|
|
- label: "毛利额",
|
|
|
+ label: "产品毛利",
|
|
|
prop: "grossProfit",
|
|
|
span: 8,
|
|
|
disabled: true
|
|
|
},
|
|
|
{
|
|
|
- label: "毛利率",
|
|
|
+ label: "产品利率",
|
|
|
prop: "grossProfitRate",
|
|
|
span: 8,
|
|
|
- row: true,
|
|
|
append: "%",
|
|
|
disabled: true
|
|
|
},
|
|
|
{
|
|
|
+ label: "单票毛利",
|
|
|
+ prop: "singleTicketMargin",
|
|
|
+ span: 8,
|
|
|
+ disabled: true
|
|
|
+ },
|
|
|
+ {
|
|
|
label: "备注",
|
|
|
prop: "orderRemark",
|
|
|
type: "textarea",
|
|
@@ -822,8 +813,7 @@ export default {
|
|
|
oldform: {
|
|
|
orderStatus: "录入",
|
|
|
businesDate: dateFormat(new Date(), "yyyy-MM-dd") + " 00:00:00",
|
|
|
- currency: "CNY",
|
|
|
- exchangeRate: "1"
|
|
|
+ currency: "USD"
|
|
|
},
|
|
|
olddata: [],
|
|
|
oldorderFeesList: [],
|
|
@@ -883,6 +873,14 @@ export default {
|
|
|
});
|
|
|
this.getWorkDicts("currency").then(res => {
|
|
|
this.currencyList = res.data.data;
|
|
|
+ if (!this.detailData.id) {
|
|
|
+ this.currencyList.forEach(e => {
|
|
|
+ if (e.dictValue == "USD") {
|
|
|
+ this.form.exchangeRate = e.remark;
|
|
|
+ this.oldform.exchangeRate = e.remark;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
});
|
|
|
getPorts().then(res => {
|
|
|
this.findObject(this.option.column, "portOfLoad").dicData = res.data;
|
|
@@ -1083,13 +1081,11 @@ export default {
|
|
|
);
|
|
|
},
|
|
|
currencyChange(row) {
|
|
|
- if (row == "CNY") {
|
|
|
- this.form.exchangeRate = 1;
|
|
|
- } else if (row == "USD") {
|
|
|
- this.form.exchangeRate = 6.3843;
|
|
|
- } else {
|
|
|
- this.form.exchangeRate = 1;
|
|
|
- }
|
|
|
+ this.currencyList.forEach(e => {
|
|
|
+ if (e.dictValue == row) {
|
|
|
+ this.form.exchangeRate = e.remark;
|
|
|
+ }
|
|
|
+ });
|
|
|
if (this.data.length > 0) {
|
|
|
this.data.forEach(e => {
|
|
|
e.freight = transformCal(
|