From 43bea8d5956d9f0c74524aead09cdf99bfeebb17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=93=E5=B9=B3=E8=89=BA?= <52643018@qq.com> Date: Mon, 2 Aug 2021 14:54:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E9=87=87=E8=B4=AD=E5=8D=95?= =?UTF-8?q?=E7=BC=96=E8=BE=91=EF=BC=8C=E4=BC=98=E5=8C=96=E9=87=87=E8=B4=AD?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- canteen/pages/classification/material.vue | 2 +- canteen/pages/purchase/detail.vue | 189 +++++++++++----------- canteen/pages/purchase/launch.vue | 134 ++++----------- 3 files changed, 130 insertions(+), 195 deletions(-) diff --git a/canteen/pages/classification/material.vue b/canteen/pages/classification/material.vue index 7b88b7e..016757b 100644 --- a/canteen/pages/classification/material.vue +++ b/canteen/pages/classification/material.vue @@ -13,7 +13,7 @@ :style="{height: 'calc('+ windowHeight +'px - 222rpx)', width:is_search_ing?'100%':'550rpx'}"> diff --git a/canteen/pages/purchase/detail.vue b/canteen/pages/purchase/detail.vue index af9c912..b2c44f7 100644 --- a/canteen/pages/purchase/detail.vue +++ b/canteen/pages/purchase/detail.vue @@ -1,96 +1,100 @@ @@ -136,20 +140,23 @@ contents: [], order: {}, p_sn: '', - type: 4, + type: '', is_show_voucher: false, voucher_list: [], - voucher_count: 6 + voucher_count: 6, + show_count: 0 } }, onLoad(options){ - // TODO 1、凭证上传流程变动:当采购单状态为已发货状态时,食堂可以上传凭证图片; - // TODO 2、食堂收货时,实到数、实收数默认填充采购数量; - // todo 上传凭证参考页面:/uniapp-supplychain/supplier/pages/gonghuo/detail this.p_sn = options.p_sn || ''; - // TODO 显示车辆等信息,显示table信息 this.getData(); }, + onShow(){ + this.show_count++; + if(this.show_count > 1){ + this.getData(); + } + }, methods: { // 预览图片 lookPopupImage(current){ @@ -201,10 +208,7 @@ }) Promise.all(http_list).then(res => { - console.log("上传完毕", res); let images = res.map(item => item.path); - console.log(images) - // todo 图片上传url给后端 that.$http(that.API.API_SUPPLIER_PURCHASEUPLOADVOUCHER, { p_sn: that.p_sn, images: images, @@ -228,9 +232,7 @@ getData(){ this.$http(this.API.API_CANTEEN_PURCHASEDETAIL, { p_sn: this.p_sn - // p_sn: '802316269455228606' }).then(res => { - console.log("xxx",res) this.order = res.data.order; let list = res.data.order.items || []; let contents = list.map(item => { @@ -248,9 +250,8 @@ } }) this.contents = contents; - console.log(this.contents) this.type = res.data.order.state - }) + }).catch(err => this.$toBack()); }, // 预览图片 lookImage(index){ @@ -262,14 +263,14 @@ }) }, 200); }, - // 改变订单状态 TODO + // 改变订单状态 orderStateChange(state){ this.$http(this.API.API_CANTEEN_PURCHASEUPDATE, { p_sn: this.p_sn, state: state }).then(res => { console.log("orderStateChange", res); - this.$msg('操作成功').then(()=>{this.$toBack()}); + this.$msg('操作成功').then(()=> this.getData()); }) } } diff --git a/canteen/pages/purchase/launch.vue b/canteen/pages/purchase/launch.vue index 27cdd34..8091f04 100644 --- a/canteen/pages/purchase/launch.vue +++ b/canteen/pages/purchase/launch.vue @@ -1,18 +1,18 @@