|
|
|
@ -77,13 +77,20 @@ |
|
|
|
<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> |
|
|
|
</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> |
|
|
|
</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> |
|
|
|
</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">{{ qkdk}}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="tui-price-flex tui-size32" v-if="editNoPrice"> |
|
|
|
<view class="tui-flex-shrink">还款金额</view> |
|
|
|
@ -102,9 +109,9 @@ |
|
|
|
<!-- && orderByWorkerCandidates.length > 0 --> |
|
|
|
<view class="tui-price-flex tui-size32" v-if="isReturn && radio1 == 0"> |
|
|
|
<view class="tui-flex-shrink">配送人员</view> |
|
|
|
<view class="tui-goods-price"> |
|
|
|
<uni-combox :candidates="orderByWorkerCandidates" placeholder="请选择配送人员" |
|
|
|
v-model="orderByWorker"></uni-combox> |
|
|
|
<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;"> |
|
|
|
<uni-icons type="right" size="16" style="line-height: 80rpx;"></uni-icons> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -199,12 +206,12 @@ |
|
|
|
</view> |
|
|
|
</u-popup> |
|
|
|
<view class="tui-tabbar"> |
|
|
|
<view class="tui-btn-mr"> |
|
|
|
<view class="tui-btn-mr" v-if="sales.status != 6"> |
|
|
|
<kk-printer ref="kkprinter" :bufferData="bufferData" @onPrint="onPrint"></kk-printer> |
|
|
|
</view> |
|
|
|
<view class="tui-btn-mr" v-if="sales.status == 0 || sales.status == 1" @click="cancelOrder">取消订单</view> |
|
|
|
<view class="tui-btn-mr" v-if="sales.status == 4" @click="returnGoods">{{ !isReturn ? '退货' : '确认退货'}}</view> |
|
|
|
<view class="tui-btn-mr" @tap="inputDialogToggle()" v-if="!editNoPrice">回款</view> |
|
|
|
<view class="tui-btn-mr" @tap="inputDialogToggle()" v-if="sales.status != 6 && !editNoPrice">回款</view> |
|
|
|
</view> |
|
|
|
<!-- 回款金额输入框 --> |
|
|
|
<uni-popup ref="inputDialog" type="dialog"> |
|
|
|
@ -248,7 +255,9 @@ |
|
|
|
isReturnPrice: 1, |
|
|
|
type: '', |
|
|
|
orderXd:[], |
|
|
|
collection:[] |
|
|
|
collection:[], |
|
|
|
qkdk:0, |
|
|
|
lbgName:[] |
|
|
|
} |
|
|
|
}, |
|
|
|
components: { |
|
|
|
@ -258,10 +267,12 @@ |
|
|
|
returnAmount() { |
|
|
|
if (this.changeAmount) { |
|
|
|
if (this.sales.noEarn >= this.changeAmount) { |
|
|
|
this.sales.newNoEarn = (this.sales.noEarn - this.changeAmount).toFixed(2); |
|
|
|
this.sales.newNoEarn = (this.sales.noEarn - this.changeAmount).toFixed(2); |
|
|
|
this.qkdk = this.changeAmount |
|
|
|
return 0 |
|
|
|
} else { |
|
|
|
this.sales.newNoEarn = 0 |
|
|
|
this.sales.newNoEarn = 0 |
|
|
|
this.qkdk = this.sales.noEarn |
|
|
|
return (this.changeAmount - this.sales.noEarn).toFixed(2) |
|
|
|
} |
|
|
|
} |
|
|
|
@ -300,6 +311,9 @@ |
|
|
|
return 0 |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
onShow(){ |
|
|
|
this.lbgName = JSON.parse(JSON.stringify(this.lbgName)) |
|
|
|
}, |
|
|
|
onLoad(option) { |
|
|
|
if (option.id != null && option.id != undefined && option.id != "") { |
|
|
|
@ -423,6 +437,12 @@ |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
//发货方式选择 |
|
|
|
goPopleList(popleType) { |
|
|
|
uni.navigateTo({ |
|
|
|
url: '/pages/index/peopleList?popleType=' + popleType |
|
|
|
}) |
|
|
|
}, |
|
|
|
getReturnOrder(id) { |
|
|
|
this.tui.request("/app/return/list", "post", { |
|
|
|
@ -446,29 +466,23 @@ |
|
|
|
}).catch((res) => {}) |
|
|
|
}, |
|
|
|
checkBoxChange() { |
|
|
|
if (this.radio1 == 0 && this.orderByWorkerList.length == 0) { |
|
|
|
this.transCompanyInput() |
|
|
|
if (this.radio1 == 1) { |
|
|
|
this.lbgName = [] |
|
|
|
} |
|
|
|
}, |
|
|
|
transCompanyInput() { |
|
|
|
this.tui.request("/worker/getWXByCondition", "post", {}, false, false).then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
this.orderByWorkerList = res.result; |
|
|
|
this.orderByWorkerCandidates = res.result.map(item => { |
|
|
|
return item.workerName |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.tui.toast(res.message) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
open() { |
|
|
|
this.popupShow = true |
|
|
|
}, |
|
|
|
close() { |
|
|
|
this.popupShow = false |
|
|
|
}, |
|
|
|
sureReturn() { |
|
|
|
sureReturn() { |
|
|
|
if(this.radio1 == 0){ |
|
|
|
if(this.lbgName == []){ |
|
|
|
this.tui.toast("请选择配送人员") |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
this.list.forEach(item1 => { |
|
|
|
item1.stockLogList1.forEach(item2 => { |
|
|
|
if (item2.returnCount) { |
|
|
|
@ -479,14 +493,6 @@ |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
let worderId = '' |
|
|
|
if (this.orderByWorker) { |
|
|
|
for (let key in this.orderByWorkerList) { |
|
|
|
if (this.orderByWorker == this.orderByWorkerList[key].workerName) { |
|
|
|
worderId = this.orderByWorkerList[key].workerId |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
this.sales.noEarn = this.sales.newNoEarn; |
|
|
|
this.sales.saleId = this.sales.id; |
|
|
|
this.sales.totalAomount = this.returnAmount; |
|
|
|
@ -494,7 +500,7 @@ |
|
|
|
returnSale: this.sales, |
|
|
|
returnSaleDetailList: this.list, |
|
|
|
transCompany: this.radio1 == 0 ? '99999999' : '', |
|
|
|
orderByWorker: worderId, |
|
|
|
orderByWorker: this.lbgName.workerId, |
|
|
|
isReturnPrice: 1 |
|
|
|
}, false, false).then((res) => { |
|
|
|
uni.showToast({ |
|
|
|
|