Browse Source

供货订单详情新增显示凭证信息,整理采购单详情凭证

master
邓平艺 5 years ago
parent
commit
eeed2e13b4
  1. 47
      canteen/pages/purchase/detail.vue
  2. 68
      supplier/pages/gonghuo/detail.vue

47
canteen/pages/purchase/detail.vue

@ -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){

68
supplier/pages/gonghuo/detail.vue

@ -13,11 +13,38 @@
</view>
</view>
<self-line></self-line>
<view class="lf-border-box lf-bg-white">
<lf-stepbar :list="stepList"></lf-stepbar>
</view>
<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">
<view>车辆</view>
<view class="lf-font-bold">{{order.car_license}}</view>
</view>
<view class="lf-row-between list">
<view>司机</view>
<view class="lf-font-bold">{{order.deliver_man}}</view>
</view>
<view class="lf-row-between list">
<view>联系电话</view>
<view class="lf-font-bold">{{order.deliver_phone}}</view>
</view>
</block>
<view class="list" v-if="supplier_voucher.length">
<view>证明材料-供应端</view>
<view class="lf-flex-wrap lf-m-t-10">
<image :src="item" class="ms-img" @click="lookImage(index, 'supplier_voucher')" v-for="(item, index) in supplier_voucher" :key="index"></image>
</view>
</view>
<view class="list" v-if="canteen_voucher.length">
<view>证明材料-食堂端</view>
<view class="lf-flex-wrap lf-m-t-10">
<image :src="item" class="ms-img" @click="lookImage(index, 'canteen_voucher')" v-for="(item, index) in canteen_voucher" :key="index"></image>
</view>
</view>
</view>
<self-line></self-line>
<view class="lf-m-t-30 lf-m-l-32">
<view class="lf-font-32 lf-color-black lf-font-bold lf-m-b-20">物资明细</view>
@ -48,7 +75,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="lookImage(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>
@ -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;

Loading…
Cancel
Save