|
|
@@ -127,7 +127,7 @@
|
|
|
<image class="item-icon" :src="s.cover" @click.stop="previewImage(s.bigCover)" />
|
|
|
<button v-if="s.xhUnitType == 1" style="position:absolute;left:15upx;" class="admin-button-com blue mini-btn" @click="partOne(s)">拆1份</button>
|
|
|
<button style="position:absolute;left:155upx;top:78upx;" class="admin-button-com mini-btn" @click="giveItemFn(s)">发起赠送</button>
|
|
|
- <text v-if="s.giveNum && Number(s.giveNum)>0" style="position:absolute;left:320upx;top:90upx;color:#333333;">已赠 {{parseFloat(s.giveNum)}}</text>
|
|
|
+ <text v-if="s.giveNum && Number(s.giveNum)>0" style="position:absolute;left:320upx;top:90upx;color:#333333;">已赠 {{parseFloat(s.giveNum)}}<text v-if="s.xhUnitType == 0">{{s.xhUnitName}}</text></text>
|
|
|
<view class="item-info" @click="pageTo({url:'/admin/item/detail',query:{id: s.productId}})">
|
|
|
<view class="info-line">
|
|
|
<text class="item-name">{{ s.name }}</text>
|
|
|
@@ -357,14 +357,16 @@ export default {
|
|
|
this.$msg('请填写赠送数量')
|
|
|
return false
|
|
|
}
|
|
|
- uni.showLoading({mask:true})
|
|
|
- giveItem({id:this.giveTargetId,num:this.giveNum}).then(res=>{
|
|
|
- uni.hideLoading()
|
|
|
- if(res.code == 1){
|
|
|
- that.givePopShow = false
|
|
|
- that.init()
|
|
|
- that.$msg(that.msg)
|
|
|
- }
|
|
|
+ this.$util.confirmModal({content:'确认赠送?'},() => {
|
|
|
+ uni.showLoading({mask:true})
|
|
|
+ giveItem({id:this.giveTargetId,num:this.giveNum}).then(res=>{
|
|
|
+ uni.hideLoading()
|
|
|
+ if(res.code == 1){
|
|
|
+ that.givePopShow = false
|
|
|
+ that.init()
|
|
|
+ that.$msg(that.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
})
|
|
|
},
|
|
|
partOne(item){
|