chenkun 9 months ago
parent
commit
4bd6696ea0
13 changed files with 706 additions and 45 deletions
  1. +18
    -0
      api/api.js
  2. +2
    -1
      components/base/centerList.vue
  3. +3
    -0
      locale/en.json
  4. +4
    -2
      locale/zh-Hans.json
  5. +6
    -0
      pages.json
  6. +7
    -0
      pages/index/center2.vue
  7. +5
    -4
      pages_order/center/helpFeedback.vue
  8. +133
    -0
      pages_order/components/order/myOrderList.vue
  9. +9
    -9
      pages_order/components/order/orderList.vue
  10. +418
    -0
      pages_order/order/myOrderDetail.vue
  11. +49
    -0
      pages_order/order/myOrders.vue
  12. +47
    -21
      pages_order/order/orderDetail2.vue
  13. +5
    -8
      pages_order/order/pendingOrder.vue

+ 18
- 0
api/api.js View File

@ -143,6 +143,24 @@ const config = {
method: 'POST',
limit: 500,
},
// 我的订单列表
myOrderlist: {
url: '/product/myOrderlist',
method: 'GET',
limit: 500,
},
// 采购商根据订单id查询订单信息
getMyOrderInfo: {
url: '/product/myOrderlist',
method: 'GET',
limit: 500,
},
// 供应商根据挂单id查询挂单详情的接口
getProductInfo: {
url: '/product/myOrderlist',
method: 'GET',
limit: 500,
},
}


+ 2
- 1
components/base/centerList.vue View File

@ -40,7 +40,8 @@ export default {
item.text === '我的挂单' || item.englishText === 'myOrders' ||
item.text === '系统设置' || item.englishText === 'systemSettings' ||
item.text === '关于我们' || item.englishText === 'aboutUs' ||
item.text === '帮助反馈' || item.englishText === 'helpFeedback'
item.text === '帮助反馈' || item.englishText === 'helpFeedback' ||
item.text === '我的订单' || item.englishText === 'Myorder'
) {
console.log("进入 " + item.text)
uni.navigateTo({


+ 3
- 0
locale/en.json View File

@ -167,6 +167,7 @@
"spotTrading": "Spot Trading",
"futuresTrading": "Futures Trading",
"aluminumProducts": "Aluminum Products",
"specification": "specification【Al>96%】",
"tentativeQuantity": "Tentative Qty (Tons)",
"performanceDeposit": "Performance Bond",
"priceQuantityPercentage": "(Price * Qty * 2%)",
@ -195,6 +196,8 @@
"supplierQuotation": "Supplier Quotation",
"supplierOrder": "Supplier Listing",
"myOrders": "My Listings",
"Myorder": "My order",
"OrderInfo": "Order Info",
"payDeposit": "Pay Bond",
"supplierBilLading": "Supplier bill of lading",
"backOrderTitle": "Cancel pending order",


+ 4
- 2
locale/zh-Hans.json View File

@ -103,7 +103,6 @@
"applicationReview": "申请审核",
"registrationNotice": "注册须知",
"serviceAgreementAndPrivacyTerms": "服务协议与隐私条款",
"and": "以及",
"personalInfoProtectionGuideline": "个人信息保护指引",
"applyForAvatarNickname": "申请获取你的头像、昵称",
"confirmR": "确认",
@ -168,7 +167,8 @@
"orderList": "挂单列表",
"spotTrading": "现货交易",
"futuresTrading": "期货交易",
"aluminumProducts": "铝制品",
"aluminumProducts": "铝制品【Al>96%】",
"specification": "铝锭【Al>96%】",
"tentativeQuantity": "暂定数量(吨)",
"performanceDeposit": "履约保证金",
"priceQuantityPercentage": "(单价*数量*{0}%)",
@ -198,6 +198,8 @@
"supplierBilLading": "供应商提单",
"supplierOrder": "供应商挂单",
"myOrders": "我的挂单",
"Myorder": "我的订单",
"OrderInfo": "订单详情",
"payDeposit": "支付保证金",
"backOrderTitle": "撤销挂单",
"backOrderTitleConfirm": "确认撤单吗?撤单后数据不可恢复",


+ 6
- 0
pages.json View File

@ -45,6 +45,12 @@
{
"path": "auth/selectionIdentity"
},
{
"path": "order/myOrders"
},
{
"path": "order/myOrderDetail"
},
{
"path": "auth/registerShop"
},


+ 7
- 0
pages/index/center2.vue View File

@ -70,6 +70,13 @@ export default {
//
purchaserList: [
// this.$t('pages.index.index.companyProfile')
{
text: `${this.$t('other.Myorder')}`,
englishText: 'Myorder',
value: ">",
imgUrl: '/static/image/center/14.svg',
toPathUrl: '/pages_order/order/myOrders'
},
{text: `${this.$t('components.contactCustomerService')}`, englishText:'contactCustomerService',value: ">", imgUrl: '/static/image/center/13.svg'},
{text: `${this.$t('components.systemSettings')}`,englishText:'systemSettings', value: ">", imgUrl: '/static/image/center/12.svg', toPathUrl: '/pages_order/center/systemSet'},
{text: `${this.$t('components.helpFeedback')}`,englishText:'systemSettings', value: ">", imgUrl: '/static/image/center/12.svg', toPathUrl: '/pages_order/center/helpFeedback'},


+ 5
- 4
pages_order/center/helpFeedback.vue View File

@ -12,7 +12,8 @@
</view>
</view>
<!--问题截图-->
<!--问题截图-->
<view class="problemImg">
<view class="title">{{ $t('components.screenshot') }} <span style="color: red;">*</span></view>
<view class="img">
@ -52,10 +53,10 @@
</view>
</template>
<script>
import topbar from "@/components/base/topbar.vue";
import tabber from "@/components/base/tabbar.vue";
import topbar from "@/components/base/topbar.vue";
import tabber from "@/components/base/tabbar.vue";
export default {
export default {
name: "helpFeedback",
components: {
tabber,


+ 133
- 0
pages_order/components/order/myOrderList.vue View File

@ -0,0 +1,133 @@
<template>
<view class="page">
<view v-for="(item, index) in list" v-if="list.length>0" :key="index" class="content"
@click="lookDetail(item, index)">
<view class="left">
<image :src="item.pic" mode="aspectFill"></image>
</view>
<view class="right">
<view class="text-hidden-1">
订单状态{{ orderStatusText(item.orderFlag) }}
</view>
<view class="text-hidden-1">
公司名称{{ item.companyName }}
</view>
<view class="text-hidden-1">
单价{{ item.price }}
</view>
<!--<view class="text-hidden-1">-->
<!-- 数量{{ item.num }}-->
<!--</view>-->
<view class="text-hidden-1">
提货地址{{ item.address }}
</view>
<!--<view class="text-hidden-1">-->
<!-- 定金{{ item.deposit }}-->
<!--</view>-->
<view class="text-hidden-1">
提货时间{{ item.takeTime }}
</view>
<!--审核状态 0审核中 1 审核通过 2审核未通过-->
<!--<view class="text-hidden-1">-->
<!-- 审核状态{{ item.auditStatus == 0? '审核中' : (item.auditStatus == 1? '审核通过' : '审核未通过') }}-->
<!--</view>-->
</view>
</view>
<!--无历史记录-->
<view
v-else
style="padding: 100rpx 0;">
<uv-empty
iconSize="100rpx"
mode="history"
textSize="28rpx"/>
</view>
</view>
</template>
<script>
export default {
name: "myOrderList",
props: {
list: {
type: Array,
default: false
},
},
data() {
return {}
},
methods: {
// 0 1 2 3 4 退 5
orderStatusText(flag) {
const statusMap = {
0: '未确认',
1: '已确认',
2: '已取消',
3: '已付保证金',
4: '已退款',
5: '已提货'
};
return statusMap[flag] || '未知状态';
},
//
lookDetail(item, index) {
uni.navigateTo({
url: `/pages_order/order/myOrderDetail?orderInfo=${encodeURIComponent(JSON.stringify(item))}`
});
},
}
}
</script>
<style lang="scss" scoped>
.page {
display: flex;
flex-direction: column;
gap: 20rpx;
height: calc(90vh - 180rpx);
.content {
display: flex;
margin: 10rpx 0;
.left {
width: 200rpx;
height: 100%;
//height: 130rpx;
border-radius: 10rpx;
image {
//width: 130rpx;
//height: 130rpx;
width: 100%;
height: 100%;
border-radius: 10rpx;
}
}
.right {
width: calc(100% - 160rpx);
color: #777;
font-size: 24rpx;
padding-left: 20rpx;
line-height: 40rpx;
background-color: #F8F8F8;
}
}
}
</style>

+ 9
- 9
pages_order/components/order/orderList.vue View File

@ -82,9 +82,12 @@ export default {
lookDetail(item, index) {
//
if (this.showBackOrder){
// uni.navigateTo({
// url: `/pages_order/order/orderDetail2?id`+item.id
// })
uni.navigateTo({
url: `/pages_order/order/orderDetail2?id`+item.id
})
url: `/pages_order/order/myOrderDetail?orderInfo=${encodeURIComponent(JSON.stringify(item))}`
});
}
},
@ -92,25 +95,22 @@ export default {
backOrder(id) {
let self = this
uni.showModal({
title: this.$t('other.backOrderTitle'),
content: this.$t('other.backOrderTitleConfirm'),
title: self.$t('other.backOrderTitle'),
content: self.$t('other.backOrderTitleConfirm'),
success(e) {
if(e.confirm){
self.$api('noShow', {id}, res => {
if (res.code == 200) {
uni.showToast({
title: this.$t('other.backOrderSuccess'),
title: self.$t('other.backOrderSuccess'),
icon: 'none'
})
self.getAddressList()
self.$emit("getList")
}
})
}
}
})
uni.navigateTo({
url: `/pages_order/order/backOrder?id=1`
})
},
}
}


+ 418
- 0
pages_order/order/myOrderDetail.vue View File

@ -0,0 +1,418 @@
<template>
<view class="page">
<navbar :title="$t('other.OrderInfo')" leftClick @leftClick="$utils.navigateBack"/>
<view class="info">
<view class="flex">
<!--订单基本信息-->
<view class="server-item">
<view class="img-box">
<img :src="orderInfo.pic" style="width: 100%;height: 100%;"/>
</view>
<view class="server-info">
<view class="server-title">
{{ $t('other.aluminumProducts') }}
</view>
<view class="current-price">
<text class="unit">{{ $t('components.productSpecification') }}</text>
<text class="text"> {{ $t('other.specification') }}</text>
</view>
<view class="sales-volume" style="margin-top: 5px;">
<view class="desc"> {{ $t('other.pickupDate') }}{{ orderInfo.takeTime }}</view>
</view>
</view>
</view>
<!--收货地址-->
<view class="line address">
<view class="address-top">
<view class="">
{{ $t('components.shippingAddress') }}
</view>
<view class="copy">
<img src="../static/order/copy.png"
style="width:40rpx;height:40rpx;"
@click="$utils.copyText('1')">
</view>
</view>
<view class="addressDetail">
<view class="">{{ orderInfo.userName }}&nbsp;&nbsp;&nbsp; {{ orderInfo.phone }}</view>
<view class="">
{{ orderInfo.address }}
</view>
</view>
</view>
<!-- 订单信息 -->
<view class="line">
<view class="t min_tips">
<view class="">
{{ $t('components.orderInfo') }}
</view>
</view>
<view class="min_tips">
<view class="">
{{ $t('components.orderNumber') }}
</view>
<view class="">
{{ orderInfo.id }}
</view>
</view>
<view class="min_tips">
<view class="">
{{ $t('components.orderTime') }}
</view>
<view class="">
{{ orderInfo.createTime }}
</view>
</view>
</view>
<!--&lt;!&ndash; 下单须知 &ndash;&gt;-->
<!--<view class="line">-->
<!-- <view class="t min_tips">-->
<!-- <view class="">-->
<!-- {{ $t('components.orderNotice') }}-->
<!-- </view>-->
<!-- </view>-->
<!-- <view class="xdxz" style="line-height: 40rpx;">-->
<!-- &lt;!&ndash;<uv-parse :content="content"></uv-parse>&ndash;&gt;-->
<!-- <view>1. 请您在收货时间前15分钟内到货否则将视为放弃挂单</view>-->
<!-- <view>2. 请您在收货地址提供的手机号码收到货物</view>-->
<!-- </view>-->
<!--</view>-->
</view>
</view>
<!-- 联系客服弹框 -->
<customerServicePopup ref="customerServicePopup"/>
</view>
</template>
<script>
import customerServicePopup from "@/components/config/customerServicePopup.vue";
export default {
name: "orderDetail2",
components: {customerServicePopup},
onLoad(options) {
if (options.orderInfo) {
this.orderInfo = JSON.parse(decodeURIComponent(options.orderInfo));
console.log(this.orderInfo, "解析后的订单数据"); //
}
},
data() {
return {
orderInfo: {},
}
},
onShow() {
// this.queryOrderInfo()
},
methods: {
// id
queryOrderInfo() {
this.$api('getMyOrderInfo', this.orderId, res => {
console.log(res, "订单信息")
this.orderInfo = res.result
})
},
},
}
</script>
<style lang="scss" scoped>
.page {
.info {
margin: 10px;
padding: 20rpx;
background-color: #fff;
width: calc(100% - 40px);
border-radius: 10px;
.head-title {
font-family: PingFang SC, PingFang SC-Bold;
color: #2f2e2e;
line-height: 30rpx;
margin-left: 10rpx;
}
.server-item {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
background: white;
border-radius: 15rpx;
box-sizing: border-box;
margin: 20rpx 0rpx;
width: 100%;
.img-box {
width: 150rpx;
height: 150rpx;
border-radius: 10rpx;
overflow: hidden;
image {
width: 100%;
height: 100%;
}
}
.server-info {
display: flex;
flex-direction: column;
justify-content: space-around;
width: calc(100% - 180rpx);
box-sizing: border-box;
padding: 10rpx 15rpx;
.server-title {
display: flex;
margin-bottom: 10rpx;
}
.coupon {
display: flex;
justify-content: center;
align-items: center;
background: #F29E45;
color: white;
width: 120rpx;
height: 40rpx;
border-radius: 10rpx;
margin-left: 10rpx;
font-size: 22rpx;
}
.time-coupon,
.price {
display: flex;
flex-wrap: wrap;
align-items: center;
}
.time-coupon {
margin: 10rpx 0rpx;
font-size: 26rpx;
justify-content: space-between;
width: 100%;
.flex {
justify-content: center;
align-items: center;
}
image {
width: 25rpx;
height: 25rpx;
}
.time {
color: #B8B8B8;
margin-left: 6rpx;
}
}
.sales-volume {
display: flex;
align-items: center;
color: #B8B8B8;
font-size: 24rpx;
image {
width: 25rpx;
height: 25rpx;
}
}
}
}
.address {
.address-top {
display: flex;
justify-content: space-between;
align-items: center;
image {
width: 30rpx;
height: 30rpx;
}
}
.addressDetail {
color: #777;
font-size: 26rpx;
padding: 5px 0;
}
text {
background-color: #F29E45;
padding: 8rpx 10rpx;
color: #fff;
font-size: 20rpx;
margin-left: 10px;
border-radius: 5px;
}
}
.min_tips {
font-size: 22rpx;
color: #777;
display: flex;
justify-content: space-between;
padding: 5px 0;
align-items: center;
}
.btns {
display: flex;
justify-content: center;
align-items: center;
gap: 40rpx;
.oneBtn {
display: flex;
align-items: center;
justify-content: center;
width: 40%;
height: 70rpx;
padding: 10rpx;
border-radius: 40rpx;
color: white;
font-size: 28rpx;
margin: 20rpx 10rpx 0 0;
background: #293143;
//margin-top: 20rpx;
border-radius: 40rpx;
}
.twoBtn {
display: flex;
align-items: center;
justify-content: center;
width: 40%;
height: 70rpx;
padding: 10rpx;
border-radius: 40rpx;
color: #000000;
font-size: 28rpx;
margin: 20rpx 10rpx 0 0;
background: #f2f2f2;
//margin-top: 20rpx;
border-radius: 40rpx;
}
}
.xdxz {
font-size: 24rpx;
color: #777;
line-height: 30rpx;
}
.current-price {
font-size: 24rpx;
color: #8c8888;
.unit {
}
.text {
}
}
.line {
border-top: 2px dotted #00000011;
padding: 20rpx 0;
.t {
padding: 5px 0;
color: #000;
font-size: 26rpx;
}
}
.head-div {
.nickname {
font-size: 30rpx;
font-weight: 600;
text-align: left;
line-height: 42rpx;
display: flex;
align-items: center;
.tag {
position: relative;
display: flex;
align-items: center;
image {
height: 45rpx;
width: 90rpx;
vertical-align: middle;
}
.auth {
position: absolute;
white-space: nowrap;
color: $uni-color;
left: 23rpx;
font-size: 17rpx;
}
}
}
.days {
font-size: 20rpx;
font-weight: 400;
text-align: left;
line-height: 56rpx;
display: flex;
align-items: center;
view {
padding-left: 5px;
}
}
}
.btn-x {
color: $uni-color;
border: 1px solid $uni-color;
padding: 10rpx 20rpx;
border-radius: 30rpx;
}
.btns {
display: flex;
justify-content: center;
.btn {
color: $uni-color;
border: 1px solid $uni-color;
padding: 10rpx 20rpx;
border-radius: 30rpx;
}
}
}
}
</style>

+ 49
- 0
pages_order/order/myOrders.vue View File

@ -0,0 +1,49 @@
<template>
<!--我的订单-->
<view class="page">
<navbar :title="$t('other.Myorder')" leftClick @leftClick="$utils.navigateBack"/>
<view class="frame">
<view class="content">
<myOrderList :list="list"></myOrderList>
</view>
</view>
</view>
</template>
<script>
import myOrderList from "../components/order/myOrderList.vue";
import topbar from "@/components/base/topbar.vue";
import tabber from "@/components/base/tabbar.vue";
import mixinsList from '@/mixins/list.js'
export default {
name: "pendingOrder",
components: {tabber, topbar, myOrderList},
mixins: [mixinsList],
data() {
return {
mixinsListApi: 'myOrderlist',
}
},
methods: {},
}
</script>
<style lang="scss" scoped>
.page {
.frame {
padding: 30rpx;
background-color: #f5f5f5;
.content {
//height: calc(100vh - 120rpx);
}
}
}
</style>

+ 47
- 21
pages_order/order/orderDetail2.vue View File

@ -1,7 +1,7 @@
<template>
<view class="page">
<navbar :title="$t('pageTitle.orderDetails')" leftClick @leftClick="$utils.navigateBack"/>
<navbar :title="$t('pageTitle.orderDetails')" leftClick @leftClick="$utils.navigateBack"/>
<view class="info">
<view class="flex">
@ -10,21 +10,21 @@
<view class="server-item">
<view class="img-box">
<img src="../../static/image/address/selectIcon.png" style="width: 100%;height: 100%;"/>
<img :src="orderInfo.pic" style="width: 100%;height: 100%;"/>
</view>
<view class="server-info">
<view class="server-title">
{{ $t('components.aluminumProducts') }}
{{ $t('other.aluminumProducts') }}
</view>
<view class="current-price">
<text class="unit">{{ $t('components.productSpecification') }}</text>
<text class="text">铝锭al>96%</text>
<text class="text"> {{ $t('other.specification') }}</text>
</view>
<view class="sales-volume" style="margin-top: 5px;">
<view class="desc"> {{ $t('components.pickupDate') }}2021-08-10</view>
<view class="desc"> {{ $t('other.pickupDate') }}{{ orderInfo.takeTime }}</view>
</view>
</view>
</view>
@ -42,9 +42,9 @@
</view>
</view>
<view class="addressDetail">
<view class="">张三&nbsp;&nbsp;&nbsp; 13812345678</view>
<view class="">{{ orderInfo.userName }}&nbsp;&nbsp;&nbsp; {{ orderInfo.phone }}</view>
<view class="">
北京市海淀区西二旗a座101北京市海淀区西二旗a座101北京市海淀区西二旗a座101北京市海淀区西二旗a座101
{{ orderInfo.address }}
</view>
</view>
</view>
@ -53,33 +53,32 @@
<view class="line">
<view class="t min_tips">
<view class="">
{{ $t('components.orderInfo') }}
{{ $t('components.orderInfo') }}
</view>
</view>
<view class="min_tips">
<view class="">
{{ $t('components.orderNumber') }}
{{ $t('components.orderNumber') }}
</view>
<view class="">
SF20210810001
{{ orderInfo.id }}
</view>
</view>
<view class="min_tips">
<view class="">
{{ $t('components.orderTime') }}
{{ $t('components.orderTime') }}
</view>
<view class="">
2021-08-10 10:00:00
{{ orderInfo.createTime }}
</view>
</view>
</view>
<!-- 下单须知 -->
<view class="line">
<view class="t min_tips">
<view class="">
{{ $t('components.orderNotice') }}
{{ $t('components.orderNotice') }}
</view>
</view>
<view class="xdxz" style="line-height: 40rpx;">
@ -93,10 +92,10 @@
<!--我要撤单和联系客服-->
<view class="btns">
<view @click="backOrder" class="oneBtn">
{{ $t('other.withdrawOrder') }}
{{ $t('other.withdrawOrder') }}
</view>
<view @click="$refs.customerServicePopup.open()" class="twoBtn">
{{ $t('components.contactCustomerService') }}
{{ $t('components.contactCustomerService') }}
</view>
</view>
@ -113,21 +112,48 @@ export default {
name: "orderDetail2",
components: {customerServicePopup},
onLoad(options) {
this.orderId = options.id
if (options.orderInfo) {
this.orderInfo = JSON.parse(decodeURIComponent(options.orderInfo));
console.log(this.orderInfo, "解析后的订单数据"); //
}
},
data() {
return {
orderId: null,
orderInfo: {}
}
},
methods: {
// id
queryOrderInfo() {
this.$api('getProductInfo', this.orderId, res => {
console.log(res, "挂单详情信息")
this.orderInfo = res.result
})
},
//
backOrder() {
console.log("撤单")
uni.navigateTo({
url: `/pages_order/order/backOrder?id=1`
let self = this
uni.showModal({
title: self.$t('other.backOrderTitle'),
content: self.$t('other.backOrderTitleConfirm'),
success(e) {
if (e.confirm) {
self.$api('noShow', {id}, res => {
if (res.code == 200) {
uni.showToast({
title: self.$t('other.backOrderSuccess'),
icon: 'none'
})
uni.navigateBack();
}
})
}
}
})
},
},
}


+ 5
- 8
pages_order/order/pendingOrder.vue View File

@ -2,12 +2,11 @@
<!--我的挂单-->
<view class="page">
<navbar :title="$t('pageTitle.myOrders')" leftClick @leftClick="$utils.navigateBack"/>
<navbar :title="$t('pageTitle.myOrders')" leftClick @leftClick="$utils.navigateBack"/>
<view class="frame">
<view class="content">
<orderList :list="list" :show-back-order="true"></orderList>
<orderList :list="list" :show-back-order="true" @getList="getData"></orderList>
</view>
</view>
@ -22,15 +21,13 @@ import mixinsList from '@/mixins/list.js'
export default {
name: "pendingOrder",
components: {tabber, topbar, orderList},
mixins : [mixinsList],
mixins: [mixinsList],
data() {
return {
mixinsListApi : 'getMyProductlist',
mixinsListApi: 'getMyProductlist',
}
},
methods: {
},
methods: {},
}
</script>


Loading…
Cancel
Save