|
|
|
@ -13,23 +13,38 @@ |
|
|
|
<view class="header"> |
|
|
|
<view class="header-title">{{ item.belongEnterpriseName }}</view> |
|
|
|
<view class="header-value"> |
|
|
|
<text :class="(item.status == 30131 || item.status == 30138) ? 'failure' : ''">{{ item.status | statusName }}</text> |
|
|
|
<text :class="item.status == 30131 || item.status == 30138 ? 'failure' : ''">{{ item.status | statusName }}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="box"> |
|
|
|
<view class="box" v-if="item.status != 30116 || item.status != 30131"> |
|
|
|
<view class="list-box" v-for="(sitem, sindex) in item.itemList" :key="sindex"> |
|
|
|
<image class="image" :src="sitem.productImg || 'https://qncloud.oss-cn-shenzhen.aliyuncs.com/ztb_pic/testPic.jfif'" mode=""></image> |
|
|
|
<view class="info-box"> |
|
|
|
<view class="name">{{sitem.brandName}}</view> |
|
|
|
<view class="value">{{sitem.categoryName}}/{{sitem.paperName}}/{{sitem.gramWeight}}g/{{sitem.width}}*{{sitem.length}}/{{sitem.quantity}}张</view> |
|
|
|
<view class="name">{{ sitem.brandName }}</view> |
|
|
|
<view class="value"> |
|
|
|
{{ sitem.categoryName }}/{{ sitem.paperName }}/{{ sitem.gramWeight }}g/{{ sitem.width }}*{{ sitem.length }}/{{ sitem.quantity }}张 |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="other" v-if="item.status == 30114"> |
|
|
|
<view class="left">{{item.createTime}}</view> |
|
|
|
<view class="box" v-else> |
|
|
|
<view class="list-box" v-for="(sitem, sindex) in item.reply.replyItemList" :key="sindex"> |
|
|
|
<image class="image" :src="sitem.productImg || 'https://qncloud.oss-cn-shenzhen.aliyuncs.com/ztb_pic/testPic.jfif'" mode=""></image> |
|
|
|
<view class="info-box"> |
|
|
|
<view class="name">{{ sitem.brandName }}</view> |
|
|
|
<view class="value"> |
|
|
|
{{ sitem.categoryName }}/{{ sitem.paperName }}/{{ sitem.gramWeight }}g/{{ sitem.width }}*{{ sitem.length }}/{{ sitem.quantity }}张 |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="other" v-if="item.status == 30116 || item.status == 30131"> |
|
|
|
<view class="left">{{ item.createTime }}</view> |
|
|
|
<view class="right"> |
|
|
|
<view class=""><text class="price" v-if="item.reply">¥ {{item.reply.totalPrice}}</text></view> |
|
|
|
<view class="btn" @tap="placeOrderTap(item)" v-if="item.status == 30116">去下单</view> |
|
|
|
<view class=""> |
|
|
|
<text class="price" v-if="item.reply">¥ {{ item.reply.totalPrice }}</text> |
|
|
|
</view> |
|
|
|
<view class="btn" @tap="placeOrderTap(item,item.reply.replyItemList)" v-if="item.status == 30116">去下单</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -41,7 +56,7 @@ |
|
|
|
<script> |
|
|
|
import { go2, back } from '@/utils/hook.js' |
|
|
|
import uGap from '@/components/u-gap/u-gap.vue' |
|
|
|
import { getEnquiryOrder } from '@/apis/enquiryListApi.js' |
|
|
|
import { getEnquiryOrder, createByEnquiry } from '@/apis/enquiryListApi.js' |
|
|
|
export default { |
|
|
|
components: { uGap }, |
|
|
|
data() { |
|
|
|
@ -54,11 +69,10 @@ export default { |
|
|
|
emptyText: '暂无数据~', |
|
|
|
background: '#F7F8FA', |
|
|
|
disabled: false, |
|
|
|
emptyImage: '/static/imgs/order/order-empty.png' |
|
|
|
emptyImage: '/static/imgs/order/order-empty.png' |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
pagination: { |
|
|
|
enterpriseId: this.$store.state.companyInfo.id || null, |
|
|
|
status: 0, |
|
|
|
pageNum: 0, // 初始会执行一次下拉加载 |
|
|
|
pageSize: 10 |
|
|
|
@ -141,8 +155,27 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 确认下单 |
|
|
|
placeOrderTap(item) { |
|
|
|
go2('order-make', { orderId: item.id }) |
|
|
|
placeOrderTap(item, replyItemList) { |
|
|
|
console.log('replyItemList', replyItemList) |
|
|
|
const params = { |
|
|
|
enquiryId: item.id, |
|
|
|
orderGoodsList: replyItemList, |
|
|
|
purchaserEnterpriseId: this.$store.state.companyInfo.id, |
|
|
|
userId: this.$store.state.userInfo.userId, |
|
|
|
// purchaserEnterpriseId: '677166943471538176', |
|
|
|
// userId: '573244119569272832', |
|
|
|
} |
|
|
|
createByEnquiry(params).then(res => { |
|
|
|
if (res) { |
|
|
|
uni.showToast({ |
|
|
|
title: '下单成功', |
|
|
|
icon: 'success' |
|
|
|
}) |
|
|
|
setTimeout(() => { |
|
|
|
go2('order-make', { orderId: item.orderId }) |
|
|
|
}, 500) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|