|
@@ -12,7 +12,7 @@
|
|
|
<view class="flex title" v-if="info.status == 3"> 入库前请确认售价: </view>
|
|
<view class="flex title" v-if="info.status == 3"> 入库前请确认售价: </view>
|
|
|
<view class="flex title" v-else> 确认售价: </view>
|
|
<view class="flex title" v-else> 确认售价: </view>
|
|
|
<view class="flex title">
|
|
<view class="flex title">
|
|
|
- <text style="font-size:28upx;font-weight:normal;color:green;">花材名称 / 进货价 / 成本(含运费) </text>
|
|
|
|
|
|
|
+ <text style="font-size:28upx;font-weight:normal;color:green;">花材名称 / 进货价 / 成本价(进货价+运费) </text>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
<view v-for="(res,i) in flowersList" :key="i">
|
|
<view v-for="(res,i) in flowersList" :key="i">
|
|
@@ -21,13 +21,14 @@
|
|
|
<view style="margin-bottom:6upx;">
|
|
<view style="margin-bottom:6upx;">
|
|
|
<text class="name" @click="pageTo({url:'/admin/item/detail?id='+ res.productId})">
|
|
<text class="name" @click="pageTo({url:'/admin/item/detail?id='+ res.productId})">
|
|
|
{{res.name}}
|
|
{{res.name}}
|
|
|
- <text style="color:red;margin-left:30upx;font-weight:normal;">¥{{res.cost?parseFloat(res.cost):0}}</text>
|
|
|
|
|
- <text style="color:blue;margin-left:30upx;font-weight:normal;">¥{{res.bigPrice?parseFloat(res.bigPrice):0}}</text>
|
|
|
|
|
|
|
+ <text style="color:red;margin-left:40upx;font-weight:normal;">¥{{res.bigPrice?parseFloat(res.bigPrice):0}}</text>
|
|
|
|
|
+ <text style="color:red;margin-left:40upx;font-weight:normal;">¥{{res.cost?parseFloat(res.cost):0}}</text>
|
|
|
|
|
+ <text style="float:right;color:green;">...</text>
|
|
|
</text>
|
|
</text>
|
|
|
</view>
|
|
</view>
|
|
|
<view>
|
|
<view>
|
|
|
<input type="digit" v-model="res.suggestHjPrice" @focus="clearHjPrice(i)" placeholder="会员价" />
|
|
<input type="digit" v-model="res.suggestHjPrice" @focus="clearHjPrice(i)" placeholder="会员价" />
|
|
|
- <input type="digit" v-model="res.suggestPrice" @focus="clearPrice(i)" @input="linkChange(i)" placeholder="批发价" />
|
|
|
|
|
|
|
+ <input type="digit" v-model="res.suggestPrice" @focus="clearPrice(i)" @input="linkChange(i)" placeholder="批发价" style="border:1upx solid #3385FF;color:#3385FF;" />
|
|
|
<input type="digit" v-model="res.suggestSkPrice" @focus="clearSkPrice(i)" placeholder="零售价" />
|
|
<input type="digit" v-model="res.suggestSkPrice" @focus="clearSkPrice(i)" placeholder="零售价" />
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -157,6 +158,11 @@ export default {
|
|
|
errorHint = '请填写 '+name+' 零售价'
|
|
errorHint = '请填写 '+name+' 零售价'
|
|
|
hasError = true
|
|
hasError = true
|
|
|
}
|
|
}
|
|
|
|
|
+ if(that.$util.isMoney(item.suggestHjPrice) == false){
|
|
|
|
|
+ let name = item.name
|
|
|
|
|
+ errorHint = '请填写 '+name+' 会员价'
|
|
|
|
|
+ hasError = true
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
if(hasError){
|
|
if(hasError){
|
|
|
this.$msg(errorHint)
|
|
this.$msg(errorHint)
|
|
@@ -177,10 +183,10 @@ export default {
|
|
|
let that = this
|
|
let that = this
|
|
|
let targetId = this.option.id ||0
|
|
let targetId = this.option.id ||0
|
|
|
let newProduct = this.flowersList.map((ele) => {
|
|
let newProduct = this.flowersList.map((ele) => {
|
|
|
- return {id:ele.productId,price:ele.suggestPrice,skPrice:ele.suggestSkPrice}
|
|
|
|
|
|
|
+ return {id:ele.productId,price:ele.suggestPrice,skPrice:ele.suggestSkPrice,hjPrice:ele.suggestHjPrice}
|
|
|
})
|
|
})
|
|
|
uni.showLoading({mask:true})
|
|
uni.showLoading({mask:true})
|
|
|
- batchChangePrice({data:JSON.stringify(newProduct),changeType:'cg',targetId:targetId}).then(res => {
|
|
|
|
|
|
|
+ batchChangePrice({data:JSON.stringify(newProduct),changeType:'cg',targetId:targetId,appVersion:1}).then(res => {
|
|
|
uni.hideLoading()
|
|
uni.hideLoading()
|
|
|
if(res.code == 1){
|
|
if(res.code == 1){
|
|
|
that.$msg(res.msg)
|
|
that.$msg(res.msg)
|