diff --git a/package1/AI/AIHangOrderList.vue b/package1/AI/AIHangOrderList.vue index 59b3c43..63ae986 100644 --- a/package1/AI/AIHangOrderList.vue +++ b/package1/AI/AIHangOrderList.vue @@ -264,6 +264,7 @@ pecsList: [], dataObj: new Map(), allChangeNum:0, + isPlusAndMinus:false, shopName:'' } }, @@ -504,16 +505,25 @@ // } // if (this.temporaryList.length == 0) { if (jishuqi == this.goodsList.length) { - console.log(jishuqi) + console.log('value',value) + console.log('temporaryList',this.temporaryList) for (var i = 0; i < value.length; i++) { - this.attributeList = { - attributeList: value[i], - productCount: this.temporaryNum, - productNum: this.productNum, - name: evalue[i], - price: this.purchasePrice + let isTrue = false + for (var m = 0; m < this.temporaryList.length; m++) { + if(this.temporaryList[m].attributeList == value[i]){ + isTrue = true + } + } + if(isTrue == false){ + this.attributeList = { + attributeList: value[i], + productCount: this.temporaryNum, + productNum: this.productNum, + name: evalue[i], + price: this.purchasePrice + } + this.temporaryList.push(this.attributeList); } - this.temporaryList.push(this.attributeList); } } this.$forceUpdate() @@ -738,24 +748,37 @@ } }, + sliceMsg(val) { + var name = '' + if (typeof(val) == 'string') { + let newObj = JSON.parse(val) + for (let as in newObj) { + name += newObj[as] + '/' + } + } + return name; + }, //带参数跳转到开单页 goSaleGoods(item) { let dataList = [] + console.log('11',item); if(item.saleDetailDTOList){ for (let i = 0; i < item.saleDetailDTOList.length; i++) { let obj = {} let attrMap = new Map() let newSaleDetailDTOList = [] + let num = 0 for(let m = 0; m < item.saleDetailDTOList[i].stockLogList1.length; m++){ + if(attrMap.has(item.saleDetailDTOList[i].stockLogList1[m].attributeList) == true){ let hasCount = attrMap.get(item.saleDetailDTOList[i].stockLogList1[m].attributeList) - let trueCount = hasCount.split('-')[0] - let lastConut = Number(trueCount) + Number(item.saleDetailDTOList[i].stockLogList1[m].productCount) - newSaleDetailDTOList[hasCount.split('-')[1]].productCount = lastConut + newSaleDetailDTOList[hasCount].productCount = Number(newSaleDetailDTOList[hasCount].productCount) + Number(item.saleDetailDTOList[i].stockLogList1[m].productCount) }else{ + item.saleDetailDTOList[i].stockLogList1[m].name = this.sliceMsg(item.saleDetailDTOList[i].stockLogList1[m].attributeList) newSaleDetailDTOList.push(item.saleDetailDTOList[i].stockLogList1[m]) - attrMap.set(item.saleDetailDTOList[i].stockLogList1[m].attributeList,item.saleDetailDTOList[i].stockLogList1[m].productCount+'-'+m) + attrMap.set(item.saleDetailDTOList[i].stockLogList1[m].attributeList,num) + num++ } } obj.saleDetailQueryDTO = newSaleDetailDTOList @@ -843,6 +866,7 @@ }, //通过商品id查询商品详细信息 getById(id) { + this.temporaryList = [] this.tui.request("/app/product/getById/" + id, "POST", {}, false, true).then((res) => { if (res.code == 200) { if(res.result.delFlag ==0 || res.result.purchasePrice==null || res.result.inStorageStatus == 0){ diff --git a/package1/inventory/batchPrint.vue b/package1/inventory/batchPrint.vue index fa6f04d..a108374 100644 --- a/package1/inventory/batchPrint.vue +++ b/package1/inventory/batchPrint.vue @@ -79,7 +79,7 @@ 已选商品 - + {{item.productName}} ({{item.productSn}}) @@ -140,7 +140,8 @@ components: { kkPrinter }, - onLoad(options) { + onLoad(options) { + wx.openBluetoothAdapter({mode: 'central'}) this.height = wx.getSystemInfoSync().windowHeight if (options.khid != undefined) { uni.redirectTo({ @@ -346,8 +347,14 @@ strCmd += blesdk.addCPCLLocation(0); //对齐指令 0-左对齐 1-右对齐 2-居中 strCmd += blesdk.addCPCLPrint(); this.bufferData.push(strCmd); - this.$refs.payDialog.close(); } + that.$nextTick(()=>{ + that.$refs.payDialog.close(); + that.bufferData = [] + uni.navigateBack({ + delta: 1 + }) + }) } } } diff --git a/package1/other/custom.vue b/package1/other/custom.vue index 890db07..14922c4 100644 --- a/package1/other/custom.vue +++ b/package1/other/custom.vue @@ -29,7 +29,7 @@ 订单状态: - {{ item.status == '0' ?'待抢单' :item.status == '1' ?'待取货' :item.status == '2' ?'作废':item.status == '3' ?'待送达' :item.status == '4' ?'已完成' :item.status == '5' ?'下游客户待退货' :item.status == '00' ?'退货待抢单' :item.status == '01' ?'退货待取货' :item.status == '03' ?'退货待送达' :item.status == '04' ?'待确认退货' :item.status == '6' ?'待配货' :'挂单'}} + {{item.status == '0' ?'待抢单' :item.status == '2' ?'作废' :item.status == '1' ?'待取货' :item.status == '3' ?'待送达' :item.status == '4' ?'已完成' :item.status == '5' ?'下游客户待退货' :item.status == '00' ?'退货待抢单' :item.status == '01' ?'退货待取货' :item.status == '03' ?'退货待送达' :item.status == '04' ?'待确认退货' :item.status == '6' ?'待配货':item.status == '8' ?'待物流上门':item.status == '9' ?'已完成' :'挂单'}} 查看详情 diff --git a/package1/other/customDetail.vue b/package1/other/customDetail.vue index aac565c..7c099da 100644 --- a/package1/other/customDetail.vue +++ b/package1/other/customDetail.vue @@ -13,7 +13,11 @@ 暂无图片 {{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) == null ?'暂无':(item.productCount * item.discountAmount)}} + 供应商:{{item.supplierName == null ? '暂无':item.supplierName}} @@ -156,7 +160,7 @@ 配送状态: - {{ sales.status == '0' ?'待抢单' :sales.status == '1' ?'待取货' :sales.status == '2' ?'作废':sales.status == '3' ?'待送达' :sales.status == '4' ?'已完成' :sales.status == '5' ?'下游客户待退货' :sales.status == '00' ?'退货待抢单' :sales.status == '01' ?'退货待取货' :sales.status == '03' ?'退货待送达' :sales.status == '04' ?'待确认退货' :sales.status == '6' ?'待配货' :'挂单'}} + {{sales.status == '0' ?'待抢单' :sales.status == '2' ?'作废' :sales.status == '1' ?'待取货' :sales.status == '3' ?'待送达' :sales.status == '4' ?'已完成' :sales.status == '5' ?'下游客户待退货' :sales.status == '00' ?'退货待抢单' :sales.status == '01' ?'退货待取货' :sales.status == '03' ?'退货待送达' :sales.status == '04' ?'待确认退货' :sales.status == '6' ?'待配货':sales.status == '8' ?'待物流上门':sales.status == '9' ?'已完成' :'挂单'}} @@ -213,7 +217,16 @@ 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 < this.list.length; i++) { + for (var m = 0; m < this.list[i].stockLogList1.length; m++) { + if (this.list[i].productCount == null) { + this.list[i].productCount = this.list[i].stockLogList1[m].productCount + } else { + this.list[i].productCount += this.list[i].stockLogList1[m].productCount + } + } + } this.order = res.result.customer this.orderXd = res.result.orderXd this.shopData = res.result.shop diff --git a/package1/other/logistics.vue b/package1/other/logistics.vue index 0ec314a..ab74d2a 100644 --- a/package1/other/logistics.vue +++ b/package1/other/logistics.vue @@ -163,7 +163,8 @@ url: this.tui.interfaceUrl() + '/app/sale/getSaleByCompanyId', data: { companyId:this.id, - modeOfService:2 + modeOfService:2, + status:8 }, header: { 'content-type': 'application/json', diff --git a/package1/other/logisticsAddress.vue b/package1/other/logisticsAddress.vue index f74c7d8..9c9184e 100644 --- a/package1/other/logisticsAddress.vue +++ b/package1/other/logisticsAddress.vue @@ -4,11 +4,11 @@ - + {{item.province +'-'+ item.city+'-'+item.area}} - - {{item.network == null ?'':item.network}} + + {{item.network == null ?'':item.network}}