Commit 2151c5de by wangzhihui

bug修复

1 parent 0dc8b187
...@@ -174,17 +174,20 @@ export default { ...@@ -174,17 +174,20 @@ export default {
let merchantNos = [] let merchantNos = []
this.conditionData.metricRuleList.forEach((item) => { this.conditionData.metricRuleList.forEach((item) => {
if (item.active) { if (item.active) {
if (item.merchantNos && item.merchantNos.length) { console.log(item)
merchantNos.push(...item.merchantNos) if (!item.merchantNos || item.merchantNos.length == 0) {
item.merchantNos = [-1]
} }
merchantNos.push(item.merchantNos.join(","))
} }
}) })
console.log(merchantNos)
if (merchantNos.length > 0) { if (merchantNos.length > 0) {
this.$refs.editFormRef.$refs[this.handleFormRef].clearValidate( this.$refs.editFormRef.$refs[this.handleFormRef].clearValidate(
`merchantNos` `merchantNos`
) )
} }
this.coustomForm.merchantNos = merchantNos.join(",") this.coustomForm.merchantNos = merchantNos
}, },
handleData(val) { handleData(val) {
this.coustomForm.brandId = val.id this.coustomForm.brandId = val.id
......
...@@ -109,7 +109,7 @@ ${this.title}:${ ...@@ -109,7 +109,7 @@ ${this.title}:${
: rate.indexOf("-") > -1 : rate.indexOf("-") > -1
? "#2CCA74" ? "#2CCA74"
: "#EB4E4E" : "#EB4E4E"
}">${rate == "null" ? "-" : rate ? rate : 0}${ }">${rate == "null" ? "-" : rate ? rate + "%" : 0 + "%"}${
rate == "null" || rate == 0 rate == "null" || rate == 0
? "" ? ""
: rate.indexOf("-") > -1 : rate.indexOf("-") > -1
......
...@@ -120,7 +120,7 @@ ${this.title}:${ ...@@ -120,7 +120,7 @@ ${this.title}:${
: rate.indexOf("-") > -1 : rate.indexOf("-") > -1
? "#2CCA74" ? "#2CCA74"
: "#EB4E4E" : "#EB4E4E"
}">${rate == "null" ? "-" : rate ? rate : 0}${ }">${rate == "null" ? "-" : rate ? rate + "%" : 0 + "%"}${
rate == "null" || rate == 0 rate == "null" || rate == 0
? "" ? ""
: rate.indexOf("-") > -1 : rate.indexOf("-") > -1
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
></div> ></div>
<template <template
v-if=" v-if="
item.key == 'merchantNames' || item.key == 'superiors' item.key == 'merchantName' || item.key == 'superiors'
" "
> >
<template <template
...@@ -99,8 +99,15 @@ ...@@ -99,8 +99,15 @@
> >
<div slot="OutputValue" slot-scope="scope"> <div slot="OutputValue" slot-scope="scope">
<div> <div>
¥{{ scope.scope.lastOutputValue || "-" }} → ¥{{ ¥{{
scope.scope.currentOutputValue || "-" scope.scope.lastOutputValue === 0
? 0
: scope.scope.lastOutputValue || "-"
}}
→ ¥{{
scope.scope.currentOutputValue === 0
? 0
: scope.scope.currentOutputValue || "-"
}} }}
</div> </div>
<div <div
...@@ -113,14 +120,24 @@ ...@@ -113,14 +120,24 @@
: '' : ''
]" ]"
> >
环 {{ scope.scope.outputValueRate }} 环 {{ scope.scope.outputValueRate }}%
</div>
<div v-else class="normal">
环 {{ scope.scope.outputValueRate === 0 ? 0 + "%" : "-" }}
</div> </div>
<div v-else class="normal">环 -</div>
</div> </div>
<div slot="Conversion" slot-scope="scope"> <div slot="Conversion" slot-scope="scope">
<div> <div>
{{ scope.scope.lastConversion || "-" }}% → {{
{{ scope.scope.currentConversion || "-" }}% scope.scope.lastConversion === 0
? 0
: scope.scope.lastConversion || "-"
}}% →
{{
scope.scope.currentConversion === 0
? 0
: scope.scope.currentConversion || "-"
}}%
</div> </div>
<div <div
v-if="scope.scope.conversionRate" v-if="scope.scope.conversionRate"
...@@ -132,14 +149,23 @@ ...@@ -132,14 +149,23 @@
: '' : ''
]" ]"
> >
环 {{ scope.scope.conversionRate }} 环 {{ scope.scope.conversionRate }}%
</div>
<div v-else class="normal">
环 {{ scope.scope.conversionRate === 0 ? 0 + "%" : "-" }}
</div> </div>
<div v-else class="normal">环 -</div>
</div> </div>
<div slot="CustomerUnitPrice" slot-scope="scope"> <div slot="CustomerUnitPrice" slot-scope="scope">
<div> <div>
¥{{ scope.scope.lastCustomerUnitPrice || "-" }} → ¥{{ ¥{{
scope.scope.currentCustomerUnitPrice || "-" scope.scope.lastCustomerUnitPrice === 0
? 0
: scope.scope.lastCustomerUnitPrice || "-"
}}
→ ¥{{
scope.scope.currentCustomerUnitPrice === 0
? 0
: scope.scope.currentCustomerUnitPrice || "-"
}} }}
</div> </div>
<div <div
...@@ -153,9 +179,11 @@ ...@@ -153,9 +179,11 @@
: '' : ''
]" ]"
> >
环 {{ scope.scope.customerUnitPriceRate }} 环 {{ scope.scope.customerUnitPriceRate }}%
</div>
<div v-else class="normal">
环 {{ scope.scope.customerUnitPriceRate === 0 ? 0 + "%" : "-" }}
</div> </div>
<div v-else class="normal">环 -</div>
</div> </div>
</d2-table> </d2-table>
</div> </div>
...@@ -203,7 +231,7 @@ export default { ...@@ -203,7 +231,7 @@ export default {
}, },
{ {
title: "门店:", title: "门店:",
key: "merchantNames" key: "merchantName"
}, },
{ {
title: "上级:", title: "上级:",
...@@ -354,8 +382,8 @@ export default { ...@@ -354,8 +382,8 @@ export default {
}, },
{ {
staffName: this.paramsObj.staffPhone, staffName: this.paramsObj.staffPhone,
merchantNames: this.paramsObj.merchantName, merchantName: this.paramsObj.merchantName,
staffName: this.paramsObj.staffName staffPhone: this.paramsObj.staffPhone
} }
) )
} }
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
></div> ></div>
<template <template
v-if=" v-if="
item.key == 'merchantNames' || item.key == 'superiors' item.key == 'merchantName' || item.key == 'superiors'
" "
> >
<template <template
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!