diff --git a/pages/index/order.vue b/pages/index/order.vue index 5e8e133..b9b5a9d 100644 --- a/pages/index/order.vue +++ b/pages/index/order.vue @@ -109,6 +109,7 @@ dataList.push(obj) } item.name = item.userName; + item.id = item.userId uni.setStorageSync('khName',JSON.stringify(item)) uni.setStorageSync('carList1',JSON.stringify(dataList)) uni.switchTab({ diff --git a/pages/index/orderDetail.vue b/pages/index/orderDetail.vue index bc0259c..70548d9 100644 --- a/pages/index/orderDetail.vue +++ b/pages/index/orderDetail.vue @@ -73,25 +73,25 @@ 已选金额 - ¥ - - + ¥ + {{ changeAmount}} 退货金额 ¥ - {{ returnAmount}} + + - + 还款金额 @@ -110,7 +110,7 @@ 配送人员 - + @@ -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", { diff --git a/pages/index/returnList.vue b/pages/index/returnList.vue index 5d34dcb..785a8a4 100644 --- a/pages/index/returnList.vue +++ b/pages/index/returnList.vue @@ -1,23 +1,31 @@