|
|
|
@ -73,25 +73,25 @@ |
|
|
|
<view class="tui-price-flex tui-size32" v-if="isReturn"> |
|
|
|
<view class="tui-flex-shrink">已选金额</view> |
|
|
|
<view class="tui-goods-price"> |
|
|
|
<view class="tui-size-24">¥</view> |
|
|
|
<input type="digit" style="width: 150rpx;text-align: right;border-bottom: 1px solid #eee;" v-model='changeAmount'> |
|
|
|
<!-- <view class="tui-price-large">{{ changeAmount}}</view> --> |
|
|
|
<view class="tui-size-24">¥</view> |
|
|
|
<view class="tui-price-large">{{ changeAmount}}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="tui-price-flex tui-size32" v-if="isReturn"> |
|
|
|
<view class="tui-flex-shrink">退货金额</view> |
|
|
|
<view class="tui-goods-price"> |
|
|
|
<view class="tui-size-24">¥</view> |
|
|
|
<view class="tui-price-large">{{ returnAmount}}</view> |
|
|
|
<input type="digit" style="width: 150rpx;text-align: right;border-bottom: 1px solid #eee;" v-model='returnAmount' @input="getReturnA"> |
|
|
|
<!-- <view class="tui-price-large">{{ returnAmount}}</view> --> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="tui-price-flex tui-size32" v-if="isReturn"> |
|
|
|
<!-- <view class="tui-price-flex tui-size32" v-if="isReturn"> |
|
|
|
<view class="tui-flex-shrink">欠款抵扣</view> |
|
|
|
<view class="tui-goods-price"> |
|
|
|
<view class="tui-size-24">¥</view> |
|
|
|
<view class="tui-price-large">{{ qkdk}}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> --> |
|
|
|
<view class="tui-price-flex tui-size32" v-if="editNoPrice"> |
|
|
|
<view class="tui-flex-shrink">还款金额</view> |
|
|
|
<view class="tui-goods-price"> |
|
|
|
@ -110,7 +110,7 @@ |
|
|
|
<view class="tui-price-flex tui-size32" v-if="isReturn && radio1 == 0"> |
|
|
|
<view class="tui-flex-shrink">配送人员</view> |
|
|
|
<view class="tui-goods-price"> |
|
|
|
<input type="text" v-model="lbgName.workerName" @tap.stop="goPopleList('lbgName')" placeholder="请选择拉包工" disabled style="height:75rpx;line-height:84rpx;border-bottom: 1px solid #088fe0;text-align: center;"> |
|
|
|
<input type="text" v-model="lbgName.workerName" @tap.stop="goPopleList('lbgName')" placeholder="可指定拉包工" disabled style="height:75rpx;line-height:84rpx;border-bottom: 1px solid #088fe0;text-align: center;"> |
|
|
|
<uni-icons type="right" size="16" style="line-height: 80rpx;"></uni-icons> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -256,27 +256,27 @@ |
|
|
|
type: '', |
|
|
|
orderXd:[], |
|
|
|
collection:[], |
|
|
|
qkdk:0, |
|
|
|
lbgName:[] |
|
|
|
lbgName:[], |
|
|
|
returnAmount:0 |
|
|
|
} |
|
|
|
}, |
|
|
|
components: { |
|
|
|
kkPrinter |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
returnAmount() { |
|
|
|
if (this.changeAmount) { |
|
|
|
if (this.sales.noEarn >= this.changeAmount) { |
|
|
|
this.sales.newNoEarn = (this.sales.noEarn - this.changeAmount).toFixed(2); |
|
|
|
this.qkdk = this.changeAmount |
|
|
|
return 0 |
|
|
|
} else { |
|
|
|
this.sales.newNoEarn = 0 |
|
|
|
this.qkdk = this.sales.noEarn |
|
|
|
return (this.changeAmount - this.sales.noEarn).toFixed(2) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
// returnAmount() { |
|
|
|
// // if (this.changeAmount) { |
|
|
|
// // if (this.sales.noEarn >= this.changeAmount) { |
|
|
|
// // this.sales.newNoEarn = (this.sales.noEarn - this.changeAmount).toFixed(2); |
|
|
|
// // return 0 |
|
|
|
// // } else { |
|
|
|
// // this.sales.newNoEarn = 0 |
|
|
|
// // return (this.changeAmount - this.sales.noEarn).toFixed(2) |
|
|
|
// // } |
|
|
|
// // } |
|
|
|
// console.log() |
|
|
|
// return this.changeAmount |
|
|
|
// }, |
|
|
|
changeAmount() { |
|
|
|
if (this.isReturn) { |
|
|
|
let sum = 0 |
|
|
|
@ -286,7 +286,8 @@ |
|
|
|
sum = v.returnCount * item1.wholesalePrice + sum |
|
|
|
} |
|
|
|
}); |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.returnAmount = (sum * this.sales.discount * 0.1).toFixed(2) |
|
|
|
return (sum * this.sales.discount * 0.1).toFixed(2) |
|
|
|
} else { |
|
|
|
return 0 |
|
|
|
@ -425,6 +426,9 @@ |
|
|
|
//回款按钮 this.type==gys时,是上游客户欠款接口。否则为销售单欠款接口 |
|
|
|
editnoEarn() { |
|
|
|
this.editNoPrice = true; |
|
|
|
}, |
|
|
|
getReturnA(e){ |
|
|
|
this.returnAmount = e.detail.value |
|
|
|
}, |
|
|
|
getNoPay(en) { |
|
|
|
if (en != undefined) { |
|
|
|
@ -476,13 +480,7 @@ |
|
|
|
close() { |
|
|
|
this.popupShow = false |
|
|
|
}, |
|
|
|
sureReturn() { |
|
|
|
if(this.radio1 == 0){ |
|
|
|
if(this.lbgName == []){ |
|
|
|
this.tui.toast("请选择配送人员") |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
sureReturn() { |
|
|
|
this.list.forEach(item1 => { |
|
|
|
item1.stockLogList1.forEach(item2 => { |
|
|
|
if (item2.returnCount) { |
|
|
|
@ -493,7 +491,7 @@ |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
this.sales.noEarn = this.sales.newNoEarn; |
|
|
|
// this.sales.noEarn = this.sales.newNoEarn; |
|
|
|
this.sales.saleId = this.sales.id; |
|
|
|
this.sales.totalAomount = this.returnAmount; |
|
|
|
this.tui.request("/app/return/rtg", "post", { |
|
|
|
|