|
@@ -4,7 +4,9 @@
|
|
|
<view class="module-com content-box">
|
|
<view class="module-com content-box">
|
|
|
<view class="commodity-view">
|
|
<view class="commodity-view">
|
|
|
<view style="text-align:right;margin-right:20upx;padding-top:10upx;" v-if="detailInfo.book == 1 && detailInfo.status == 2 && parseFloat(detailInfo.actPrice) == 0">
|
|
<view style="text-align:right;margin-right:20upx;padding-top:10upx;" v-if="detailInfo.book == 1 && detailInfo.status == 2 && parseFloat(detailInfo.actPrice) == 0">
|
|
|
- <button class="admin-button-com default mini-btn" @click="addItem(detailInfo)">添加花材</button>
|
|
|
|
|
|
|
+ <button class="admin-button-com default mini-btn" @click="usePrice(detailInfo,0)" style="margin-right:20upx;">使用自定义价</button>
|
|
|
|
|
+ <button class="admin-button-com default mini-btn" @click="usePrice(detailInfo,1)" style="margin-right:20upx;">使用花材售价</button>
|
|
|
|
|
+ <button class="admin-button-com blue mini-btn" @click="addItem(detailInfo)">添加花材</button>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="commodity-list">
|
|
<view class="commodity-list">
|
|
|
<view v-for="(s, idx) in detailInfo.product" :key="idx" class="commodity-item" style="position:relative;">
|
|
<view v-for="(s, idx) in detailInfo.product" :key="idx" class="commodity-item" style="position:relative;">
|
|
@@ -30,7 +32,7 @@
|
|
|
<text class="item-type"></text>
|
|
<text class="item-type"></text>
|
|
|
<view class="item-count" style="width:310upx;">
|
|
<view class="item-count" style="width:310upx;">
|
|
|
<input type="number" class="num" :class="[Number(s.xhNum)>Number(s.stock) ? 'stock-red' : '']" v-model="s.xhNum" placeholder="数量" style="width:100upx;" />
|
|
<input type="number" class="num" :class="[Number(s.xhNum)>Number(s.stock) ? 'stock-red' : '']" v-model="s.xhNum" placeholder="数量" style="width:100upx;" />
|
|
|
- <input type="digit" class="price" v-model="s.currentHdPrice" placeholder="价格" style="width:120upx;" />
|
|
|
|
|
|
|
+ <input type="digit" class="price" :class="[Number(s.cost)>Number(s.currentHdPrice) ? 'cost-blue' : '']" v-model="s.currentHdPrice" placeholder="价格" style="width:120upx;" />
|
|
|
<text style="display:inline-block;height:50upx;line-height:50upx;">价格</text>
|
|
<text style="display:inline-block;height:50upx;line-height:50upx;">价格</text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -156,6 +158,18 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ usePrice(info,flag){
|
|
|
|
|
+ if(info.product && !this.$util.isEmpty(info.product)){
|
|
|
|
|
+ info.product.forEach((item,idx,array) => {
|
|
|
|
|
+ if(flag == 0){
|
|
|
|
|
+ item.currentHdPrice = item.itemModifyPrice
|
|
|
|
|
+ }else{
|
|
|
|
|
+ item.currentHdPrice = item.itemSalePrice
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ this.$forceUpdate()
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
changeOption(info){
|
|
changeOption(info){
|
|
|
let id = info.id ? info.id : 0
|
|
let id = info.id ? info.id : 0
|
|
|
let orderSn = info.orderSn ? info.orderSn : ''
|
|
let orderSn = info.orderSn ? info.orderSn : ''
|
|
@@ -377,7 +391,13 @@ export default {
|
|
|
border:2upx solid red;
|
|
border:2upx solid red;
|
|
|
color:red;
|
|
color:red;
|
|
|
font-weight:bold;
|
|
font-weight:bold;
|
|
|
- font-size: 26upx;
|
|
|
|
|
|
|
+ font-size: 27upx;
|
|
|
|
|
+ }
|
|
|
|
|
+ .cost-blue{
|
|
|
|
|
+ border:2upx solid blue;
|
|
|
|
|
+ color:blue;
|
|
|
|
|
+ font-weight:bold;
|
|
|
|
|
+ font-size: 27upx;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|