123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305 |
- <template>
- <view class="orderDetail-digitalShel flex flex_column">
- <view class="contHead" :style="{background:state!= 'CLOSE' ? '#066cff':'#ff5500',color:'#fff'}">
- <view class="statusH">
- <view class="flex flex_column align_center">
- <view class="status-row">
- <u-icon :name="statusIcon" size="42" color="#fff">
- </u-icon>
- <text>{{statusText}}</text>
- </view>
- <view class="messageText"><text>{{statusMessage}}</text></view>
- </view>
- </view>
- </view>
- <view class="order-body">
- <view class="info partList" v-if="partList.length">
- <view class="infoList">
- <view class="title">
- 产品列表
- </view>
- <view>
- {{partList.length}}款,共<text class="redText">{{totalNums}}</text>件
- </view>
- </view>
- <view v-for="item in partList" :key="item.id" class="flex align-center item-list">
- <view style="height: 150rpx;">
- <u-image :src="item.product.images" border-radius="16" width="200" height="150" bg-color="#EBEBEB" ></u-image>
- <view class="back-price" v-if="item.giveAmount">返<text>{{item.giveAmount}}</text>元</view>
- </view>
- <view>
- <view class="item-name">
- <text>{{item.product.productName}}</text>
- </view>
- <view class="item-nums">
- <text>{{item.product.origCode}}</text>
- </view>
- <view class="item-head">
- <view>
- 数量:<text class="redText">{{item.qty}}</text>{{item.product&&item.product.unit||''}}
- </view>
- <view><text class="redText">¥{{item.price}}</text></view>
- </view>
- </view>
- </view>
- </view>
- <view class="info" v-if="info">
- <view class="infoList" v-if="state=='FINISH'">
- <text>代金券</text>
- <text class="redText">¥{{info.totalGiveAmount}}</text>
- </view>
- <view class="infoList">
- <text>总金额</text>
- <text class="redText">¥{{info.totalAmount}}</text>
- </view>
- </view>
- <view class="info" v-if="info">
- <view class="infoList">
- <view class="title">单据信息</view>
- <view class="statu"></view>
- </view>
- <view class="infoList dju">
- <text>订单号</text>
- <text>{{info.purchaseNo||'--'}}</text>
- </view>
- <view class="infoList">
- <text>下单时间</text>
- <text>{{info.purchaseDate||'--'}}</text>
- </view>
- <view class="infoList">
- <text>下单人员</text>
- <text>{{info.purchaserName || '--'}}</text>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import { purchaseQueryDetailPage } from '@/api/purchase.js'
- export default {
- name: 'procureDetailOrder',
- data() {
- return {
- loading: false,
- info: null,
- statusText: '',
- statusIcon: '', // 结算状态icon
- statusMessage: '请耐心等待汽配经销商进行配送',
- partList: [], // 配件列表
- state: 'success'
- }
- },
- onLoad(option) {
- // 从采购单列表来
- if(option.purchaseSn){
- this.state = option.state
- uni.setNavigationBarTitle({
- title: '采购订单详情'
- })
- const stateText = {'WAIT_AUDIT':'待审核','AUDIT_REJECT':'审核不通过','WAIT_OUT_WAREHOUSE':'待收货','FINISH':'已完结'}
- this.statusText = stateText[option.state]
- this.statusIcon = option.state == 'FINISH' ? 'checkmark-circle' : 'hourglass'
- this.info = this.$store.state.vuex_tempData
- this.statusMessage = option.state == 'FINISH' || option.state == 'AUDIT_REJECT' ? '' : '请耐心等待汽配经销商进行配送'
-
- this.getDetailList(option.purchaseSn)
- }else{
- const data = this.$store.state.vuex_tempData
- if(data){
- this.info = data
- this.partList = data.detailList||[]
- }
- uni.setNavigationBarTitle({
- title: ''
- })
- this.statusText = '提交成功'
- this.statusIcon = 'checkmark-circle'
- }
-
-
- uni.setNavigationBarColor({
- frontColor: '#ffffff',
- backgroundColor: this.state!= 'error'&&this.state!= 'AUDIT_REJECT' ? '#066cff':'#ff5500',
- })
- },
- onUnload() {
- this.$store.state.vuex_tempData = null
- },
- computed: {
- totalNums(){
- let ret = 0
- this.partList.map(item => {
- ret += item.qty
- })
- return ret
- }
- },
- methods: {
- getDetailList(sn){
- uni.showLoading({
- title: '加载中'
- })
- purchaseQueryDetailPage({purchaseSn: sn,pageNo:1,pageSize:9000}).then(res => {
- uni.hideLoading()
- if(res.status == 200){
- this.partList = res.data ? res.data.list : []
- }
- })
- },
- message(title){
- uni.showToast({
- icon:'none',
- title: title
- })
- },
- }
- }
- </script>
- <style lang="less">
- page{
- height: 100%;
- }
- .orderDetail-digitalShel{
- height: 100%;
- .redText{
- color: #FB1E1E;
- }
- .order-body{
- flex-grow: 1;
- overflow: auto;
- .partList{
- margin-top: 20rpx;
- }
- }
- .contHead {
- .statusH{
- > view{
- padding: 10upx 12%;
- font-size: 34upx;
- }
- .status-row{
- font-size: 42upx;
- text{
- margin-left: 10rpx;
- }
- }
- .messageText{
- font-size: 28upx;
- text-align: center;
- text{
- color: #f3e781;
- }
- padding: 20rpx 0;
- }
- }
- }
- .info{
- background-color: #FFFFFF;
- padding: 10rpx 30upx;
- font-size: 32rpx;
- margin-bottom: 20rpx;
- .infoList{
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 20rpx 0;
- border-bottom: 2rpx solid #f2f2f2;
- &:last-child{
- border: none;
- }
- .title{
- font-weight: bold;
- > text{
- color: #ff9808;
- font-size: 24upx;
- }
- }
- > text{
- &:first-child{
- color: #666E75;
- }
- }
- }
- .item-list{
- border-bottom: 2rpx solid #f2f2f2;
- padding: 20rpx 0;
- &:last-child{
- border: none;
- }
- > view{
- &:first-child{
- margin-right: 20rpx;
- margin-top: 18rpx;
- position: relative;
- overflow: hidden;
- width: 200rpx;
- }
- .back-price{
- zoom: calc(0.8);
- padding: 6rpx 65rpx;
- background: rgba(255 ,87 ,34 , 1);
- position: absolute;
- top: 20rpx;
- right: -55rpx;
- color: #fff;
- z-index: 2;
- font-size: 20rpx;
- text-align: center;
- transform: rotate(40deg);
- display: flex;
- align-items: center;
- text{
- font-size: 28rpx;
- margin: 0 5rpx;
- }
- }
- &:last-child{
- flex-grow: 1;
- width: 60%;
- }
- }
- .item-name{
- word-wrap: break-word;
- font-size: 32rpx;
- color: #333;
- font-weight: bold;
- margin-top: 10rpx;
- }
- .item-nums{
- padding: 10rpx 0;
- text{
- font-size: 32rpx;
- color: #222222;
- }
- }
- .item-head{
- display: flex;
- align-items: center;
- justify-content: space-between;
- color: #666;
- > view{
- font-size: 28rpx;
- text{
- margin-right: 10rpx;
- }
- }
- }
- }
- }
- .footer{
- padding: 20upx 60upx;
- background: #FFFFFF;
- button{
- &:after{
- border: 0;
- }
- color: #585858;
- font-size: 32rpx;
- margin: 0 20rpx;
- }
- }
- }
-
- </style>
|