|
@@ -11,25 +11,23 @@
|
|
|
<view class="body-content flex flex_column">
|
|
|
<view class="card-box" v-if="detailData">
|
|
|
<view class="card-row flex align_center justify_between">
|
|
|
- <view class="label">货架名称</view>
|
|
|
- <view class="text flex align_center" @click="editShelf">
|
|
|
- <text style="width: 80%;flex: 1;">{{detailData.shelfName}}</text>
|
|
|
+ <view class="label">货架名称:</view>
|
|
|
+ <view class="text flex align_center justify_end"@click="editShelf">
|
|
|
+ <text>{{detailData.shelfName}}</text>
|
|
|
<u-icon name="arrow-right" color="#969da3" size="28"></u-icon>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="card-row flex align_center justify_between">
|
|
|
- <view class="label">关联客户</view>
|
|
|
- <view class="text flex align_center" @click="customeSet">
|
|
|
- <text
|
|
|
- style="width: 80%;flex: 1;">{{ (detailData&&detailData.customerEntity&&detailData.customerEntity.customerName) || '--' }}</text>
|
|
|
+ <view class="label">关联客户:</view>
|
|
|
+ <view class="text flex align_center justify_end" @click="customeSet">
|
|
|
+ <text>{{ (detailData&&detailData.customerEntity&&detailData.customerEntity.customerName) || '--' }}</text>
|
|
|
<u-icon name="arrow-right" color="#969da3" size="28"></u-icon>
|
|
|
</view>
|
|
|
</view>
|
|
|
<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 justify_end" style="width: 60%;"
|
|
|
- @click="openSetPriceShow">
|
|
|
+ <view class="label" @click="showTip(0)">价格权限设置 <u-icon color="#ffaa00"
|
|
|
+ name="question-circle"></u-icon>:</view>
|
|
|
+ <view class="text flex align_center justify_end" @click="openSetPriceShow">
|
|
|
<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>
|
|
@@ -38,9 +36,22 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="card-row align_center flex justify_between" v-if="showMore">
|
|
|
- <view class="label" style="width: 50%;" @click="showTip(1)">是否设置完成 <u-icon color="#ffaa00"
|
|
|
- name="question-circle"></u-icon></view>
|
|
|
- <view class="text" style="width: 50%;text-align: right;"><u-switch v-model="switchVal"
|
|
|
+ <view class="label">货架状态:</view>
|
|
|
+ <view class="text flex align_center justify_end" @click="showEnableShelf=true">
|
|
|
+ <text>启用</text>
|
|
|
+ <u-icon name="arrow-right" color="#969da3" size="28"></u-icon>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="card-row align_center flex justify_between" v-if="showMore">
|
|
|
+ <view class="label">货架注销:</view>
|
|
|
+ <view class="text">
|
|
|
+ <u-button type="primary" size="mini" @click="showCancelShelf=true">注销</u-button>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="card-row align_center flex justify_between" v-if="showMore">
|
|
|
+ <view class="label" @click="showTip(1)">是否设置完成<u-icon color="#ffaa00"
|
|
|
+ name="question-circle"></u-icon>: </view>
|
|
|
+ <view class="text"><u-switch :size="40" v-model="switchVal"
|
|
|
@change="switchChange"></u-switch></view>
|
|
|
</view>
|
|
|
<view class="moreSeting" @click="showMore=!showMore">
|
|
@@ -114,6 +125,21 @@
|
|
|
</u-checkbox-group>
|
|
|
</view>
|
|
|
</u-modal>
|
|
|
+ <!-- 启用禁用货架 -->
|
|
|
+ <u-modal v-model="showEnableShelf" :show-cancel-button="true" title="货架状态" @confirm="enbaleShelf">
|
|
|
+ <view class="slot-content" style="padding: 1rem 1rem 1.5rem;text-align: center;">
|
|
|
+ <u-radio-group v-model="shelfStatus">
|
|
|
+ <u-radio :name="1">启用</u-radio>
|
|
|
+ <u-radio :name="0">停用</u-radio>
|
|
|
+ </u-radio-group>
|
|
|
+ </view>
|
|
|
+ </u-modal>
|
|
|
+ <!-- 注销货架 -->
|
|
|
+ <u-modal v-model="showCancelShelf" :show-cancel-button="true" title="是否注销该数字货架?" @confirm="cancelShelf">
|
|
|
+ <view class="slot-content" style="padding: 1rem 1rem 1.5rem;text-align: center;">
|
|
|
+ 点击确定,该数字货架就不可做任何操作,用户不可登陆。
|
|
|
+ </view>
|
|
|
+ </u-modal>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -163,7 +189,10 @@
|
|
|
showNonPriceStr:[],
|
|
|
updateShowPrice: false,
|
|
|
showPriceBak: [],
|
|
|
- showMore: false
|
|
|
+ showMore: false,
|
|
|
+ showEnableShelf: false,
|
|
|
+ shelfStatus: 1,
|
|
|
+ showCancelShelf: false
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -284,6 +313,14 @@
|
|
|
"不勾选则不显示价格,结算价:即易码通进货价"
|
|
|
})
|
|
|
},
|
|
|
+ // 注销货架
|
|
|
+ cancelShelf(){
|
|
|
+ this.showCancelShelf = false
|
|
|
+ },
|
|
|
+ // 启用禁用货架
|
|
|
+ enbaleShelf(){
|
|
|
+ this.showEnableShelf = false
|
|
|
+ },
|
|
|
// 设置完成是否
|
|
|
switchChange(v) {
|
|
|
const params = {
|
|
@@ -397,44 +434,53 @@
|
|
|
if (res.status == 200) {
|
|
|
const ret = res.data && res.data
|
|
|
this.showPriceBak = ret
|
|
|
+ console.log(ret)
|
|
|
this.formatPriceShow()
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
// 格式化价格显示
|
|
|
+ checkPrice(item){
|
|
|
+ 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
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
formatPriceShow(){
|
|
|
this.showPrice = []
|
|
|
this.showPriceStr = []
|
|
|
this.showNonPrice = []
|
|
|
this.showNonPriceStr = []
|
|
|
- this.showPriceBak.map(item => {
|
|
|
+ const a = this.showPriceBak.filter(item => item.paramCode.indexOf('shelf_price_show')>=0)
|
|
|
+ const b = this.showPriceBak.filter(item => item.paramCode.indexOf('shelf_cost_show')>=0)
|
|
|
+ a.map(item => {
|
|
|
if (item.paramCode == 'shelf_price_show' && item.paramValue == 1) {
|
|
|
this.showPriceStr.push("车主价")
|
|
|
}
|
|
|
- if (item.paramCode == 'shelf_cost_show' && item.paramValue == 1) {
|
|
|
- this.showPriceStr.push("结算价")
|
|
|
- }
|
|
|
if (item.paramCode == 'non_shelf_price_show' && item.paramValue == 1) {
|
|
|
this.showNonPriceStr.push("车主价")
|
|
|
}
|
|
|
+ this.checkPrice(item)
|
|
|
+ })
|
|
|
+ b.map(item => {
|
|
|
+ if (item.paramCode == 'shelf_cost_show' && item.paramValue == 1) {
|
|
|
+ this.showPriceStr.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
|
|
|
- })
|
|
|
- }
|
|
|
+ this.checkPrice(item)
|
|
|
})
|
|
|
},
|
|
|
openSetPriceShow(){
|
|
@@ -567,21 +613,19 @@
|
|
|
|
|
|
.card-row {
|
|
|
border-bottom: 1rpx solid #eee;
|
|
|
- padding: 20rpx 0;
|
|
|
- min-height: 90rpx;
|
|
|
+ padding: 10rpx 0;
|
|
|
+ min-height: 80rpx;
|
|
|
|
|
|
&:last-child {
|
|
|
border-bottom: 0;
|
|
|
}
|
|
|
-
|
|
|
- .label {
|
|
|
- flex: 1;
|
|
|
- width: 20%;
|
|
|
+ .label{
|
|
|
+ min-width: 30%;
|
|
|
}
|
|
|
-
|
|
|
.text {
|
|
|
- width: 80%;
|
|
|
color: #666;
|
|
|
+ flex-grow: 1;
|
|
|
+ text-align: right;
|
|
|
}
|
|
|
}
|
|
|
|