diff --git a/pages/index/downStearmList.vue b/pages/index/downStearmList.vue index eb2a65a..22ff4b8 100644 --- a/pages/index/downStearmList.vue +++ b/pages/index/downStearmList.vue @@ -311,7 +311,7 @@ } this.zPrice = this.zNum * this.purchasePrice }, - //编辑每一个的单价 + //点击开单按钮,调起地址输入窗 clickPrice() { this.$refs.inputDialog.open('bottom') }, @@ -338,8 +338,13 @@ }, //选择商品查询商品规格 - checkGoods(item) { - this.purchasePrice = item.price; + checkGoods(item) { + if(this.priceType == 1){ //批发价 + this.purchasePrice = item.wholesalePrice; + }else{ + this.purchasePrice = item.price; + } + this.goodsDetail = item; this.temporaryList = [] this.columns = [] diff --git a/pages/index/downarrears.vue b/pages/index/downarrears.vue index 1e0defb..537bab3 100644 --- a/pages/index/downarrears.vue +++ b/pages/index/downarrears.vue @@ -18,7 +18,6 @@ - @@ -37,10 +36,7 @@ return { userId: '', nickname: '', - list: [], - status: 'loadmore', - pages:1, - pageNumber:1 + list: [] } }, onLoad(options) { @@ -50,26 +46,14 @@ }, onShow(){ this.getList() - }, - onReachBottom() { - if (this.pages >= this.pageNum) return; - this.status = 'loading'; - this.pages = ++this.pages; - this.getList(); }, methods: { getList() { this.tui.request("/app/sale/customSale", "post", { userId: this.userId - }, false, true).then((res) => { - this.status = 'nomore'; - if (res.code == 200) { - if (this.pages == 1) { - this.list = res.result - } else { - this.list = [...this.list, ...res.result] - } - this.pageNumber = res.result.pages + }, false, true).then((res) => { + if (res.code == 200) { + this.list = res.result } else { this.tui.toast(res.message) } diff --git a/pages/index/downstream.vue b/pages/index/downstream.vue index 125d1b3..39801bd 100644 --- a/pages/index/downstream.vue +++ b/pages/index/downstream.vue @@ -45,7 +45,7 @@ export default { getList() { this.tui.request("/app/customer/debt", "POST", {}, false, true).then((res) => { if(res.code == 200){ - this.list = res.result + this.list = res.result.records }else{ this.tui.toast(res.message) } diff --git a/pages/index/home.vue b/pages/index/home.vue index f296eb0..dbcecda 100644 --- a/pages/index/home.vue +++ b/pages/index/home.vue @@ -9,7 +9,7 @@ } }, - onLoad() { + onLoad(option) { uni.showLoading({ title: '加载中...' }) @@ -27,7 +27,11 @@ url: '/pages/other/custom' }) } - } else { + } else if(option.khid){ + uni.reLaunch({ + url: '/pages/index/downStearmList?khid='+option.khid + }) + }else { uni.reLaunch({ url: '/pages/login/login' }) diff --git a/pages/index/orderDetail.vue b/pages/index/orderDetail.vue index 9640db1..07a2abe 100644 --- a/pages/index/orderDetail.vue +++ b/pages/index/orderDetail.vue @@ -13,7 +13,7 @@ 暂无图片 {{item.productName}} ({{item.productSn == null ? '暂无':item.productSn}}) - 单价:{{item.purchasePrice == null ? '暂无':item.purchasePrice}} 数量:{{item.productCount == null ? '暂无':item.productCount}} 总价:{{item.discountAmount == null ? '暂无':item.discountAmount}} + 单价:{{item.discountAmount == null ? '暂无':item.discountAmount}} 数量:{{item.productCount == null ? '暂无':item.productCount}} 总价:{{item.productCount * item.discountAmount}} 供应商:{{item.supplierName == null ? '暂无':item.supplierName}} @@ -36,6 +36,13 @@ {{ sales.totalAmount == null ?'暂无':sales.totalAmount }} + + 总成本 + + ¥ + {{ sales.zongchengben == null ?'暂无':sales.zongchengben }} + + 实收金额 @@ -72,20 +79,19 @@ - 已选金额 + 退货金额 ¥ {{ changeAmount}} - + - + --> + + @@ -258,7 +276,8 @@ collection:[], lbgName:[], returnAmount:0, - shopData:[] + shopData:[], + changeA:'' } }, components: { @@ -275,8 +294,8 @@ } }); }) - this.returnAmount = (sum * this.sales.discount * 0.1).toFixed(2) - return (sum * this.sales.discount * 0.1).toFixed(2) + this.returnAmount = sum.toFixed(2) + return this.returnAmount } else { return 0 } @@ -303,6 +322,7 @@ }, onShow(){ this.lbgName = JSON.parse(JSON.stringify(this.lbgName)) + this.type=uni.getStorageSync('type') }, onLoad(option) { if (option.id != null && option.id != undefined && option.id != "") { @@ -324,7 +344,22 @@ this.tui.request("/app/sale/get/" + option.id, "GET", null, false, false).then((res) => { if (res.code == 200 && res.result != null && res.result != undefined) { this.sales = res.result.sale - this.list = res.result.saleDetailDTOList + this.list = res.result.saleDetailDTOList + for(var i=0;i { - item1.stockLogList1.forEach(item2 => { + item1.stockLogList1.forEach((item2,index) => { + console.log(index) if (item2.returnCount) { item2.productCount = item2.returnCount - } else { - item2.productCount = 0 + } else { + item1.stockLogList1.splice(index, 1) } }) - }) - this.sales.saleId = this.sales.id; - this.sales.totalAomount = this.returnAmount; + }) + for(var i=0;i - \ No newline at end of file diff --git a/pages/index/shareStyle.vue b/pages/index/shareStyle.vue index 7d67294..59d19ce 100644 --- a/pages/index/shareStyle.vue +++ b/pages/index/shareStyle.vue @@ -1,7 +1,7 @@