3
0
Fork 0

fix(order): 订单详情添加规格, 添加代码格式化

This commit is contained in:
woody 2025-05-23 17:40:13 +08:00
parent f214679ace
commit 30558bbeae
6 changed files with 1936 additions and 374 deletions

View File

@ -19,9 +19,21 @@ yarn.lock
# uni-app specific
uni_modules/
.hbuilderx/
# Logs
*.log
# Docs
docs/
docs/
# IDE settings
.vscode/
.idea/
# Temporary files
*.tmp
*.temp
# Configuration files that shouldn't be formatted
manifest.json

1447
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -18,6 +18,10 @@
"weixin-js-sdk": "^1.6.0"
},
"devDependencies": {
"@vue/eslint-config-prettier": "^8.0.0",
"eslint": "^8.57.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-vue": "^9.33.0",
"less": "^3.13.1",
"less-loader": "^4.1.0",
"prettier": "^3.5.3"
@ -25,7 +29,11 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"format": "prettier --write .",
"check-format": "prettier --check ."
"check-format": "prettier --check .",
"lint": "eslint --ext .js,.vue .",
"lint:fix": "eslint --ext .js,.vue . --fix",
"format:check": "prettier --check \"**/*.{js,vue,json,md}\"",
"format:write": "prettier --write \"**/*.{js,vue,json,md}\""
},
"keywords": [],
"author": "",
@ -52,4 +60,4 @@
}
}
}
}
}

View File

@ -1,6 +1,6 @@
<!--
* @Descripttion:
* @version:
* @Descripttion:
* @version:
* @Author: kBank
* @Date: 2022-11-21 15:11:22
-->
@ -8,155 +8,162 @@
<view class="content">
<backIcon></backIcon>
<view class="index_header">
<view>{{'我的订单'}}</view>
<view>{{ '我的订单' }}</view>
</view>
<!-- <view class="clearFilter" @click="clearFilter">
清除筛选
</view> -->
<view
class="shareImg"
@click="rightOpen"
>
<img
src="@/static/images/serach_999.png"
alt=""
/>
<view class="shareImg" @click="rightOpen">
<img src="@/static/images/serach_999.png" alt="" />
</view>
<view class="zhan1"></view>
<view class="con_top">
<view class="tab">
<view v-for="(item, index) in orderStatusList"
:key="index"
@click="isTab = item.value"
class="tab_i">
<view
v-for="(item, index) in orderStatusList"
:key="index"
@click="isTab = item.value"
class="tab_i"
>
<view>{{ item.label }}</view>
<view :class="isTab===item.value?'heng':'heng1'">
</view>
<view :class="isTab === item.value ? 'heng' : 'heng1'"> </view>
</view>
</view>
<view class="hui"></view>
</view>
<view class="zhan"></view>
<view v-for="(item, index) in orderLists"
:key="index"
class="orderList_i">
<view v-for="(item, index) in orderLists" :key="index" class="orderList_i">
<view @click.stop="getDetails(item)">
<view class="disFlex atm just mbt10">
<view class="disFlex atm">
<view class="quan">{{ item.orderTypeVal }}</view>
<view class="tit1">{{'订单编号'}}{{ item.orderCode }}</view>
<view class="tit1">{{ '订单编号' }}{{ item.orderCode }}</view>
</view>
<view class="tit2">
{{ item.orderStatusVal }}
</view>
</view>
<view v-for="ctem,cndex in item.itemList"
:key="cndex"
class="disFlex atm just mbt10">
<view
v-for="(ctem, cndex) in item.itemList"
:key="cndex"
class="disFlex atm just mbt10"
>
<view class="disFlex atm">
<img :src="ctem.cover"
alt="">
<img :src="ctem.cover" alt="" />
<view class="tit3">
{{ ctem.productName }}
</view>
</view>
<view style="text-align:right">
<view style="text-align: right">
<view class="tit4">
{{ ctem.price | numberToCurrency | isLocal}}
</view>
<view class="tit5">
x{{ ctem.quantity }}
{{ ctem.price | numberToCurrency | isLocal }}
</view>
<view class="tit5"> x{{ ctem.quantity }} </view>
</view>
</view>
<view class="tit1">
{{'创建时间'}}{{ item.creationTime }}
</view>
<view class="tit1"> {{ '创建时间' }}{{ item.creationTime }} </view>
</view>
<view class="xian"></view>
<view class="disFlex">
<view style="flex: 1;"></view>
<view style="flex: 1"></view>
<view class="disFlex">
<u-button type="primary"
class="lBtn"
:plain="true"
shape="circle"
text="备注"
@click="openRemark(item)"
v-if="item.remark"
color="#999"></u-button>
<u-button type="primary"
v-if="item.orderStatus == 0"
class="lBtn"
:plain="true"
shape="circle"
:text="'撤销订单'"
@click="cancelPay(item)"
color="#999"></u-button>
<u-button type="primary"
v-if="item.orderStatus == 0"
shape="circle"
@click="goPay(item)"
:text="'支付'"
color="#005BAC"></u-button>
<u-button type="primary"
v-if="item.orderStatus == 3||item.orderStatus == 5"
@click="openWl(item)"
shape="circle"
:text="'查看物流'"
color="#E03030"></u-button>
<u-button
type="primary"
class="lBtn"
:plain="true"
shape="circle"
text="备注"
@click="openRemark(item)"
v-if="item.remark"
color="#999"
></u-button>
<u-button
type="primary"
v-if="item.orderStatus == 0"
class="lBtn"
:plain="true"
shape="circle"
:text="'撤销订单'"
@click="cancelPay(item)"
color="#999"
></u-button>
<u-button
type="primary"
v-if="item.orderStatus == 0"
shape="circle"
@click="goPay(item)"
:text="'支付'"
color="#005BAC"
></u-button>
<u-button
type="primary"
v-if="item.orderStatus == 3 || item.orderStatus == 5"
@click="openWl(item)"
shape="circle"
:text="'查看物流'"
color="#E03030"
></u-button>
</view>
</view>
</view>
<view class="timePicker">
<u-datetime-picker :closeOnClickOverlay="true"
@close="dataShow = false"
@cancel="dataShow = false"
@confirm="getDate"
:show="dataShow"
v-model="value1"
mode="date"></u-datetime-picker>
<u-datetime-picker :closeOnClickOverlay="true"
@close="dataShow1 = false"
@cancel="dataShow1 = false"
@confirm="getDate1"
:show="dataShow1"
v-model="value2"
mode="date"></u-datetime-picker>
<u-datetime-picker
:closeOnClickOverlay="true"
@close="dataShow = false"
@cancel="dataShow = false"
@confirm="getDate"
:show="dataShow"
v-model="value1"
mode="date"
></u-datetime-picker>
<u-datetime-picker
:closeOnClickOverlay="true"
@close="dataShow1 = false"
@cancel="dataShow1 = false"
@confirm="getDate1"
:show="dataShow1"
v-model="value2"
mode="date"
></u-datetime-picker>
</view>
<u-popup class="pop"
:show="detailsShow"
closeable
:round="10"
mode="center"
@close="detailsShow= false">
<u-popup
class="pop"
:show="detailsShow"
closeable
:round="10"
mode="center"
@close="detailsShow = false"
>
<view class="pop_a">
<view class="t_tit">
{{'订单详情'}}
{{ '订单详情' }}
</view>
<view class="pop_t">{{'商品信息'}}</view>
<view class="pop_t">{{ '商品信息' }}</view>
<view class="xian"></view>
<view class="orderList_a">
<view v-for="ctem,cndex in details.itemList"
:key="cndex"
class="disFlex atm just mbt10">
<view class="disFlex just"
style="flex:1">
<img :src="ctem.cover"
alt="">
<view style="flex:1">
<view
v-for="(ctem, cndex) in details.itemList"
:key="cndex"
class="disFlex atm just mbt10"
>
<view class="disFlex just" style="flex: 1">
<img :src="ctem.cover" alt="" />
<view style="flex: 1">
<view class="disFlex atm just">
<view class="tit3">
{{ ctem.productName }}
</view>
<view class="tit5">
x{{ ctem.quantity }}
</view>
<view class="tit5"> x{{ ctem.quantity }} </view>
</view>
<view
class="tit3"
style="color: #999; font-size: 24rpx; margin-top: 6rpx"
>
{{ ctem.specsName }}
</view>
<view class="tit4">
{{ ctem.price | numberToCurrency | isLocal}}
{{ ctem.price | numberToCurrency | isLocal }}
</view>
</view>
</view>
@ -164,18 +171,16 @@
</view>
<view class="disFlex atm just mbt10">
<view class="tit1">
{{'订单金额'}}
{{ '订单金额' }}
</view>
<view class="tit6">
{{ details.orderAmount |toThousandthAndKeepDecimal}}
{{ details.orderAmount | toThousandthAndKeepDecimal }}
</view>
</view>
<view class="disFlex atm just mbt10">
<view class="tit1">
{{'订单业绩'}}(PV)
</view>
<view class="tit1"> {{ '订单业绩' }}(PV) </view>
<view class="tit6">
{{ details.orderAchieve |toThousandthAndKeepDecimal}}
{{ details.orderAchieve | toThousandthAndKeepDecimal }}
</view>
</view>
<!-- <view class="disFlex atm just mbt10">
@ -188,7 +193,7 @@
</view> -->
<view class="xian"></view>
<view class="pop_t mbt10">
{{'收货人信息'}}
{{ '收货人信息' }}
</view>
<view class="disFlex atm mbt10 tit6">
<view>
@ -199,104 +204,112 @@
</view>
</view>
<view class="mbt10 tit1">
{{ details.recProvince }} {{ details.recCity }} {{ details.recCounty }} {{ details.address }}
{{ details.recProvince }} {{ details.recCity }}
{{ details.recCounty }} {{ details.address }}
</view>
</view>
</u-popup>
<u-modal :show="cancleOrder"
showConfirmButton
showCancelButton
:content='content'
confirmColor='#DE3932'
@confirm="toCancel"
@cancel="cancleOrder=false"
ref="uModal"
:asyncClose="true"></u-modal>
<u-modal
:show="cancleOrder"
showConfirmButton
showCancelButton
:content="content"
confirmColor="#DE3932"
@confirm="toCancel"
@cancel="cancleOrder = false"
ref="uModal"
:asyncClose="true"
></u-modal>
<u-modal :show="isRemark"
showConfirmButton
:content='remarkEd'
confirmColor='#DE3932'
@confirm="isRemark=false"
ref="uModal"
:asyncClose="true"></u-modal>
<u-modal
:show="isRemark"
showConfirmButton
:content="remarkEd"
confirmColor="#DE3932"
@confirm="isRemark = false"
ref="uModal"
:asyncClose="true"
></u-modal>
<view class="contain">
<u-popup :show="rightShow"
mode="right"
@close="rightShow = false"
:closeOnClickOverlay="false">
<u-popup
:show="rightShow"
mode="right"
@close="rightShow = false"
:closeOnClickOverlay="false"
>
<view class="rightPopup">
<view class="popup_top">
<view>{{'筛选'}}</view>
<view class="top_red"
@click="rightShow = false">{{'返回'}}</view>
<view>{{ '筛选' }}</view>
<view class="top_red" @click="rightShow = false">{{ '返回' }}</view>
</view>
<view class="typesBox">
<view class="typeTitle">
{{'订单编号'}}
{{ '订单编号' }}
</view>
<view class="choiceBox">
<view class="flex_btn">
<u--input :placeholder="'请输入'"
v-model="select.orderCode"
border="none"></u--input>
<u--input
:placeholder="'请输入'"
v-model="select.orderCode"
border="none"
></u--input>
</view>
</view>
</view>
<view class="typesBox">
<view class="typeTitle">
{{'会员编号'}}
{{ '会员编号' }}
</view>
<view class="choiceBox">
<view class="flex_btn">
<u--input :placeholder="'请输入'"
v-model="select.memberCode"
border="none"></u--input>
<u--input
:placeholder="'请输入'"
v-model="select.memberCode"
border="none"
></u--input>
</view>
</view>
</view>
<view class="typesBox">
<view class="typeTitle">
{{'订单类型'}}
{{ '订单类型' }}
</view>
<view class="choiceBox1">
<view class="flex_btn"
@click="clickType(item)"
v-for="(item,index) in orderTypes"
:key="index"
:class="select.orderType==item.value?'selectbtn':''">
{{item.label}}
<view
class="flex_btn"
@click="clickType(item)"
v-for="(item, index) in orderTypes"
:key="index"
:class="select.orderType == item.value ? 'selectbtn' : ''"
>
{{ item.label }}
</view>
</view>
</view>
<view class="typesBox">
<view class="typeTitle">
{{'日期区间'}}
{{ '日期区间' }}
</view>
<view class="choiceBox1">
<view class="flex_btn"
style="flex:1"
@click="openDate">
{{select.creationTimeStart?select.creationTimeStart:'开始时间'}}
<view class="flex_btn" style="flex: 1" @click="openDate">
{{
select.creationTimeStart
? select.creationTimeStart
: '开始时间'
}}
</view>
<view style="color: #666;">
</view>
<view class="flex_btn"
style="flex:1"
@click="openDate1">
{{select.creationTimeEnd?select.creationTimeEnd:'结束时间'}}
<view style="color: #666"> </view>
<view class="flex_btn" style="flex: 1" @click="openDate1">
{{
select.creationTimeEnd ? select.creationTimeEnd : '结束时间'
}}
</view>
</view>
</view>
<view class="footer">
<view class="footer_l"
@tap="reset">{{'清空筛选条件'}}</view>
<view class="footer_r"
@tap="getDataList(1)">{{'确定'}}</view>
<view class="footer_l" @tap="reset">{{ '清空筛选条件' }}</view>
<view class="footer_r" @tap="getDataList(1)">{{ '确定' }}</view>
</view>
</view>
</u-popup>
</view>
@ -378,7 +391,7 @@ export default {
this.select.orderType = item.value
},
getOrderType() {
api.orderType().then((res) => {
api.orderType().then(res => {
res.data.unshift({
label: '全部',
value: '',
@ -400,18 +413,18 @@ export default {
},
goPay(item) {
let orderItemsParams = []
item.itemList.forEach((ctem) => {
if(ctem.waresCode){
item.itemList.forEach(ctem => {
if (ctem.waresCode) {
orderItemsParams.push({
waresCode: ctem.waresCode,
})
waresCode: ctem.waresCode,
})
}
})
let checkObj = {
specialArea: item.orderType,
orderItemsParams: orderItemsParams,
}
api.payCheck(item.orderCode).then((res) => {
api.payCheck(item.orderCode).then(res => {
if (res.code == 200) {
uni.navigateTo({
url:
@ -435,7 +448,7 @@ export default {
// })
},
toCancel() {
api.cancelOrder(this.cancelCode).then((res) => {
api.cancelOrder(this.cancelCode).then(res => {
if (res.code == 200) {
uni.showToast({
title: '订单已取消',
@ -454,9 +467,10 @@ export default {
this.cancleOrder = true
},
getDetails(item) {
api.orderDetails(item.orderCode).then((res) => {
api.orderDetails(item.orderCode).then(res => {
this.details = res.data
this.detailsShow = true
console.log(this.details, '....this.details')
})
},
getDate(e) {
@ -474,7 +488,7 @@ export default {
this.dataShow1 = true
},
getOrderStatus() {
api.orderStatus().then((res) => {
api.orderStatus().then(res => {
res.data.unshift({
label: '全部',
value: '',
@ -490,7 +504,7 @@ export default {
this.rightShow = false
api
.orderList(Object.assign({}, this.queryParams, this.select))
.then((res) => {
.then(res => {
this.orderLists = this.orderLists.concat(res.rows)
this.total = res.total
})
@ -503,7 +517,9 @@ export default {
.index_header {
background: #fff;
font-size: 18px;
font-family: PingFang SC-Semibold, PingFang SC;
font-family:
PingFang SC-Semibold,
PingFang SC;
font-weight: 600;
color: #333333;
text-align: center;
@ -554,7 +570,7 @@ export default {
background: #f5f6f8; // margin-right: 40rpx;
}
.seatch_r {
background: #005BAC;
background: #005bac;
border-radius: 50%;
padding: 8rpx;
margin-left: 24rpx;
@ -610,7 +626,7 @@ export default {
.heng {
width: 24px;
height: 2px;
background: #005BAC;
background: #005bac;
border-radius: 1px 1px 1px 1px;
margin-top: 4rpx;
}
@ -767,7 +783,7 @@ export default {
width: 645rpx;
.popup_top {
padding: 25rpx;
background-color: rgba(176, 196, 222, .45);
background-color: rgba(176, 196, 222, 0.45);
display: flex;
justify-content: space-between;
align-items: center;
@ -777,7 +793,7 @@ export default {
color: #333333;
border-bottom: 2rpx solid #eeeeee;
.top_red {
color: #005BAC;
color: #005bac;
}
}
.typesBox {
@ -809,7 +825,7 @@ export default {
width: 100%;
}
.selectbtn {
background-color: #005BAC;
background-color: #005bac;
color: #ffffff;
}
}
@ -820,7 +836,7 @@ export default {
align-items: center;
flex-wrap: wrap;
.flex_btn {
background-color: rgba(176, 196, 222, .45);
background-color: rgba(176, 196, 222, 0.45);
display: flex;
align-items: center;
justify-content: center;
@ -833,7 +849,7 @@ export default {
margin: 17rpx 5rpx;
}
.selectbtn {
background-color: #005BAC;
background-color: #005bac;
color: #ffffff;
}
}
@ -854,7 +870,7 @@ export default {
.footer_r {
width: 327rpx;
text-align: center;
background: #005BAC;
background: #005bac;
height: 100rpx;
line-height: 100rpx;
color: #fff;

View File

@ -1,135 +1,143 @@
<!--
* @Descripttion:
* @version:
* @Descripttion: 订单撤销页面
* @version: 1.0.0
* @Author: kBank
* @Date: 2022-11-21 15:11:22
-->
<template>
<view class="content">
<view v-for="(item, index) in orderLists"
class="orderList_i">
<view
v-for="(item, index) in orderLists"
:key="`order-${item.orderCode || index}`"
class="orderList_i"
>
<view @click.stop="getDetails(item)">
<view class="disFlex atm just mbt10">
<view class="disFlex atm">
<view class="quan">{{ item.orderTypeVal }}</view>
<view class="tit1">{{'订单编号'}}{{ item.orderCode }}</view>
<view class="tit1">订单编号{{ item.orderCode }}</view>
</view>
<view class="tit2">
{{ item.orderStatusVal }}
</view>
</view>
<view v-for="ctem,cndex in item.itemList"
:key="cndex"
class="disFlex atm just mbt10">
<view
v-for="(ctem, cndex) in item.itemList"
:key="`item-${ctem.productName || cndex}`"
class="disFlex atm just mbt10"
>
<view class="disFlex atm">
<img :src="ctem.cover"
alt="">
<img :src="ctem.cover" alt="商品图片" />
<view class="tit3">
{{ ctem.productName }}
</view>
</view>
<view style="text-align:right">
<view style="text-align: right">
<view class="tit4">
{{ ctem.price | numberToCurrency | isLocal}}
</view>
<view class="tit5">
x{{ ctem.quantity }}
{{ formatPrice(ctem.price) }}
</view>
<view class="tit5">x{{ ctem.quantity }}</view>
</view>
</view>
</view>
<view class="tit1">
{{'创建时间'}}{{ item.creationTime }}
</view>
<view class="tit1">创建时间{{ item.creationTime }}</view>
</view>
<view class="xian"></view>
<view class="disFlex">
<view style="flex: 1;"></view>
<view style="flex: 1"></view>
<view class="disFlex">
<u-button type="primary"
class="lBtn"
:plain="true"
shape="circle"
:text="'撤销订单'"
@click="cancleOrder(item)"
color="#999"></u-button>
<u-button
type="primary"
class="lBtn"
:plain="true"
shape="circle"
text="撤销订单"
color="#999"
@click="cancleOrder(item)"
></u-button>
</view>
</view>
</view>
<u-popup class="pop"
:show="detailsShow"
closeable
:round="10"
mode="center"
@close="detailsShow= false">
<!-- 订单详情弹窗 -->
<u-popup
v-model="detailsShow"
class="pop"
closeable
:round="10"
mode="center"
@close="detailsShow = false"
>
<view class="pop_a">
<view class="t_tit">
{{'订单详情'}}
</view>
<view class="pop_t">{{'商品信息'}}</view>
<view class="t_tit">订单详情</view>
<view class="pop_t">商品信息</view>
<view class="xian"></view>
<view class="orderList_a">
<view v-for="ctem,cndex in details.itemList"
:key="cndex"
class="disFlex atm just mbt10">
<view class="disFlex just"
style="flex:1">
<img :src="ctem.cover"
alt="">
<view style="flex:1">
<view
v-for="(ctem, cndex) in details.itemList"
:key="`detail-item-${ctem.productName || cndex}`"
class="disFlex atm just mbt10"
>
<view class="disFlex just" style="flex: 1">
<img :src="ctem.cover" alt="商品图片" />
<view style="flex: 1">
<view class="disFlex atm just">
<view class="tit3">
{{ ctem.productName }}
</view>
<view class="tit5">
x{{ ctem.quantity }}
</view>
<view class="tit5">x{{ ctem.quantity }}</view>
</view>
<view
class="tit3"
style="color: #999; font-size: 24rpx; margin-top: 6rpx"
>
{{ ctem.specsName }}
</view>
<view class="tit4">
{{ ctem.price | numberToCurrency | isLocal}}
{{ formatPrice(ctem.price) }}
</view>
</view>
</view>
</view>
</view>
<view class="disFlex atm just mbt10">
<view class="tit1">
{{'订单金额'}}
</view>
<view class="tit1">订单金额</view>
<view class="tit6">
{{ details.orderAmount |toThousandthAndKeepDecimal}}
{{ formatCurrency(details.orderAmount) }}
</view>
</view>
<view class="disFlex atm just mbt10">
<view class="tit1">
{{'订单业绩'}}(PV)
</view>
<view class="tit1">订单业绩(PV)</view>
<view class="tit6">
{{ details.orderAchieve |toThousandthAndKeepDecimal}}
{{ formatCurrency(details.orderAchieve) }}
</view>
</view>
<!-- <view class="disFlex atm just mbt10">
<view class="tit1">
{{'订单业绩'}}(BV)
</view>
<!-- 暂时注释的订单业绩(BV)
<view class="disFlex atm just mbt10">
<view class="tit1">订单业绩(BV)</view>
<view class="tit6">
{{ details.orderAssAchieve |toThousandthAndKeepDecimal}}
{{ formatCurrency(details.orderAssAchieve) }}
</view>
</view> -->
</view>
-->
<view class="xian"></view>
<view class="pop_t mbt10">
{{'收货人信息'}}
</view>
<view class="pop_t mbt10">收货人信息</view>
<view class="disFlex atm mbt10 tit6">
<view>
{{ details.recName }}
</view>
<view>
{{ details.recPhone }}
</view>
<view>{{ details.recName }}</view>
<view>{{ details.recPhone }}</view>
</view>
<view class="mbt10 tit1">
{{ details.recProvince }} {{ details.recCity }} {{ details.recCounty }} {{ details.address }}
{{ details.recProvince }} {{ details.recCity }}
{{ details.recCounty }} {{ details.address }}
</view>
</view>
</u-popup>
@ -138,7 +146,9 @@
<script>
import * as api from '@/config/order.js'
export default {
name: 'CancelOrder',
data() {
return {
orderTypes: [],
@ -147,7 +157,7 @@ export default {
content: '确认取消订单?',
isRemark: false,
cancelCode: '',
details: '',
details: {},
orderStatusList: [],
detailsShow: false,
isTab: -1,
@ -166,69 +176,176 @@ export default {
onLoad() {
this.getDataList()
},
onShow() {},
onReachBottom() {
this.queryParams.pageNum++
this.getDataList()
},
methods: {
/**
* 格式化价格显示
*/
formatPrice(price) {
if (!price && price !== 0) return ''
//
return this.numberToCurrency(this.isLocal(price))
},
/**
* 格式化货币显示
*/
formatCurrency(amount) {
if (!amount && amount !== 0) return ''
return this.toThousandthAndKeepDecimal(amount)
},
/**
* 数字转货币格式 - 替代原来的filter
*/
numberToCurrency(num) {
// filter
if (!num && num !== 0) return ''
return parseFloat(num).toFixed(2)
},
/**
* 本地化处理 - 替代原来的filter
*/
isLocal(value) {
// filter
return value
},
/**
* 千分位格式化 - 替代原来的filter
*/
toThousandthAndKeepDecimal(num) {
if (!num && num !== 0) return '0.00'
return parseFloat(num)
.toFixed(2)
.replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,')
},
/**
* 撤销订单
*/
cancleOrder(item) {
let that = this
const that = this
uni.showModal({
title: '确定撤销订单?',
success: function (response) {
if (response.confirm) {
api.selfRevokeListCheck(item).then((res) => {
if (res.code == 200) {
api.selfRevokeOrder(item).then((res) => {
if (res.code == 200) {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 1500,
api
.selfRevokeListCheck(item)
.then(res => {
if (res.code === 200) {
api
.selfRevokeOrder(item)
.then(res => {
if (res.code === 200) {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 1500,
})
that.orderLists = []
that.getDataList()
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 1500,
})
}
})
that.orderLists = []
that.getDataList()
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 1500,
.catch(error => {
console.error('撤销订单失败:', error)
uni.showToast({
title: '撤销订单失败',
icon: 'none',
duration: 1500,
})
})
}
})
} else {
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 1500,
})
}
})
.catch(error => {
console.error('检查撤销条件失败:', error)
uni.showToast({
title: res.msg,
title: '操作失败,请重试',
icon: 'none',
duration: 1500,
})
}
})
})
}
},
})
},
/**
* 获取订单详情
*/
getDetails(item) {
api.orderDetails(item.orderCode).then((res) => {
this.details = res.data
this.detailsShow = true
})
},
getOrderStatus() {
api.orderStatus().then((res) => {
res.data.unshift({
label: '全部',
value: '',
api
.orderDetails(item.orderCode)
.then(res => {
this.details = res.data || {}
this.detailsShow = true
})
.catch(error => {
console.error('获取订单详情失败:', error)
uni.showToast({
title: '获取订单详情失败',
icon: 'none',
duration: 1500,
})
})
this.orderStatusList = res.data
})
},
getDataList(index) {
api.selfRevokeList(Object.assign({}, this.queryParams)).then((res) => {
this.orderLists = this.orderLists.concat(res.rows)
this.total = res.total
})
/**
* 获取订单状态列表
*/
getOrderStatus() {
api
.orderStatus()
.then(res => {
res.data.unshift({
label: '全部',
value: '',
})
this.orderStatusList = res.data
})
.catch(error => {
console.error('获取订单状态失败:', error)
})
},
/**
* 获取数据列表
*/
getDataList() {
api
.selfRevokeList(Object.assign({}, this.queryParams))
.then(res => {
this.orderLists = this.orderLists.concat(res.rows || [])
this.total = res.total
})
.catch(error => {
console.error('获取订单列表失败:', error)
uni.showToast({
title: '获取订单列表失败',
icon: 'none',
duration: 1500,
})
})
},
},
}
@ -238,7 +355,9 @@ export default {
.index_header {
background: #fff;
font-size: 18px;
font-family: PingFang SC-Semibold, PingFang SC;
font-family:
PingFang SC-Semibold,
PingFang SC;
font-weight: 600;
color: #333333;
text-align: center;
@ -254,6 +373,7 @@ export default {
z-index: 1000000000;
right: 10rpx;
top: 10rpx;
img {
width: 40rpx;
height: 40rpx;
@ -273,15 +393,16 @@ export default {
align-items: center;
position: relative;
border-bottom: 2rpx solid #eee;
.seach_i {
padding: 0 20rpx;
border-radius: 34rpx;
background: #fff;
background: #f5f6f8;
flex: 1;
background: #f5f6f8; // margin-right: 40rpx;
}
.seatch_r {
background: #005BAC;
background: #005bac;
border-radius: 50%;
padding: 8rpx;
margin-left: 24rpx;
@ -292,14 +413,16 @@ export default {
display: flex;
align-items: center;
padding: 38rpx 26rpx;
.timeA {
font-size: 26rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #333;
margin-right: 46rpx;
border-bottom: 2rpx solid #fff; // padding-bottom: 10rpx;
border-bottom: 2rpx solid #fff;
}
.timeB {
width: 158rpx;
font-size: 24rpx;
@ -307,7 +430,7 @@ export default {
font-weight: 400;
color: #999999;
margin-right: 46rpx;
border-bottom: 2rpx solid #eee; // padding-bottom: 10rpx;
border-bottom: 2rpx solid #eee;
text-align: center;
}
}
@ -322,12 +445,11 @@ export default {
}
.tab_i {
// width: 120rpx;
text-align: center;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: #333333; // margin-right: 28rpx;
color: #333333;
white-space: nowrap;
display: flex;
flex-direction: column;
@ -386,6 +508,7 @@ export default {
padding: 25rpx;
border-bottom: 22rpx solid #eee;
background: #fff;
img {
width: 124rpx;
height: 124rpx;
@ -439,7 +562,7 @@ export default {
font-size: 24rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #005BAC;
color: #005bac;
}
.tit5 {
@ -482,19 +605,20 @@ export default {
color: #333333;
}
::v-deep .u-popup__content {
:deep(.u-popup__content) {
// width: 90%;
}
.pop ::v-deep .u-popup__content {
.pop :deep(.u-popup__content) {
width: 90%;
}
.rightPopup {
width: 645rpx;
.popup_top {
padding: 25rpx;
background-color: rgba(176, 196, 222, .45);
background-color: rgba(176, 196, 222, 0.45);
display: flex;
justify-content: space-between;
align-items: center;
@ -503,12 +627,15 @@ export default {
font-weight: 400;
color: #333333;
border-bottom: 2rpx solid #eeeeee;
.top_red {
color: #005BAC;
color: #005bac;
}
}
.typesBox {
margin-top: 40rpx;
.typeTitle {
padding: 0 24rpx;
font-size: 30rpx;
@ -516,11 +643,13 @@ export default {
font-weight: bold;
color: #333333;
}
.choiceBox {
padding: 0 12rpx;
display: flex;
margin-top: 17rpx;
align-items: center; // flex-wrap: wrap;
align-items: center;
.flex_btn {
background-color: #f4f4f4;
display: flex;
@ -535,19 +664,22 @@ export default {
margin: 17rpx 5rpx;
width: 100%;
}
.selectbtn {
background-color: #005BAC;
background-color: #005bac;
color: #ffffff;
}
}
.choiceBox1 {
padding: 0 12rpx;
display: flex;
margin-top: 17rpx;
align-items: center;
flex-wrap: wrap;
.flex_btn {
background-color: rgba(176, 196, 222, .45);
background-color: rgba(176, 196, 222, 0.45);
display: flex;
align-items: center;
justify-content: center;
@ -559,18 +691,21 @@ export default {
color: #333333;
margin: 17rpx 5rpx;
}
.selectbtn {
background-color: #005BAC;
background-color: #005bac;
color: #ffffff;
}
}
}
.footer {
position: fixed;
bottom: 0;
display: flex;
align-items: center;
width: 100%;
.footer_l {
width: 327rpx;
text-align: center;
@ -578,10 +713,11 @@ export default {
height: 100rpx;
line-height: 100rpx;
}
.footer_r {
width: 327rpx;
text-align: center;
background: #005BAC;
background: #005bac;
height: 100rpx;
line-height: 100rpx;
color: #fff;
@ -589,11 +725,11 @@ export default {
}
}
.contain ::v-deep .u-transition {
.contain :deep(.u-transition) {
top: 45px !important;
}
.timePicker ::v-deep .u-transition {
.timePicker :deep(.u-transition) {
z-index: 10076 !important;
}
</style>

View File

@ -13,29 +13,27 @@
:rules="rules"
ref="uForm"
>
<u-form-item required
label-width="180rpx"
:label="'证件(正面)'">
<uploadImg :ifsfz='true'
@imageUploaded='imageUploaded1'
prop="idFront"
ref="uploadImg1"
style="margin-right: 30rpx;"
:bgimg="`../../../static/images/idCard1.png`"
v-model="dataForm.idFront"></uploadImg>
<u-form-item required label-width="180rpx" :label="'证件(正面)'">
<uploadImg
:ifsfz="true"
@imageUploaded="imageUploaded1"
prop="idFront"
ref="uploadImg1"
style="margin-right: 30rpx"
:bgimg="`../../../static/images/idCard1.png`"
v-model="dataForm.idFront"
></uploadImg>
</u-form-item>
<u-form-item required
label-width="180rpx"
:label="'证件(反面)'">
<uploadImg :ifsfz='true'
@imageUploaded='imageUploaded2'
prop="idBack"
ref="uploadImg2"
style="margin-right: 30rpx;"
:bgimg="`../../../static/images/idCard2.png`"
v-model="dataForm.idBack"></uploadImg>
<u-form-item required label-width="180rpx" :label="'证件(反面)'">
<uploadImg
:ifsfz="true"
@imageUploaded="imageUploaded2"
prop="idBack"
ref="uploadImg2"
style="margin-right: 30rpx"
:bgimg="`../../../static/images/idCard2.png`"
v-model="dataForm.idBack"
></uploadImg>
</u-form-item>
<u-form-item
required
@ -196,7 +194,6 @@
</template>
</u--input>
</u-form-item>
<u-code
:seconds="seconds"
@ -228,7 +225,7 @@
<view class="tit2"
@click="toAgree"> 推广人员服务协议</view>
</view> -->
<view class="btnbox" style="padding-bottom: 180rpx;">
<view class="btnbox" style="padding-bottom: 180rpx">
<u-button class="subbtn" @click="submit">{{ '确定' }}</u-button>
</view>
</view>
@ -256,7 +253,7 @@
</view>
<!-- <view class="footer">
</view> -->
</view>
@ -449,7 +446,7 @@ export default {
}
})
},
getIdCardInfo(n) {
ban
.ocrIdCard({
@ -538,7 +535,9 @@ export default {
uni.$u.toast('倒计时结束后再发送')
}
} else {
uni.$u.toast(this.dataForm.phone ? '手机号格式不正确' : '请先输入手机号')
uni.$u.toast(
this.dataForm.phone ? '手机号格式不正确' : '请先输入手机号'
)
return
}
},
@ -624,7 +623,7 @@ export default {
padding: 0 20rpx;
.subbtn {
background: #005BAC;
background: #005bac;
border-radius: 46rpx;
font-size: 30rpx;
font-family: Source Han Sans CN;
@ -656,7 +655,7 @@ export default {
font-size: 26rpx;
font-family: Source Han Sans CN;
font-weight: bold;
color: #005BAC;
color: #005bac;
}
.tit3 {