diff --git a/pages/index/addStock.vue b/pages/index/addStock.vue index 41f6ba2..d5742f9 100644 --- a/pages/index/addStock.vue +++ b/pages/index/addStock.vue @@ -55,7 +55,7 @@ 已选择 {{carList.length}} + class="uni-tab__dot">{{carList.size}} 选好了 @@ -64,33 +64,36 @@ - + - + 暂无图片 - {{item.productName}} - {{item.productSn}} + {{value[1].productName}} + {{value[1].productSn}} - 供应商:{{item.supplierName}} - + 供应商:{{value[1].supplierName}} + - + - {{item1.attributeList | sliceMsg}} + {{values[0] | sliceMsg}} + + + {{values[1].stockCount}} - + @@ -120,7 +123,7 @@ categoryId: '', //分类id searchName: '', //搜索框输入值 shopId: '', //店铺id, - carList: [], + carList: new Map(), attributeList: [], purchasePrice: 0, storageType: '', @@ -152,28 +155,41 @@ onShow(){ let that = this; this.pdList = this.pdList - console.log('你好',this.pdList) - if(this.carList.length == 0){ //carList没有数据 - this.carList.push(this.pdList) - }else{ //carList有数据 - for(let i=0;i备注 - {{ sales.remark == null ?'':sales.remark}} + {{ sales.remark == null ?'':sales.remark}} @@ -590,7 +590,7 @@ this.tui.toast("请输入取货地址") return } - if(this.$refs.returnClose.val == ''){ + if(this.$refs.returnClose.val == '' || this.$refs.returnClose.val <= 0){ this.tui.toast("金额不能为空") return } @@ -606,8 +606,16 @@ } } console.log(this.list) - for (var i = 0; i < this.list.length; i++) { + for (var i = 0; i < this.list.length; i++) { + if(this.list[i].stockLogList.length == 0){ + this.tui.toast("退货数量不能为零") + return; + } for (var m = 0; m < this.list[i].stockLogList.length; m++) { + if(this.list[i].stockLogList[m].returnCount <= 0){ + this.tui.toast("退货数量不能为零") + return; + } this.list[i].stockLogList[m].productCount = this.list[i].stockLogList[m].returnCount if(this.list[i].stockLogList.length >0){ if (m == 0) { diff --git a/pages/index/peopleList.vue b/pages/index/peopleList.vue index 5ce7c1c..9e6d093 100644 --- a/pages/index/peopleList.vue +++ b/pages/index/peopleList.vue @@ -276,14 +276,14 @@ }, //查询拉包工和快递人员的列表 kdyOrlbgList() { - this.tui.request("/worker/getWXByCondition", "post", { + this.tui.request("/worker/getByCondition", "post", { ownerCompany: this.companyType, //公司id,如果是快递公司,才需要传 searchStr:this.searchName, pageNum: 1, pageSize: 10 }, false, false).then((res) => { if (res.code == 200) { - this.popleList = res.result; + this.popleList = res.result.content; }else{ this.tui.toast(res.message) } diff --git a/pages/inventory/addGoods.vue b/pages/inventory/addGoods.vue index 1cbef20..b4f65fe 100644 --- a/pages/inventory/addGoods.vue +++ b/pages/inventory/addGoods.vue @@ -204,32 +204,39 @@ // 触发提交表单 submit() { let that = this; - let url = '' - this.$refs.form.validate().then(res => { - if(that.dataList !=''){ - url = '/app/product/edit' - res.id = that.dataList.id - }else{ - url = '/app/product/save' + that.tui.request('/app/product/getByProductSn', "post", { + productSn:this.formData.productSn + }, false, true).then((res1) => { + if (res1.code == 200) { + } - if(res.productPicture == ''){ - res.productPicture = '' - } - that.tui.request(url, "post", res, false, false).then((res1) => { - if (res1.code == 200) { - uni.navigateBack({ - delta: 1 - }) - } else { - uni.showToast({ - title: "添加失败", - icon: 'none' - }) - } - }) - }).catch(err => { + }) + // let url = '' + // this.$refs.form.validate().then(res => { + // if(that.dataList !=''){ + // url = '/app/product/edit' + // res.id = that.dataList.id + // }else{ + // url = '/app/product/save' + // } + // if(res.productPicture == ''){ + // res.productPicture = '' + // } + // that.tui.request(url, "post", res, false, false).then((res1) => { + // if (res1.code == 200) { + // uni.navigateBack({ + // delta: 1 + // }) + // } else { + // uni.showToast({ + // title: "添加失败", + // icon: 'none' + // }) + // } + // }) + // }).catch(err => { - }) + // }) }, //跳转分类页 goGategoryLow() { diff --git a/pages/inventory/goodsList1.vue b/pages/inventory/goodsList1.vue index 8fb5060..9fece04 100644 --- a/pages/inventory/goodsList1.vue +++ b/pages/inventory/goodsList1.vue @@ -776,10 +776,10 @@ num.unitPrice = price; num.price = price * num.productCount; this.$refs.inputDialog.close() - this.getAllPrice() num.discountAmount = num.unitPrice * num.discount / 10 num.price = num.unitPrice * num.discount / 10 * num.productCount that.relPrice = that.shouldPay + this.getAllPrice() }, //整体选择时使用批发价、零售价,选择整体折扣的方法 getAmountAndWho(){ @@ -1157,25 +1157,25 @@ this.saleDetailList = purchaseDetails; obj.saleDetailList = purchaseDetails; let url = '' - // if (this.saleId != '') { - // url = '/app/sale/shareToBuyNew' - // } else { - // url = '/app/sale/buyNew' - // } - // this.tui.request(url, "post", obj, false, false).then((res) => { - // if (res.code == 200) { - // uni.showToast({ - // title: "开单成功", - // icon: 'none' - // }) - // setTimeout(res => { - // this.$refs.printerPopup.open('center') - // }, 1000) - - // } else { - // this.tui.toast(res.message) - // } - // }) + if (this.saleId != '') { + url = '/app/sale/shareToBuyNew' + } else { + url = '/app/sale/buyNew' + } + this.tui.request(url, "post", obj, false, false).then((res) => { + if (res.code == 200) { + uni.showToast({ + title: "开单成功", + icon: 'none' + }) + setTimeout(res => { + this.$refs.printerPopup.open('center') + }, 1000) + + } else { + this.tui.toast(res.message) + } + }) }, //打印取消按钮 @@ -1194,7 +1194,7 @@ heightNum += value.stockLogList.size * 30 }) - let strCmd = blesdk.CreatCPCLPage(600, heightNum, 1, 0); + let strCmd = blesdk.CreatCPCLPage(600, 5000, 1, 0); strCmd += blesdk.addCPCLSETMAG(2, 2) blesdk.addCPCLSETBOLD('bold') strCmd += blesdk.addCPCLLocation(2); @@ -1211,7 +1211,7 @@ this.carList.forEach(function(value, key) { strCmd += blesdk.addCPCLText('0', that.countPrint(), '24', '0', 0, value.productName + '(' + - value.productSn + ')' + '折扣:' + (value.discount < 10 ? value.discount : '无折扣')) + value.productSn + ')') value.stockLogList.forEach(function(value1, key1) { strCmd += blesdk.addCPCLText('0', that.countPrint(), '24', '0', 0, (that.slicePrint( key1)) + '*' + value1) @@ -1235,7 +1235,7 @@ strCmd += blesdk.addCPCLText('0', this.countPrint(), '24', '0', 0, '备注:' + part1) strCmd += blesdk.addCPCLText('0', this.countPrint(), '24', '0', 0, part2) }else{ - strCmd += blesdk.addCPCLText('0', this.countPrint(), '24', '0', 0, '备注:' + this.remark) + strCmd += blesdk.addCPCLText('0', 3000, '24', '0', 0, '备注:' + this.remark) } strCmd += blesdk.addCPCLLocation(0); strCmd += blesdk.addCPCLPrint(); diff --git a/pages/inventory/inventory.vue b/pages/inventory/inventory.vue index 5f919a6..e63eb97 100644 --- a/pages/inventory/inventory.vue +++ b/pages/inventory/inventory.vue @@ -312,13 +312,15 @@ .content-box { background: #fff; flex: 1; - display: flex; + display: flex; + overflow: scroll; } .content-left { width: 170rpx; background: #eee; - height: 100%; + height: 100%; + overflow: scroll; } .left-box {