|
|
@ -50,6 +50,22 @@ |
|
|
|
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="shop-box"> |
|
|
|
|
|
<view class="content-list"> |
|
|
|
|
|
<view class="list-name" style="width:150rpx">选择价格</view> |
|
|
|
|
|
<view class="list-val" style="width:560rpx;display: flex;"> |
|
|
|
|
|
<radio-group style="display: flex;"> |
|
|
|
|
|
<label class="uni-list-cell uni-list-cell-pd" v-for="(item, index) in priceItems" |
|
|
|
|
|
:key="item.value"> |
|
|
|
|
|
<view> |
|
|
|
|
|
<radio :value="item.value" @tap="priceChange(item.value)" :checked="index === priceCurrent" /> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view>{{item.name}}</view> |
|
|
|
|
|
</label> |
|
|
|
|
|
</radio-group> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="shop-box" style="border-top:5px solid #eee;" v-for="(value,key) in Array.from(carList)" :key="key"> |
|
|
<view class="shop-box" style="border-top:5px solid #eee;" v-for="(value,key) in Array.from(carList)" :key="key"> |
|
|
<view class="shop-name" style="position: relative;"> |
|
|
<view class="shop-name" style="position: relative;"> |
|
|
@ -235,8 +251,18 @@ |
|
|
relPrice: '0', //已付金额 |
|
|
relPrice: '0', //已付金额 |
|
|
otherExpense: '0', // 其他费用 |
|
|
otherExpense: '0', // 其他费用 |
|
|
priceNo: '0', //未付金额 |
|
|
priceNo: '0', //未付金额 |
|
|
discountNum:10, |
|
|
discountNum:10, |
|
|
value: '', |
|
|
priceCurrent:'', |
|
|
|
|
|
value: '', |
|
|
|
|
|
priceItems:[{ |
|
|
|
|
|
value: '0', |
|
|
|
|
|
name: '零售价' |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
value: '1', |
|
|
|
|
|
name: '批发价' |
|
|
|
|
|
} |
|
|
|
|
|
], |
|
|
items: [{ |
|
|
items: [{ |
|
|
value: '0', |
|
|
value: '0', |
|
|
name: '单品折' |
|
|
name: '单品折' |
|
|
@ -446,7 +472,7 @@ |
|
|
//整体折扣数字框改变 |
|
|
//整体折扣数字框改变 |
|
|
change(e){ |
|
|
change(e){ |
|
|
console.log(e) |
|
|
console.log(e) |
|
|
|
|
|
this.discountNum = e |
|
|
this.shouldPay = this.price *10000 * e / 10 /10000 |
|
|
this.shouldPay = this.price *10000 * e / 10 /10000 |
|
|
}, |
|
|
}, |
|
|
//点击发货方式按钮 |
|
|
//点击发货方式按钮 |
|
|
@ -458,8 +484,8 @@ |
|
|
this.lbgName = '' |
|
|
this.lbgName = '' |
|
|
//快递0 物流1 发车2 拼包3 自送4 |
|
|
//快递0 物流1 发车2 拼包3 自送4 |
|
|
this.radioType = e.detail.value; |
|
|
this.radioType = e.detail.value; |
|
|
for (let i = 0; i < this.items.length; i++) { |
|
|
for (let i = 0; i < this.logisticsType.length; i++) { |
|
|
if (this.items[i].value === e.detail.value) { |
|
|
if (this.logisticsType[i].value === e.detail.value) { |
|
|
this.current = i; |
|
|
this.current = i; |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
@ -495,24 +521,21 @@ |
|
|
orderByWorker: this.lbgName.workerId, |
|
|
orderByWorker: this.lbgName.workerId, |
|
|
transCompany: this.wlName.id, |
|
|
transCompany: this.wlName.id, |
|
|
sale: { |
|
|
sale: { |
|
|
alreadyEarn: 100, |
|
|
alreadyEarn: 100, //已付金额 |
|
|
realAmount: 100, |
|
|
realAmount: 100, //实际金额 |
|
|
noEarn: 0, |
|
|
noEarn: 0, //欠款 |
|
|
area: "丰台区", |
|
|
totalAmount: this.totalAmount, //总数量 |
|
|
city: "北京", |
|
|
area: this.khName.area, |
|
|
province: "北京", |
|
|
city: this.khName.city, |
|
|
|
|
|
province: this.khName.province, |
|
|
payStatus: 1, |
|
|
payStatus: 1, |
|
|
shopId: '002', |
|
|
receiveAddress: this.khName.receiveAddress, |
|
|
receiveAddress: "测试地址1", |
|
|
transportType: this.radioType, //this.radioType |
|
|
totalAmount: 100, //应付金额 |
|
|
discount: this.discountNum, |
|
|
transportType: 0, //this.radioType |
|
|
|
|
|
discount: 10, |
|
|
|
|
|
createBy: this.xsyId, |
|
|
createBy: this.xsyId, |
|
|
createByName:this.createByName, |
|
|
createByName:this.createByName, |
|
|
userId: "1704126992443641856", |
|
|
remark: this.remark, |
|
|
remark: '123', |
|
|
otherExpense:this.otherExpense //其他费用 |
|
|
discountNum:10, |
|
|
|
|
|
otherExpense:this.otherExpense |
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
saleDetailList: [] |
|
|
saleDetailList: [] |
|
|
@ -573,10 +596,23 @@ |
|
|
that.shouldPay += value.price |
|
|
that.shouldPay += value.price |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
//选择是零售价还是批发价 |
|
|
//整体选择是批发价还是零售价 |
|
|
|
|
|
priceChange(e){ |
|
|
|
|
|
let that = this; |
|
|
|
|
|
this.carList.forEach(function(value, key) { |
|
|
|
|
|
that.index = value.productId |
|
|
|
|
|
if(e == 0){ //零售 |
|
|
|
|
|
that.checkPay(value.lsprice) |
|
|
|
|
|
}else{ //批发 |
|
|
|
|
|
that.checkPay(value.wholesalePrice) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
//商品上选择是零售价还是批发价 |
|
|
checkPay(price){ |
|
|
checkPay(price){ |
|
|
let that = this; |
|
|
let that = this; |
|
|
this.shouldPay = 0 |
|
|
this.shouldPay = 0 |
|
|
|
|
|
this.carList.get(this.index).discountAmount = price |
|
|
this.carList.get(this.index).unitPrice = price; |
|
|
this.carList.get(this.index).unitPrice = price; |
|
|
that.carList.get(that.index).price = price * that.carList.get(that.index).productCount; |
|
|
that.carList.get(that.index).price = price * that.carList.get(that.index).productCount; |
|
|
this.$refs.inputDialog.close() |
|
|
this.$refs.inputDialog.close() |
|
|
|