[发布商品新增预计到账金额]

This commit is contained in:
2021-10-27 10:47:24 +08:00
parent d441ce2430
commit e6181694d2

View File

@@ -64,9 +64,9 @@
<input type="digit" v-model="skus_price" placeholder="0.00"/> <input type="digit" v-model="skus_price" placeholder="0.00"/>
<text class="units">{{skus_unit != '' ? '/' + skus_unit : ''}}</text> <text class="units">{{skus_unit != '' ? '/' + skus_unit : ''}}</text>
</view> </view>
<view class="form-box inputs-flex input-unit"> <view class="form-box inputs-flex input-unit " style="background-color: #eee9fd;" v-if="skus_price>0">
<label class="form-label">分销佣金</label> <label class="form-label">可结算货款 </label>
<input type="digit" v-model="skus_charge" placeholder="0.00"/> <input type="digit" :value="percentTotal" :disabled="true" /> <span class='des'>(扣除分佣后预计到账金额)</span>
<text class="units">{{skus_unit != '' ? '/' + skus_unit : ''}}</text> <text class="units">{{skus_unit != '' ? '/' + skus_unit : ''}}</text>
</view> </view>
</view> </view>
@@ -191,7 +191,6 @@
skus_price : '', // 销售价格 skus_price : '', // 销售价格
skus_number : 1, // 易货起购数量 skus_number : 1, // 易货起购数量
skus_unit : '件', // 规格文字 skus_unit : '件', // 规格文字
skus_charge : '', // 分销佣金
skus_stock : '', // 库存 skus_stock : '', // 库存
isChange : false, // 是否支持易货 isChange : false, // 是否支持易货
stores : [], // 关联店铺 stores : [], // 关联店铺
@@ -201,6 +200,7 @@
{text: '快递', type: 1}, {text: '快递', type: 1},
{text: '自提', type: 2} {text: '自提', type: 2}
], ],
percent:0,// 预结算货款比例
// 配置信息 // 配置信息
storesArr : [], // 可选店铺 storesArr : [], // 可选店铺
tags : [], // 可选商品标签 tags : [], // 可选商品标签
@@ -209,6 +209,11 @@
type : 1, // 1为商品2为服务 type : 1, // 1为商品2为服务
}; };
}, },
computed:{
percentTotal(){
return this.percent * this.skus_price
}
},
created() { created() {
// 编辑状态信息 // 编辑状态信息
if(this.$Route.query.type && this.$Route.query.type === 'edit'){ if(this.$Route.query.type && this.$Route.query.type === 'edit'){
@@ -244,7 +249,6 @@
this.skus_price = res.data.skus[0].price this.skus_price = res.data.skus[0].price
this.skus_number = res.data.skus[0].number this.skus_number = res.data.skus[0].number
this.skus_unit = res.data.skus[0].unit this.skus_unit = res.data.skus[0].unit
this.skus_charge = res.data.skus[0].charge
this.skus_stock = res.data.skus[0].stock this.skus_stock = res.data.skus[0].stock
this.isPostSale = res.data.is_post_sale == 0 this.isPostSale = res.data.is_post_sale == 0
this.isChange = res.data.is_change == 0 this.isChange = res.data.is_change == 0
@@ -253,6 +257,9 @@
this.storesArr = storesArr this.storesArr = storesArr
this.services = services this.services = services
this.stores = stores this.stores = stores
this.percent = Number(res.percent)
}).catch(err => { }).catch(err => {
uni.showToast({ uni.showToast({
title: err.message, title: err.message,
@@ -283,6 +290,7 @@
this.type = res.type this.type = res.type
this.categoryId = this.$Route.query.id this.categoryId = this.$Route.query.id
this.categoryCid= this.$Route.query.cid this.categoryCid= this.$Route.query.cid
this.percent = Number(res.percent)
}).catch(err => { }).catch(err => {
uni.showToast({ uni.showToast({
title: err.message, title: err.message,
@@ -377,7 +385,6 @@
skus_price : this.skus_price, skus_price : this.skus_price,
skus_number : this.skus_number, skus_number : this.skus_number,
skus_unit : this.skus_unit, skus_unit : this.skus_unit,
skus_charge : this.skus_charge,
skus_stock : this.skus_stock, skus_stock : this.skus_stock,
is_change : this.isChange ? 0 : 1, is_change : this.isChange ? 0 : 1,
logistic_type: this.logisticArr[this.logisticType].type, logistic_type: this.logisticArr[this.logisticType].type,
@@ -471,6 +478,12 @@
} }
.input-unit{ .input-unit{
padding-right: 200rpx; padding-right: 200rpx;
.des{
font-size: 26rpx;padding-bottom: 20rpx;display: inline-block;
color: #999;
position: relative;
right: -200rpx;
}
.units{ .units{
position: absolute; position: absolute;
right: 0; right: 0;