fix:安全溯源bug

parent d1cd518f
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
</view> </view>
<view class="mt-2 box" v-if="order_detail.order.shipping_type === '1'"> <view class="mt-2 box" v-if="order_detail.order.shipping_type === '1'">
<view class="item font-32">配送信息</view> <view class="item font-32 mb-3">配送信息</view>
<view class="mt-3">配送方式:商家配送<text class="primary ml-1" @click="makePhoneCall()">联系商家</text></view> <view class="mt-3">配送方式:商家配送<text class="primary ml-1" @click="makePhoneCall()">联系商家</text></view>
<view class="item mt-3 w-100 flex j-start a-start"> <view class="item mt-3 w-100 flex j-start a-start">
<view class="hd">配送地址:</view> <view class="hd">配送地址:</view>
...@@ -69,9 +69,9 @@ ...@@ -69,9 +69,9 @@
</view> </view>
<view class="mt-2 box" v-else> <view class="mt-2 box" v-else>
<view class="item font-32">配送信息</view> <view class="item font-32 mb-3">自提信息</view>
<view>配送方式: 买家自提<text class="primary ml-1" @click="makePhoneCall()">联系商家</text></view> <view>配送方式: 买家自提<text class="primary ml-1" @click="makePhoneCall()">联系商家</text></view>
<view class="item mt-e3 w-100 flex j-start a-start"> <view class="item mt-3 w-100 flex j-start a-start">
<view class="hd">自提地址:</view> <view class="hd">自提地址:</view>
<view class="flex-1"> <view class="flex-1">
<text class="flex-1">{{order_detail.order.pickup_address}}</text> <text class="flex-1">{{order_detail.order.pickup_address}}</text>
...@@ -96,8 +96,18 @@ ...@@ -96,8 +96,18 @@
<view class="box mt-2"> <view class="box mt-2">
<view class="font-32 mb-3">发票信息</view> <view class="font-32 mb-3">发票信息</view>
<view> <view class="item mt-3 w-100 flex j-start a-start">
发票:发票信息参数(文字/图片等) <view class="hd">发票:</view>
<view class="flex-1 flex flex-column">
<view class="w-100 mb-2">{{order_detail.order.invoice_link || '发票信息参数(文字/图片等)'}}</view>
<image
class="w-100"
v-if="order_detail.order.invoice_img"
mode="widthFix"
@click="perviewInvoice(order_detail.order.invoice_img)"
:src="order_detail.order.invoice_img"
/>
</view>
</view> </view>
</view> </view>
...@@ -281,6 +291,15 @@ export default { ...@@ -281,6 +291,15 @@ export default {
uni.navigateTo({ uni.navigateTo({
url: `/subPages/address/changeAddress?params=${encodeURIComponent(JSON.stringify(params))}` url: `/subPages/address/changeAddress?params=${encodeURIComponent(JSON.stringify(params))}`
}) })
},
// 预览发票
perviewInvoice(link) {
if(!link) return
uni.previewImage({
current: link, // 当前显示图片的http链接
urls: [link] // 需要预览的图片http链接列表
})
} }
} }
} }
......
<template> <template>
<view class="box mb-2"> <view class="box mb-2">
<view class="h_title text-center"> <view class="h_title text-center">
供货商资质证书 {{name}}资质证书
</view> </view>
<view class="swiper-wrap"> <view class="swiper-wrap" v-if="list.length > 0">
<swiper <swiper
class="swiper-inner" class="swiper-inner"
:current="img_current" :current="img_current"
...@@ -37,11 +37,11 @@ ...@@ -37,11 +37,11 @@
</template> </template>
</view> </view>
<view class="w-100 flex j-between a-center mb-2" v-if="originName"> <view class="w-100 flex j-between a-center mb-2" v-if="originName">
<view class="descColor">供货商单位</view> <view class="descColor">{{name}}单位</view>
<view>{{originName}}</view> <view>{{originName}}</view>
</view> </view>
<view class="w-100 flex j-between a-center" v-if="originCode"> <view class="w-100 flex j-between a-center" v-if="originCode">
<view class="descColor">供货商统一社会信用代码</view> <view class="descColor">{{name}}统一社会信用代码</view>
<view>{{originCode}}</view> <view>{{originCode}}</view>
</view> </view>
</view> </view>
...@@ -50,7 +50,6 @@ ...@@ -50,7 +50,6 @@
<script module="preUtil" lang="wxs"> <script module="preUtil" lang="wxs">
// 改变这个num的时候要注意下面pre方法的 2 // 改变这个num的时候要注意下面pre方法的 2
function dealArr(arr, num) { function dealArr(arr, num) {
console.log(arr, num)
if(!arr || arr.length === 0) { if(!arr || arr.length === 0) {
return [] return []
} else { } else {
...@@ -94,7 +93,7 @@ ...@@ -94,7 +93,7 @@
data() { data() {
return { return {
img_current: 0, img_current: 0,
list_len: Math.floor(this.list.length / 2) list_len: Math.ceil(this.list.length / 2) - 1
} }
}, },
......
...@@ -32,15 +32,15 @@ ...@@ -32,15 +32,15 @@
name="供货商" name="供货商"
:originName="detail.dynamic_data.sup_name" :originName="detail.dynamic_data.sup_name"
:originCode="detail.dynamic_data.sup_unit_credit_code" :originCode="detail.dynamic_data.sup_unit_credit_code"
:list="detail.dynamic_data.sup_zhizhao" :list="detail.sup_imgs"
/> />
<preview-zz <preview-zz
v-if="detail.dynamic_data.jxs_zhizhao && detail.dynamic_data.jxs_zhizhao.length > 0" v-if="detail.dynamic_data.jxs_zhizhao && detail.dynamic_data.jxs_zhizhao.length > 0"
name="经销商" name="经销商"
:originName="detail.dynamic_data.jxs_name" :originName="detail.dynamic_data.jxs_name"
:originCode="detail.dynamic_data.sup_unit_credit_code" :originCode="detail.dynamic_data.jxs_unit_credit_code"
:list="detail.dynamic_data.jxs_unit_credit_code" :list="detail.jxs_imgs"
/> />
</view> </view>
</template> </template>
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
<script> <script>
import previewZz from './components/preview_zz.vue' import previewZz from './components/preview_zz.vue'
import { safeOrigin } from '@/apis/order.js' import { safeOrigin } from '@/apis/order.js'
import dayjs from 'dayjs'
export default { export default {
data() { data() {
return { return {
...@@ -70,6 +71,10 @@ ...@@ -70,6 +71,10 @@
safeOrigin(this.og_id) safeOrigin(this.og_id)
.then(({status, data}) => { .then(({status, data}) => {
if(status) { if(status) {
data.base_data.production_data = data.base_data.production_data ? dayjs(data.base_data.production_data * 1000).format('YYYY-MM-DD') : '--'
// 【营业执照,许可证,其他资质]
data.sup_imgs = [...data.dynamic_data.sup_zhizhao, ...data.dynamic_data.sup_food_production_license, ...data.dynamic_data.sup_other_qualifications]
data.jxs_imgs = [...data.dynamic_data.jxs_zhizhao, ...data.dynamic_data.jxs_food_production_license, ...data.dynamic_data.jxs_other_qualifications]
this.detail = data this.detail = data
} }
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment