|
|
|
@ -20,7 +20,7 @@ |
|
|
|
<view class="lf-p-l-32 lf-p-r-32 lf-border-box lf-bg-white"> |
|
|
|
<lf-stepbar :list="order.state_log" themeColor="#11D189" v-if="order.state_log"></lf-stepbar> |
|
|
|
</view> |
|
|
|
<self-line v-if="order.car_license || order.voucher.length || voucher_list.length"></self-line> |
|
|
|
<self-line v-if="order.car_license || supplier_voucher.length || canteen_voucher.length"></self-line> |
|
|
|
<view class="head"> |
|
|
|
<block v-if="order.car_license"> |
|
|
|
<view class="lf-row-between list"> |
|
|
|
@ -36,16 +36,16 @@ |
|
|
|
<view class="lf-font-bold">{{order.deliver_phone}}</view> |
|
|
|
</view> |
|
|
|
</block> |
|
|
|
<view class="list" v-if="order.voucher.length"> |
|
|
|
<view class="list" v-if="supplier_voucher.length"> |
|
|
|
<view>证明材料-供应端</view> |
|
|
|
<view class="lf-flex-wrap lf-m-t-10"> |
|
|
|
<image :src="item.voucher_pic" @click="lookImage(index)" class="ms-img" v-for="(item, index) in order.voucher" :key="item.id"></image> |
|
|
|
<image :src="item" @click="lookImage(index, 'supplier_voucher')" class="ms-img" v-for="(item, index) in supplier_voucher" :key="index"></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="list" v-if="voucher_list.length"> |
|
|
|
<view class="list" v-if="canteen_voucher.length"> |
|
|
|
<view>证明材料-食堂端</view> |
|
|
|
<view class="lf-flex-wrap lf-m-t-10"> |
|
|
|
<image :src="item" @click="lookPopupImage(index)" class="ms-img" v-for="(item, index) in voucher_list" :key="index"></image> |
|
|
|
<image :src="item" @click="lookImage(index, 'canteen_voucher')" class="ms-img" v-for="(item, index) in canteen_voucher" :key="index"></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -88,7 +88,7 @@ |
|
|
|
<view class="popup-title">上传凭证信息</view> |
|
|
|
<view class="popup-desc">请在此处上传检验检疫凭证、售卖资质等证书</view> |
|
|
|
<view class="popup-images"> |
|
|
|
<view class="popup-image-item" v-for="(item, index) in voucher_list" :key="index" @click="lookPopupImage(index)"> |
|
|
|
<view class="popup-image-item" v-for="(item, index) in voucher_list" :key="index" @click="lookImage(index, 'voucher_list')"> |
|
|
|
<image :src="item" mode="aspectFill"></image> |
|
|
|
<view class="remove-image" @click.stop="removeInage(index)"> |
|
|
|
<u-icon name="close-circle"></u-icon> |
|
|
|
@ -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){ |
|
|
|
|