|
@@ -28,9 +28,12 @@
|
|
|
<view class="card-row align_center flex justify_between">
|
|
|
<view class="label" style="width: 40%;" @click="showTip(0)">价格权限设置 <u-icon color="#ffaa00"
|
|
|
name="question-circle"></u-icon></view>
|
|
|
- <view class="text flex align_center" style="width: 60%;text-align: right;"
|
|
|
+ <view class="text flex align_center justify_end" style="width: 60%;"
|
|
|
@click="openSetPriceShow">
|
|
|
- <text style="width: 80%;flex: 1;">{{showPriceStr.length ? showPriceStr.join("/") : '--'}}</text>
|
|
|
+ <view style="flex-grow: 1;">
|
|
|
+ <view>货架产品:<text style="width: 80%;flex: 1;">{{showPriceStr.length ? showPriceStr.join("/") : '--'}}</text></view>
|
|
|
+ <view>非货架产品:<text style="width: 80%;flex: 1;">{{showNonPriceStr.length ? showNonPriceStr.join("/") : '--'}}</text></view>
|
|
|
+ </view>
|
|
|
<u-icon name="arrow-right" color="#969da3" size="28"></u-icon>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -98,11 +101,15 @@
|
|
|
<!-- 设置价格显示弹框 -->
|
|
|
<u-modal v-model="updateShowPrice" :show-cancel-button="true" title="价格权限设置" @confirm="savePriceSet">
|
|
|
<view class="slot-content" style="padding: 1.5rem 1rem;text-align: center;">
|
|
|
+ <view style="color: #999;font-size: 0.8rem;margin: 0.5rem;">提示:不勾选则不显示价格</view>
|
|
|
<u-checkbox-group @change="priceSetChange">
|
|
|
<u-checkbox v-for="item in showPrice" :key="item.paramCode" v-model="item.checked"
|
|
|
:name="item.paramCode">{{item.text}}</u-checkbox>
|
|
|
</u-checkbox-group>
|
|
|
- <view style="color: #999;font-size: 0.8rem;margin: 0.5rem;">提示:不勾选则不显示价格</view>
|
|
|
+ <u-checkbox-group @change="nonPriceSetChange">
|
|
|
+ <u-checkbox v-for="item in showNonPrice" :key="item.paramCode" v-model="item.checked"
|
|
|
+ :name="item.paramCode">{{item.text}}</u-checkbox>
|
|
|
+ </u-checkbox-group>
|
|
|
</view>
|
|
|
</u-modal>
|
|
|
</view>
|
|
@@ -149,7 +156,9 @@
|
|
|
webView: null,
|
|
|
showDot: false,
|
|
|
showPrice: [],
|
|
|
+ showNonPrice:[],
|
|
|
showPriceStr: [],
|
|
|
+ showNonPriceStr:[],
|
|
|
updateShowPrice: false,
|
|
|
showPriceBak: [],
|
|
|
showMore: false
|
|
@@ -270,7 +279,7 @@
|
|
|
confirmText: "好的",
|
|
|
title: "提示",
|
|
|
content: type ? "只有当数字货架的“是否设置完成”为“是”,系统才会自动对该货架生成补货单,修理厂才能正常下单。" :
|
|
|
- "1、不勾选则不显示价格,非货架产品只显示车主价,不选择车主价时,非货架产品不显示价格\n2、结算价:即易码通进货价"
|
|
|
+ "不勾选则不显示价格,结算价:即易码通进货价"
|
|
|
})
|
|
|
},
|
|
|
// 设置完成是否
|
|
@@ -394,6 +403,8 @@
|
|
|
formatPriceShow(){
|
|
|
this.showPrice = []
|
|
|
this.showPriceStr = []
|
|
|
+ this.showNonPrice = []
|
|
|
+ this.showNonPriceStr = []
|
|
|
this.showPriceBak.map(item => {
|
|
|
if (item.paramCode == 'shelf_price_show' && item.paramValue == 1) {
|
|
|
this.showPriceStr.push("车主价")
|
|
@@ -401,12 +412,27 @@
|
|
|
if (item.paramCode == 'shelf_cost_show' && item.paramValue == 1) {
|
|
|
this.showPriceStr.push("结算价")
|
|
|
}
|
|
|
- this.showPrice.push({
|
|
|
- paramCode: item.paramCode,
|
|
|
- paramValue: item.paramValue,
|
|
|
- text: item.paramCode == 'shelf_price_show' ? '车主价' : '结算价',
|
|
|
- checked: item.paramValue == 1
|
|
|
- })
|
|
|
+ if (item.paramCode == 'non_shelf_price_show' && item.paramValue == 1) {
|
|
|
+ this.showNonPriceStr.push("车主价")
|
|
|
+ }
|
|
|
+ if (item.paramCode == 'non_shelf_cost_show' && item.paramValue == 1) {
|
|
|
+ this.showNonPriceStr.push("结算价")
|
|
|
+ }
|
|
|
+ if(item.paramCode.indexOf("non_")>=0){
|
|
|
+ this.showNonPrice.push({
|
|
|
+ paramCode: item.paramCode,
|
|
|
+ paramValue: item.paramValue,
|
|
|
+ text: item.paramCode == 'non_shelf_price_show' ? '车主价' : '结算价',
|
|
|
+ checked: item.paramValue == 1
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ this.showPrice.push({
|
|
|
+ paramCode: item.paramCode,
|
|
|
+ paramValue: item.paramValue,
|
|
|
+ text: item.paramCode == 'shelf_price_show' ? '车主价' : '结算价',
|
|
|
+ checked: item.paramValue == 1
|
|
|
+ })
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
openSetPriceShow(){
|
|
@@ -420,6 +446,11 @@
|
|
|
item.paramValue = e.includes(item.paramCode) ? 1 : 0
|
|
|
})
|
|
|
},
|
|
|
+ nonPriceSetChange(e){
|
|
|
+ this.showNonPrice.map(item => {
|
|
|
+ item.paramValue = e.includes(item.paramCode) ? 1 : 0
|
|
|
+ })
|
|
|
+ },
|
|
|
// 价格显示保存
|
|
|
savePriceSet() {
|
|
|
uni.showLoading({
|
|
@@ -429,7 +460,7 @@
|
|
|
// 更新价格显示
|
|
|
updateShelfPriceShow({
|
|
|
shelfSn: this.shelfSn,
|
|
|
- paramValue: this.showPrice
|
|
|
+ paramValue: [...this.showPrice,...this.showNonPrice]
|
|
|
}).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
this.getShelfPriceShow()
|