|
|
@ -1,52 +1,66 @@ |
|
|
<template> |
|
|
<template> |
|
|
<view> |
|
|
<view> |
|
|
<view class="head"> |
|
|
|
|
|
|
|
|
<view class="head" v-if="$isRight(order)"> |
|
|
<view class="lf-row-between lf-color-gray list"> |
|
|
<view class="lf-row-between lf-color-gray list"> |
|
|
<view>采购单 {{ order.p_sn }}</view> |
|
|
<view>采购单 {{ order.p_sn }}</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="lf-row-between list"> |
|
|
<view class="lf-row-between list"> |
|
|
<image src="../../../static/logo.png" class="image"></image> |
|
|
|
|
|
|
|
|
<image :src="order.supplier.logo" class="image"></image> |
|
|
<view class="info"> |
|
|
<view class="info"> |
|
|
<view class="lf-font-32 lf-color-black lf-font-bold">广西美味生活有限公司</view> |
|
|
|
|
|
<view class="lf-font-24 lf-color-555">广西南宁青秀区民族大道118号可爱大厦A座0930室</view> |
|
|
|
|
|
|
|
|
<view class="lf-font-32 lf-color-black lf-font-bold">{{ order.supplier.supplier_name }}</view> |
|
|
|
|
|
<view class="lf-font-24 lf-color-555">{{ order.supplier.address }}</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<self-line></self-line> |
|
|
<self-line></self-line> |
|
|
<view class="lf-p-l-32 lf-p-r-32 lf-border-box lf-bg-white"> |
|
|
<view class="lf-p-l-32 lf-p-r-32 lf-border-box lf-bg-white"> |
|
|
<lf-ysteps :stepList="stepList" color="#11D189"></lf-ysteps> |
|
|
|
|
|
|
|
|
<!-- <lf-ysteps :stepList="stepList" color="#11D189"></lf-ysteps> --> |
|
|
|
|
|
<lf-stepbar :list="order.state_log" v-if="order.state_log"></lf-stepbar> |
|
|
</view> |
|
|
</view> |
|
|
<self-line></self-line> |
|
|
<self-line></self-line> |
|
|
<view class="head"> |
|
|
<view class="head"> |
|
|
<view class="lf-row-between list"> |
|
|
<view class="lf-row-between list"> |
|
|
<view>车辆</view> |
|
|
<view>车辆</view> |
|
|
<view class="lf-font-bold">桂AX2738</view> |
|
|
|
|
|
|
|
|
<view class="lf-font-bold"></view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="lf-row-between list"> |
|
|
<view class="lf-row-between list"> |
|
|
<view>司机</view> |
|
|
<view>司机</view> |
|
|
<view class="lf-font-bold">李师傅</view> |
|
|
|
|
|
|
|
|
<view class="lf-font-bold"></view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="lf-row-between list"> |
|
|
<view class="lf-row-between list"> |
|
|
<view>联系电话</view> |
|
|
<view>联系电话</view> |
|
|
<view class="lf-font-bold">{{ order.contact_phone }}</view> |
|
|
|
|
|
|
|
|
<view class="lf-font-bold"></view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="list"> |
|
|
<view class="list"> |
|
|
<view>证明材料</view> |
|
|
<view>证明材料</view> |
|
|
<view class="lf-flex-wrap lf-m-t-10"> |
|
|
<view class="lf-flex-wrap lf-m-t-10"> |
|
|
<image src="../../../static/logo.png" class="ms-img" v-for="(item, index) in 4" :key="index"></image> |
|
|
|
|
|
|
|
|
<image :src="item.voucher_pic" @click="lookImage(index)" class="ms-img" v-for="(item, index) in order.voucher" :key="item.id"></image> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<self-line></self-line> |
|
|
<self-line></self-line> |
|
|
<view class="lf-m-t-30 lf-m-l-32"> |
|
|
<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> |
|
|
<view class="lf-font-32 lf-color-black lf-font-bold lf-m-b-20">物资明细</view> |
|
|
<wyb-table :first-line-fixed="true" contentBgColor="#ecfaf5" :headers="headers" :contents="contents" @onButtonClick="onButtonClick" width="max-content" height="350rpx"></wyb-table> |
|
|
|
|
|
|
|
|
<wyb-table :first-line-fixed="true" contentBgColor="#ecfaf5" :headers="headers" :contents="contents" width="max-content" height="350rpx"></wyb-table> |
|
|
</view> |
|
|
</view> |
|
|
<view style="height: 100rpx;"></view> |
|
|
<view style="height: 100rpx;"></view> |
|
|
<!-- 操作按钮 --> |
|
|
<!-- 操作按钮 --> |
|
|
<view class="fixed-bottom"> |
|
|
|
|
|
|
|
|
<view class="fixed-bottom" v-if="type != 3"> |
|
|
|
|
|
<view v-if="type == 1" class="lf-row-flex-end"> |
|
|
|
|
|
<button class="btn btn1">编辑</button> |
|
|
|
|
|
<button class="btn btn2">立即发单</button> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view v-else-if="type == 2" class="lf-row-flex-end"> |
|
|
|
|
|
<button class="btn btn2" style="background-color: #FF0000;">撤销订单</button> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view v-else-if="type == 4" class="lf-row-flex-end"> |
|
|
<button class="btn btn1">退单</button> |
|
|
<button class="btn btn1">退单</button> |
|
|
<button class="btn btn2" @click="$url('/pages/canteen/purchase/receipt')">确认收货</button> |
|
|
|
|
|
|
|
|
<button class="btn btn2" @click="$url('/pages/canteen/purchase/receipt?p_sn='+ order.p_sn)">确认收货</button> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view v-else-if="type == 5" class="lf-row-between"> |
|
|
|
|
|
<button class="btn btn1">复用采购单</button> |
|
|
|
|
|
<view class="lf-font-32" style="color: #11D189;">已完成</view> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</template> |
|
|
</template> |
|
|
@ -58,36 +72,6 @@ |
|
|
components: { lfYsteps, wybTable }, |
|
|
components: { lfYsteps, wybTable }, |
|
|
data(){ |
|
|
data(){ |
|
|
return { |
|
|
return { |
|
|
stepList: [ |
|
|
|
|
|
{ |
|
|
|
|
|
time: '2021-07-23 13:23:52', // 左侧时间 -- 必选 |
|
|
|
|
|
info: '订单创建', // 右侧内容 -- 可选 |
|
|
|
|
|
isFinished: false, // 是否已完成(完成 index 为 √)-- 可选 |
|
|
|
|
|
isActive: true, // 是否为当前节点 Active(当前节点 即使完成 index 也不会显示 √)-- 可选 |
|
|
|
|
|
isShowSlot: false // 右侧是否有 Slot(显示在 右侧内容下方)-- 可选 |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
time: '2021-07-23 13:23:52', |
|
|
|
|
|
info: '采购订单发起,等待供应商接单', |
|
|
|
|
|
isFinished: false, |
|
|
|
|
|
isActive: true, |
|
|
|
|
|
isShowSlot: true |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
time: '2021-07-23 13:23:52', |
|
|
|
|
|
info: '供应商已接单,正在装车运输中', |
|
|
|
|
|
isFinished: false, |
|
|
|
|
|
isActive: true, |
|
|
|
|
|
isShowSlot: true |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
time: '2021-07-23 13:23:52', |
|
|
|
|
|
info: '您的包裹已到,已被本人签收', |
|
|
|
|
|
isFinished: true, |
|
|
|
|
|
isActive: false, |
|
|
|
|
|
isShowSlot: true |
|
|
|
|
|
} |
|
|
|
|
|
], |
|
|
|
|
|
headers: [{ |
|
|
headers: [{ |
|
|
key: 'name', |
|
|
key: 'name', |
|
|
label: '菜名' |
|
|
label: '菜名' |
|
|
@ -102,16 +86,20 @@ |
|
|
label: '税后价格' |
|
|
label: '税后价格' |
|
|
}], |
|
|
}], |
|
|
contents: [], |
|
|
contents: [], |
|
|
order: {} |
|
|
|
|
|
|
|
|
order: {}, |
|
|
|
|
|
p_sn: '', |
|
|
|
|
|
type: 4 |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
onLoad(options){ |
|
|
onLoad(options){ |
|
|
this.getData(options.p_sn); |
|
|
|
|
|
|
|
|
this.p_sn = options.p_sn || ''; |
|
|
|
|
|
// TODO 显示车辆等信息,显示table信息 |
|
|
|
|
|
this.getData(); |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
getData(p_sn){ |
|
|
|
|
|
|
|
|
getData(){ |
|
|
this.$http(this.API.API_CANTEEN_PURCHASEDETAIL, { |
|
|
this.$http(this.API.API_CANTEEN_PURCHASEDETAIL, { |
|
|
p_sn: p_sn |
|
|
|
|
|
|
|
|
p_sn: this.p_sn |
|
|
// p_sn: '802316269455228606' |
|
|
// p_sn: '802316269455228606' |
|
|
}).then(res => { |
|
|
}).then(res => { |
|
|
console.log("xxx",res) |
|
|
console.log("xxx",res) |
|
|
@ -130,17 +118,24 @@ |
|
|
this.contents = contents; |
|
|
this.contents = contents; |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
onButtonClick(event){ |
|
|
|
|
|
uni.showModal({ |
|
|
|
|
|
title: '温馨提示', |
|
|
|
|
|
content: '您确定移除该项吗?', |
|
|
|
|
|
success: result => { |
|
|
|
|
|
if(result.confirm){ |
|
|
|
|
|
console.log("移除某一项", event); |
|
|
|
|
|
let { contentIndex } = event; |
|
|
|
|
|
this.contents.splice(contentIndex, 1); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 预览图片 |
|
|
|
|
|
lookImage(index){ |
|
|
|
|
|
this.$u.throttle(() => { |
|
|
|
|
|
let images = this.order.voucher.map(item => item.voucher_pic); |
|
|
|
|
|
uni.previewImage({ |
|
|
|
|
|
urls: images, |
|
|
|
|
|
current: index |
|
|
|
|
|
}) |
|
|
|
|
|
}, 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('操作成功'); |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
@ -165,6 +160,7 @@ |
|
|
width: 140rpx; |
|
|
width: 140rpx; |
|
|
height: 140rpx; |
|
|
height: 140rpx; |
|
|
border-radius: 10rpx; |
|
|
border-radius: 10rpx; |
|
|
|
|
|
background-color: #EEEEEE; |
|
|
} |
|
|
} |
|
|
.info{ |
|
|
.info{ |
|
|
display: flex; |
|
|
display: flex; |
|
|
@ -183,7 +179,7 @@ |
|
|
width: 750rpx; |
|
|
width: 750rpx; |
|
|
height: 98rpx; |
|
|
height: 98rpx; |
|
|
display: flex; |
|
|
display: flex; |
|
|
justify-content: flex-end; |
|
|
|
|
|
|
|
|
// justify-content: flex-end; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
border-top: 1rpx solid #E5E5E5; |
|
|
border-top: 1rpx solid #E5E5E5; |
|
|
background-color: #FFFFFF; |
|
|
background-color: #FFFFFF; |
|
|
@ -210,11 +206,15 @@ |
|
|
margin-left: 20rpx; |
|
|
margin-left: 20rpx; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
.fixed-bottom>view{ |
|
|
|
|
|
width: 100%; |
|
|
|
|
|
} |
|
|
.ms-img{ |
|
|
.ms-img{ |
|
|
width: 160rpx; |
|
|
width: 160rpx; |
|
|
height: 160rpx; |
|
|
height: 160rpx; |
|
|
margin-right: 15rpx; |
|
|
margin-right: 15rpx; |
|
|
margin-top: 15rpx; |
|
|
margin-top: 15rpx; |
|
|
|
|
|
background-color: #EEEEEE; |
|
|
&:nth-of-type(4n){ |
|
|
&:nth-of-type(4n){ |
|
|
margin-right: 0rpx; |
|
|
margin-right: 0rpx; |
|
|
} |
|
|
} |
|
|
|