From 2a32b31249307c05d10761fdeb12a9a60bff3dd9 Mon Sep 17 00:00:00 2001 From: wangfukang <15630117759@163.com> Date: Sun, 25 Feb 2024 10:40:23 +0800 Subject: [PATCH] 111 --- pages/index/downStearmList.vue | 12 ++++++++++-- pages/index/shareStyle.vue | 18 ++++++++++++------ pages/inventory/goodsList1.vue | 13 ++++++++++--- 3 files changed, 32 insertions(+), 11 deletions(-) diff --git a/pages/index/downStearmList.vue b/pages/index/downStearmList.vue index 22ff4b8..403eaa7 100644 --- a/pages/index/downStearmList.vue +++ b/pages/index/downStearmList.vue @@ -525,7 +525,7 @@ province: this.addressObj.province, receiveAddress: that.formData.address, totalAmount: that.zPrice, //应付金额 - shopId: this.shopId + shopId: this.shopId, }, saleDetailList: this.carList } @@ -580,7 +580,15 @@ if (res.code == 200) { this.shopList = res.result.shareList.records this.priceType = res.result.share.priceType - this.shopId = res.result.shareList.records[0].shopId + this.shopId = res.result.shareList.records[0].shopId + for(var i= 0;i - + @@ -163,13 +163,18 @@ uni.redirectTo({ url: "/pages/index/downStearmList?khid=" + options.khid }) + }else{ + this.type = uni.getStorageSync('type') + this.getGategoryList() } - this.type = uni.getStorageSync('type') - this.getGategoryList() + }, methods: { //初始化获取分类列表 - getGategoryList() { + getGategoryList() { + this.shopList = [] + this.indexList = [] + this.goodsList = [] this.tui.request("/app/productCategory/list", "get", {}, false, true).then((res) => { if (res.code == 200) { this.indexList = res.result; @@ -220,7 +225,7 @@ //顶部搜索框 search(res) { this.searchName = res.value - this.getShareList() + this.getGategoryList() }, //未入库遮罩 clickMask() { @@ -239,7 +244,8 @@ } } this.categoryId = this.shopList[index].id - this.goodsList = this.shopList[index] + this.goodsList = this.shopList[index] + console.log(this.goodsList) }, //选中商品 checkboxChange(item) { diff --git a/pages/inventory/goodsList1.vue b/pages/inventory/goodsList1.vue index ab01bfb..0629ee9 100644 --- a/pages/inventory/goodsList1.vue +++ b/pages/inventory/goodsList1.vue @@ -1145,7 +1145,8 @@ uni.showToast({ title: "开单成功", icon: 'none' - }) + }) + console.log(this.carList) setTimeout(res => { this.$refs.printerPopup.open('center') }, 1000) @@ -1165,8 +1166,14 @@ //打印小票 onPrint(opt) { let that = this; - that.yNum = 150 - let strCmd = blesdk.CreatCPCLPage(600, 2040, 1, 0); + that.yNum = 150 + let heightNum = 300 + heightNum += this.carList.size * 40 + this.carList.forEach(function(value, key) { + heightNum += value.stockLogList.size * 30 + + }) + let strCmd = blesdk.CreatCPCLPage(600, heightNum, 1, 0); strCmd += blesdk.addCPCLSETMAG(2, 2) blesdk.addCPCLSETBOLD('bold') strCmd += blesdk.addCPCLLocation(2);