diff --git a/canteen/pages/purchase/detail.vue b/canteen/pages/purchase/detail.vue index e74f504..8a955d1 100644 --- a/canteen/pages/purchase/detail.vue +++ b/canteen/pages/purchase/detail.vue @@ -20,7 +20,7 @@ - + @@ -36,16 +36,16 @@ {{order.deliver_phone}} - + 证明材料-供应端 - + - + 证明材料-食堂端 - + @@ -88,7 +88,7 @@ 上传凭证信息 请在此处上传检验检疫凭证、售卖资质等证书 - + @@ -152,7 +152,9 @@ is_show_voucher: false, voucher_list: [], voucher_count: 6, - show_count: 0 + show_count: 0, + canteen_voucher: [], // 食堂端凭证 + supplier_voucher: [] // 供应端凭证 } }, onLoad(options){ @@ -166,16 +168,6 @@ } }, methods: { - // 预览图片 - lookPopupImage(current){ - if(this.voucher_list.length <= 0) return; - this.$u.throttle(() => { - uni.previewImage({ - urls: this.voucher_list, - current: current - }) - }, 500); - }, // 移除图片 removeInage(current){ this.voucher_list.splice(current, 1); @@ -224,6 +216,7 @@ uni.hideLoading(); that.voucher_list = []; that.$msg('凭证已上传成功!') + that.getData(); }).catch(err => uni.hideLoading()); }).catch(err => { @@ -256,6 +249,18 @@ } }) + let supplier_voucher = []; + let canteen_voucher = []; + order.voucher.map(item => { + if(item.client_type == '供应商'){ + supplier_voucher.push(item.voucher_pic); + }else if(item.client_type == '食堂'){ + canteen_voucher.push(item.voucher_pic); + } + }) + this.supplier_voucher = supplier_voucher; + this.canteen_voucher = canteen_voucher; + this.order = order; let list = order.items || []; let contents = list.map(item => { @@ -277,14 +282,14 @@ }).catch(err => this.$toBack()); }, // 预览图片 - lookImage(index){ + lookImage(index, list){ + if(this[list].length <= 0) return; this.$u.throttle(() => { - let images = this.order.voucher.map(item => item.voucher_pic); uni.previewImage({ - urls: images, + urls: this[list], current: index }) - }, 200); + }, 500); }, // 改变订单状态 orderStateChange(state){ diff --git a/supplier/pages/gonghuo/detail.vue b/supplier/pages/gonghuo/detail.vue index 4dc1bfa..ed7e3e4 100644 --- a/supplier/pages/gonghuo/detail.vue +++ b/supplier/pages/gonghuo/detail.vue @@ -13,11 +13,38 @@ - - + + + + + 车辆 + {{order.car_license}} + + + 司机 + {{order.deliver_man}} + + + 联系电话 + {{order.deliver_phone}} + + + + 证明材料-供应端 + + + + + + 证明材料-食堂端 + + + + + 物资明细 @@ -48,7 +75,7 @@ 上传凭证信息 请在此处上传检验检疫凭证、售卖资质等证书 - + @@ -138,7 +165,9 @@ order: {}, l_p_num: '', driver_name: '', - driver_phone: '' + driver_phone: '', + canteen_voucher: [], // 食堂端凭证 + supplier_voucher: [] // 供应端凭证 } }, onLoad(options){ @@ -169,6 +198,18 @@ return item; }) + let supplier_voucher = []; + let canteen_voucher = []; + order.voucher.map(item => { + if(item.client_type == '供应商'){ + supplier_voucher.push(item.voucher_pic); + }else if(item.client_type == '食堂'){ + canteen_voucher.push(item.voucher_pic); + } + }) + this.supplier_voucher = supplier_voucher; + this.canteen_voucher = canteen_voucher; + let list = order.items || []; let contents = list.map(item => { let obj = { @@ -201,11 +242,11 @@ }) }, // 预览图片 - lookImage(current){ - if(this.voucher_list.length <= 0) return; + lookImage(current, list){ + if(this[list].length <= 0) return; this.$u.throttle(() => { uni.previewImage({ - urls: this.voucher_list, + urls: this[list], current: current }) }, 500); @@ -246,7 +287,8 @@ }).then(result => { uni.hideLoading(); that.voucher_list = []; - that.$msg('凭证已上传成功!') + that.$msg('凭证已上传成功!'); + that.getData(); }).catch(err => uni.hideLoading()); }).catch(err => { @@ -361,6 +403,16 @@ .fixed-bottom>view{ width: 100%; } + .ms-img{ + width: 160rpx; + height: 160rpx; + margin-right: 15rpx; + margin-top: 15rpx; + background-color: #EEEEEE; + &:nth-of-type(4n){ + margin-right: 0rpx; + } + } .popup-box{ width: 686rpx; // height: 727rpx;