From 629e5af8a6660a4a4686d569ecf68416a9f02412 Mon Sep 17 00:00:00 2001 From: "tianyi@bogon" Date: Fri, 27 Oct 2023 21:16:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8C=82=E5=8D=95=E3=80=81=E5=BC=80=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/billing/changeGoods1.vue | 51 -------- pages/index/addHangOrder.vue | 4 +- pages/index/orderDetail.vue | 199 +++++++++++++++++-------------- pages/index/peopleList.vue | 11 +- pages/index/shareStyle.vue | 106 ++++++++-------- pages/inventory/addGoods.vue | 44 +++++-- pages/inventory/addinventory.vue | 159 ++++++++++++------------ pages/inventory/inventory.vue | 6 +- 8 files changed, 294 insertions(+), 286 deletions(-) diff --git a/pages/billing/changeGoods1.vue b/pages/billing/changeGoods1.vue index cf53e90..4d39b2e 100644 --- a/pages/billing/changeGoods1.vue +++ b/pages/billing/changeGoods1.vue @@ -38,11 +38,6 @@ - @@ -303,13 +298,6 @@ } }, - // //底部左侧购物车按钮 - // onClick(e) { - // uni.showToast({ - // title: `点击${e.content.text}`, - // icon: 'none' - // }) - // }, //选择商品查询商品规格 checkGoods(item) { this.goodsDetail = item @@ -342,16 +330,6 @@ } }, - //底部右侧两个分享按钮 - buttonClick(e) { - - if (e == 'all') { - console.log("全部") - } else { - console.log("单个") - } - this.options[0].info++ - }, //顶部搜索框 search(res) { this.searchName = res.value @@ -371,35 +349,6 @@ } this.getShareList(this.indexList[index].id) }, - //选中商品 - checkboxChange(e) { - var items = this.shopList, - values = e.detail.value; - for (var i = 0, lenI = items.length; i < lenI; ++i) { - const item = items[i] - if (values.includes(item.id)) { - this.$set(item, 'checked', true) - } else { - this.$set(item, 'checked', false) - } - } - }, - //点击分享按钮 - clickShareBtn(e) { - if (e == 'all') { - console.log("全部"); - } else { - console.log("单个") - } - this.info++ - }, - //分享功能(path中带着一个id,用户点击后拿着id跳转到一个客户商品选择页) - onShareAppMessage() { - return { - title: '商品分类', - path: '/pages/login/login?id=123', - } - }, inputDialogToggle() { this.$refs.inputDialog.open() }, diff --git a/pages/index/addHangOrder.vue b/pages/index/addHangOrder.vue index 92a9d3b..f120951 100644 --- a/pages/index/addHangOrder.vue +++ b/pages/index/addHangOrder.vue @@ -19,7 +19,9 @@ - 单价 + + 备注: + diff --git a/pages/index/orderDetail.vue b/pages/index/orderDetail.vue index 5aecfa5..9dd264f 100644 --- a/pages/index/orderDetail.vue +++ b/pages/index/orderDetail.vue @@ -13,7 +13,7 @@ --> {{ val.attributeList.substr(1).substring(0,val.attributeList.substr(1).length-1).replace(/\"/g, "") }} * {{val.productCount}} - @@ -59,20 +59,23 @@ 还款金额 - + + 平台取货 - + - - + + 配送人员 - + @@ -82,19 +85,20 @@ 退款历史信息 - - - - - {{ val.attributeList.substr(1).substring(0,val.attributeList.substr(1).length-1).replace(/\"/g, "") }} - * {{val.productCount}} - - - - - + {{ val.attributeList.substr(1).substring(0,val.attributeList.substr(1).length-1).replace(/\"/g, "") }} + * {{val.productCount}} + + + + + @@ -106,8 +110,11 @@ {{ sales.id }} - 物流单号: - {{ order.kdOrderId }} + 物流单: + + 创建时间: @@ -135,10 +142,12 @@ 取消订单 - {{ !isReturn ? '退货' : '确认退货'}} + {{ !isReturn ? '退货' : '确认退货'}} - 汇款 + 汇款 确认 @@ -161,8 +170,8 @@ text: '否', value: 1 }], - orderByWorkerCandidates:[], - orderByWorker:'', + orderByWorkerCandidates: [], + orderByWorker: '', bufferData: '', show: false, popupShow: false, @@ -170,30 +179,30 @@ order: {}, list: [], isReturn: false, - orderByWorkerList:[], - inventoryList:[], - shopList:[], + orderByWorkerList: [], + inventoryList: [], + shopList: [], editNoPrice: false, - newEarn: 0, - qrcodeData:'' + newEarn: 0, + qrcodeData: '' } }, - components:{ - kkPrinter + components: { + kkPrinter }, computed: { returnAmount() { if (this.changeAmount) { - console.log(this.changeAmount,'this.changeAmount'); - if(this.sales.noEarn >= this.changeAmount) { + console.log(this.changeAmount, 'this.changeAmount'); + if (this.sales.noEarn >= this.changeAmount) { this.sales.newNoEarn = (this.sales.noEarn - this.changeAmount).toFixed(2); console.log(this.sales.newNoEarn); return 0 } else { - this.sales.newNoEarn = 0 - return (this.changeAmount - this.sales.noEarn).toFixed(2) - } + this.sales.newNoEarn = 0 + return (this.changeAmount - this.sales.noEarn).toFixed(2) } + } }, changeAmount() { if (this.isReturn) { @@ -230,39 +239,40 @@ } }, methods: { - onPrint(opt){ - /** - * 打印文字 addCPCLText - * x: 文字方块左上角X座标,单位dot - * y: 文字方块左上角Y座标,单位dot - * fontName,fontSize: 字体,取值: 參考文檔 - * rotation: 旋转 1-90度 2-180度 3-270度 其他-不旋转 - * content: 文字内容 - */ + onPrint(opt) { + /** + * 打印文字 addCPCLText + * x: 文字方块左上角X座标,单位dot + * y: 文字方块左上角Y座标,单位dot + * fontName,fontSize: 字体,取值: 參考文檔 + * rotation: 旋转 1-90度 2-180度 3-270度 其他-不旋转 + * content: 文字内容 + */ //快递单600*1040 入库单440*320 - let strCmd =blesdk.CreatCPCLPage(600,1040,1,1); - strCmd += blesdk.addCPCLSETMAG(2,2) - blesdk.addCPCLSETBOLD('bold') - strCmd += blesdk.addCPCLText('40', '30','24', '0',0,'沧州明珠商贸城--快衣店') - strCmd += blesdk.addCPCLSETMAG(3,3) + let strCmd = blesdk.CreatCPCLPage(600, 1040, 1, 1); + strCmd += blesdk.addCPCLSETMAG(2, 2) + blesdk.addCPCLSETBOLD('bold') + strCmd += blesdk.addCPCLText('40', '30', '24', '0', 0, '沧州明珠商贸城--快衣店') + strCmd += blesdk.addCPCLSETMAG(3, 3) + blesdk.addCPCLSETBOLD('bold') + strCmd += blesdk.addCPCLText('50', '120', '24', '0', 0, '收:' + this.order.name) + strCmd += blesdk.addCPCLSETMAG(1, 1) + strCmd += blesdk.addCPCLText('50', '250', '24', '0', 0, this.order.phone) + strCmd += blesdk.addCPCLSETMAG(2, 2) blesdk.addCPCLSETBOLD('bold') - strCmd += blesdk.addCPCLText('50', '120','24', '0',0,'收:'+this.order.name) - strCmd += blesdk.addCPCLSETMAG(1,1) - strCmd += blesdk.addCPCLText('50', '250','24', '0',0,this.order.phone) - strCmd += blesdk.addCPCLSETMAG(2,2) - blesdk.addCPCLSETBOLD('bold') - strCmd += blesdk.addCPCLText('50', '330','24', '0',0,this.order.province+'/'+this.order.city+'/'+this.order.area) - strCmd += blesdk.addCPCLSETMAG(1,1) - strCmd += blesdk.addCPCLText('50', '410','24', '0',0,this.order.address) - strCmd += blesdk.addCPCLSETMAG(2,2) - blesdk.addCPCLSETBOLD('bold') - strCmd += blesdk.addCPCLText('0', '490','24', '0',0,'——————————————————————————————') - strCmd += blesdk.addCPCLText('50', '570','24', '0',0,'发货方式:虚拟物流') - strCmd += blesdk.addCPCLSETMAG(2,2) - strCmd += blesdk.addCPCLText('0', '650','24', '0',0,'——————————————————————————————') - strCmd += blesdk.addCPCLText('50', '730','24', '0',0,'店铺:张三的店') - strCmd += blesdk.addCPCLText('50', '810','24', '0',0,'13521030702') - strCmd += blesdk.addCPCLText('50', '890','24', '0',0,'地址:早市10059') + strCmd += blesdk.addCPCLText('50', '330', '24', '0', 0, this.order.province + '/' + this.order.city + '/' + + this.order.area) + strCmd += blesdk.addCPCLSETMAG(1, 1) + strCmd += blesdk.addCPCLText('50', '410', '24', '0', 0, this.order.address) + strCmd += blesdk.addCPCLSETMAG(2, 2) + blesdk.addCPCLSETBOLD('bold') + strCmd += blesdk.addCPCLText('0', '490', '24', '0', 0, '——————————————————————————————') + strCmd += blesdk.addCPCLText('50', '570', '24', '0', 0, '发货方式:虚拟物流') + strCmd += blesdk.addCPCLSETMAG(2, 2) + strCmd += blesdk.addCPCLText('0', '650', '24', '0', 0, '——————————————————————————————') + strCmd += blesdk.addCPCLText('50', '730', '24', '0', 0, '店铺:张三的店') + strCmd += blesdk.addCPCLText('50', '810', '24', '0', 0, '13521030702') + strCmd += blesdk.addCPCLText('50', '890', '24', '0', 0, '地址:早市10059') // strCmd += blesdk.addCPCLText(200,0,'24','5',0,'收件联');// 文字 // for (let item in this.list) { // console.log(item, this.list,this.list[item] ); @@ -271,19 +281,25 @@ // strCmd += blesdk.addCPCLText('', '', val.attributeList.substr(1).substring(0,val.attributeList.substr(1).length-1).replace(/\"/g, "") + '*'+ val.productCount, '', '', '') // }) // } - // strCmd += blesdk.addCPCLText('', '', '已付款:',this.sales.alreadyEarn,'', '') + // strCmd += blesdk.addCPCLText('', '', '已付款:',this.sales.alreadyEarn,'', '') // strCmd += blesdk.addCPCLQRCode(400,0,'H','1',5,'2348902384932843290') //二维码 strCmd += blesdk.addCPCLLocation(0); //对齐指令 0-左对齐 1-右对齐 2-居中 strCmd += blesdk.addCPCLPrint(); this.bufferData = strCmd; }, + //点击图片放大 + showImage() { + uni.previewImage({ + urls: ["https://jewel-shop.oss-cn-beijing.aliyuncs.com/f02827ca8a7b4decadca812cb2f83110.jpg"], + current: "https://jewel-shop.oss-cn-beijing.aliyuncs.com/f02827ca8a7b4decadca812cb2f83110.jpg" + }) + }, sureNpPay() { - this.sales.alreadyEarn =( this.sales.alreadyEarn * 1) + (this.newEarn * 1); + this.sales.alreadyEarn = (this.sales.alreadyEarn * 1) + (this.newEarn * 1); this.tui .request( '/app/sale/edit', - 'post', - { + 'post', { sale: this.sales, customer: this.order, saleDetailDTOList: this.list @@ -293,8 +309,8 @@ ) .then(res => { uni.showToast({ - title:res.message, - icon:'none' + title: res.message, + icon: 'none' }) uni.navigateBack(); }) @@ -306,12 +322,12 @@ getNoPay(en) { console.log(en, 'en'); if (en != undefined) { - if( 0 < en && en <= this.sales.noEarn) { + if (0 < en && en <= this.sales.noEarn) { this.sales.noEarn = this.sales.newEarn - en; } else { uni.showToast({ title: '请输入正确金额', - icon:"none" + icon: "none" }); } } @@ -319,24 +335,26 @@ getReturnOrder(id) { this.tui.request("/app/return/list", "post", { shopId: 1, - remark:3, - saleId:id + remark: 3, + saleId: id }, false, false).then((res) => { if (res.code == 200 && res.result != null && res.result != undefined) { this.inventoryList = res.result this.inventoryList.forEach(item => { - this.tui.request("/app/return/get/" + item.id, "GET", null, false, false).then((res) => { - if (res.code == 200 && res.result != null && res.result != undefined) { - this.shopList.push(...res.result.saleDetailDTOList); - console.log(this.shopList); - } - }).catch((res) => {}) + this.tui.request("/app/return/get/" + item.id, "GET", null, false, false).then( + (res) => { + if (res.code == 200 && res.result != null && res.result != + undefined) { + this.shopList.push(...res.result.saleDetailDTOList); + console.log(this.shopList); + } + }).catch((res) => {}) }) } }).catch((res) => {}) }, checkBoxChange() { - if(this.radio1 == 0 && this.orderByWorkerList.length == 0) { + if (this.radio1 == 0 && this.orderByWorkerList.length == 0) { this.transCompanyInput() } }, @@ -378,11 +396,12 @@ }) }) let worderId = '' - if(this.orderByWorker) { + if (this.orderByWorker) { console.log(this.orderByWorker); for (let key in this.orderByWorkerList) { - console.log(this.orderByWorker,this.orderByWorkerList[key].workerName, this.orderByWorker == this.orderByWorkerList[key].workerName); - if(this.orderByWorker == this.orderByWorkerList[key].workerName) { + console.log(this.orderByWorker, this.orderByWorkerList[key].workerName, this.orderByWorker == this + .orderByWorkerList[key].workerName); + if (this.orderByWorker == this.orderByWorkerList[key].workerName) { worderId = this.orderByWorkerList[key].workerId } } @@ -390,7 +409,7 @@ this.sales.noEarn = this.sales.newNoEarn; this.sales.saleId = this.sales.id; this.sales.totalAomount = this.returnAmount; - console.log(this.sales,this.list ,this.orderByWorker); + console.log(this.sales, this.list, this.orderByWorker); this.tui.request("/app/return/rtg", "post", { returnSale: this.sales, returnSaleDetailList: this.list, @@ -400,13 +419,13 @@ uni.showToast({ title: res.message }); - if(res.code == 200) { + if (res.code == 200) { uni.navigateBack() } }).catch((res) => {}) }, returnGoods() { - if(this.isReturn) { + if (this.isReturn) { this.sureReturn() } else { this.isReturn = true; diff --git a/pages/index/peopleList.vue b/pages/index/peopleList.vue index e77618f..d81b50c 100644 --- a/pages/index/peopleList.vue +++ b/pages/index/peopleList.vue @@ -1,7 +1,7 @@ diff --git a/pages/inventory/addinventory.vue b/pages/inventory/addinventory.vue index 3a9aeb3..c0c8a7c 100644 --- a/pages/inventory/addinventory.vue +++ b/pages/inventory/addinventory.vue @@ -28,7 +28,7 @@ 供应商 + style="border-bottom: 1px solid #fff;text-align: center;" :value="khName.name" @tap="goPopleList('gysName')"> @@ -51,53 +51,22 @@ - - + - 创意小众手提包(QS20121101001) - + + + 品名:{{item.productName}} + 货号:{{item.barcode}} + 供应商:{{item.supplierName}} + - 黑色 - 均码 - - 数量:2 - + {{item.saleDetailQueryDTO.attributeList}} + ¥{{item.price * item.num}} + {{item.num}} - @@ -147,7 +116,7 @@ ¥20.00 - + @@ -167,11 +136,19 @@ manufacturer: '', price: '', single: '' - }, + }, + khName:[], + carList:[] } + }, + onShow(){ + this.khName = JSON.parse(JSON.stringify(this.khName)) || '' + this.carList = this.carList || '' + }, + onLoad(){ + }, - methods: { - + methods: { scanCodeAdd() { uni.scanCode({ success: (res) => { @@ -190,24 +167,54 @@ }, goodsAdd() { uni.navigateTo({ - url:"/pages/inventory/goodsList?type=" + 'inventory' + url:"/pages/billing/changeGoods1?type=" + 'inventory' }) + }, + //跳转选择供应商 + goPopleList(popleType) { + uni.navigateTo({ + url: '/pages/index/peopleList?popleType=' + popleType + }) }, - /** - * 复写 binddata 方法,如果只是为了校验,无复杂自定义操作,可忽略此方法 - * @param {String} name 字段名称 - * @param {String} value 表单域的值 - */ - // binddata(name,value){ - // 通过 input 事件设置表单指定 name 的值 - // this.$refs.form.setValue(name, value) - // }, - // 触发提交表单 - submit() { - this.$refs.form.validate().then(res => { - console.log('表单数据信息:', res); - }).catch(err => { - console.log('表单错误信息:', err); + inventorySubmit() { + console.log(this.khName) + console.log(this.carList) + let purchase = { + alreadyPay:0, //已付金额 + discount: 10, //折扣 + noPay:1111, //未支付金额 + realAmount:1111, //实际金额 + shopId:'002', + shouldPay: 1111, //应付金额 + totalAmount: 1111, //总数量 + } + let purchaseDetails = [{ + allPrice: 1111, + attributeList:'["颜色":["s"],"尺码":["m"]}', + price: 1111, + productCount:1, + productId:"1695314088038633472", + purchasePrice: 800, //进货价 + wholesalePrice: 1000, //批发价 + }] + this.tui.request("/app/stock/putIn", "post", { + purchase: purchase, + purchaseDetails: purchaseDetails + }, false, false).then((res) => { + if (res.code == 200) { + uni.showToast({ + title: "入库成功", + icon: 'none' + }) + uni.navigateBack({ + delta: 2 + }) + } else { + uni.showToast({ + title: "入库失败", + icon: 'none' + }) + } }) } } @@ -299,12 +306,13 @@ .shop-name { width: 100%; - height: 80rpx; + height: 200rpx; line-height: 80rpx; border-top: 1px solid #eee; border-bottom: 1px solid #eee; font-size: 28rpx; font-weight: bold; + display: flex; } .shop-name { @@ -312,6 +320,16 @@ color: #088FEB !important; } } + .shop-productName { + flex: 1; + display: flex; + flex-direction: column; + padding-left: 20rpx; + } + + .shop-productName view { + height: 55rpx; + } .shop-collapse { border-radius: 1px solid #eee; @@ -323,19 +341,6 @@ border-right: 1px solid #eee; } - .shop-collapse-item { - display: flex; - text-align: center; - background: #eee; - height: 110rpx; - - .input { - border: 1px solid #eee; - background: #fff; - height: 60rpx; - } - } - .price-box-title { width: 95%; height: 80rpx; diff --git a/pages/inventory/inventory.vue b/pages/inventory/inventory.vue index 82e844c..17b893b 100644 --- a/pages/inventory/inventory.vue +++ b/pages/inventory/inventory.vue @@ -179,10 +179,8 @@ getShareList(id) { this.tui.request("/app/product/getShareList", "POST", { shopId: '002', - // categoryId:id || '1695090289036890112', - categoryId: '1695090289036890112', - // supplierName:this.searchName || '测试', - supplierName: '测试', + categoryId:id, + supplierName:this.keyword, pageNum: this.pageNum, pageSize: '10' }, false, true).then((res) => {