3
0
Fork 0

Merge branch 'lx-dev' of gitee.com:cabbage_qd/web-base-h5 into lx-online

This commit is contained in:
woody 2025-05-27 09:05:10 +08:00
commit 37a91fe8a5
27 changed files with 3417 additions and 2006 deletions

12
.editorconfig Normal file
View File

@ -0,0 +1,12 @@
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false

39
.eslintrc.js Normal file
View File

@ -0,0 +1,39 @@
module.exports = {
env: {
browser: true,
es2021: true,
node: true,
},
extends: ['eslint:recommended', '@vue/eslint-config-prettier'],
parserOptions: {
ecmaVersion: 2021,
sourceType: 'module',
},
globals: {
uni: 'readonly',
wx: 'readonly',
plus: 'readonly',
getCurrentPages: 'readonly',
getApp: 'readonly',
},
rules: {
// Vue规则
'vue/multi-word-component-names': 'off',
'vue/no-unused-vars': 'error',
'vue/valid-v-for': 'error',
'vue/require-v-for-key': 'error',
'vue/no-deprecated-filter': 'error',
// JavaScript规则
'no-unused-vars': 'warn',
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
// 代码风格
semi: ['error', 'never'],
quotes: ['error', 'single'],
'comma-dangle': ['error', 'only-multiline'],
indent: ['error', 2],
'eol-last': ['error', 'always'],
},
}

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

24
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,24 @@
{
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.organizeImports": true
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[vue]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"eslint.validate": ["javascript", "vue"],
"prettier.requireConfig": true,
"editor.tabSize": 2,
"editor.insertSpaces": true,
"files.eol": "\n",
"files.insertFinalNewline": true,
"files.trimTrailingWhitespace": true
}

View File

@ -1,275 +0,0 @@
<template>
<view class="main">
<!-- 推荐达人 -->
<u-popup :show="drShow" :round="10" mode="center" @close="closeShow" closeable>
<view class="uni-margin-wrap">
<swiper class="swiper" circular :indicator-dots="indicatorDots" :autoplay="autoplay"
:interval="interval" :duration="duration">
<swiper-item>
<view class="swiper-item">
<view class="title-con">{{ '推荐达人' }}</view>
<view class="screen">
<view class="screen-view" @click="screenTaps(index, item)"
v-for="(item, index) in screenList"
:style="remIndex == item.id ? 'font-weight:bold' : ''">
{{ item.name }}
</view>
</view>
<view class="tjClass" v-for="(item, index) in tjList">
<view class="styleColors">NO.0{{ item.rank }}</view>
<img class="avatar" v-if="item.headPath" :src="item.headPath" />
<image class="avatar" v-else src="@/static/images/avatar.png" />
<view class="user-name">{{ item.memberName }}</view>
</view>
</view>
</swiper-item>
<swiper-item>
<view class="swiper-item">
<view class="title-con">{{ '抗衰达人' }}</view>
<view class="screen">
<view class="screen-view" @click="screenTaps1(index, item)"
v-for="(item, index) in screenList1"
:style="remIndex1 == item.id ? 'font-weight:600' : ''">
{{ item.name }}
</view>
</view>
<view class="tjClass" v-for="(item, index) in ksList">
<view class="styleColors">NO.0{{ item.rank }}</view>
<img class="avatar" v-if="item.headPath" :src="item.headPath" />
<image class="avatar" v-else src="@/static/images/avatar.png" />
<view class="user-name">{{ item.memberName }}</view>
</view>
</view>
</swiper-item>
</swiper>
</view>
</u-popup>
</view>
</template>
<script>
import * as my from '@/config/mine.js'
// import Swiper from "swiper";
export default {
name: "talentList",
props: {
drShow: {
type: Boolean,
default: false
}
},
data() {
return {
screenList: [{
name: '年度',
id: 6
},
{
name: '季度',
id: 5
},
{
name: '月度',
id: 4
},
],
screenList1: [{
name: '年度',
id: 9
},
{
name: '季度',
id: 8
},
{
name: '月度',
id: 7
},
],
remIndex: 6, //
remIndex1: 9, //
tjList: [],
ksList: [],
indicatorDots: true,
autoplay: false,
interval: 2000,
duration: 500
};
},
mounted() {
this.getUserTj();
this.getUserKs()
},
methods: {
closeShow(){
this.$emit('closeShow')
},
screenTaps(index, item) {
this.remIndex = item.id;
this.getUserTj();
},
screenTaps1(index, item) {
this.remIndex1 = item.id;
this.getUserKs();
},
getUserTj() {
my.recommend({
wallType: this.remIndex
}).then((res) => {
this.tjList = res.rows;
});
},
getUserKs() {
my.repurchase({
wallType: this.remIndex1
}).then((res) => {
this.ksList = res.rows;
});
},
}
}
</script>
<style lang="scss" scoped>
.uni-margin-wrap {
width: 690rpx;
height:800rpx;
.swiper {
height: 800rpx;
.swiper-item {
display: block;
text-align: center;
.title-con {
font-size: 36rpx;
font-family: Source Han Sans CN;
font-weight: bold;
color: #282828;
margin: 60rpx 0;
}
.screen {
display: flex;
align-items: center;
justify-content: center;
.screen-view {
margin: 0 50rpx;
cursor: pointer;
font-size: 30rpx;
font-family: Source Han Sans CN;
color: #282828;
}
}
.tjClass {
display: flex;
align-items: center;
margin-top: 30rpx;
justify-content: center;
.styleColors {
font-size: 26rpx;
font-family: Source Han Sans CN;
font-weight: bold;
color: #005BAC;
}
.avatar {
width: 124rpx;
height: 124rpx;
border-radius: 50%;
margin-top: 10rpx;
margin: 0 30rpx;
}
.user-name {
font-size: 32rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #282828;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
}
}
}
.swiper-container {
.swiper-slide {
width: 650rpx;
padding-bottom: 40rpx;
background: #ffffff;
text-align: center;
.title-con {
font-size: 36rpx;
font-family: Source Han Sans CN;
font-weight: bold;
color: #282828;
margin: 60rpx 0;
}
.screen {
display: flex;
align-items: center;
justify-content: center;
.screen-view {
margin: 0 50rpx;
cursor: pointer;
font-size: 30rpx;
font-family: Source Han Sans CN;
color: #282828;
}
}
.tjClass {
display: flex;
align-items: center;
margin-top: 30rpx;
justify-content: center;
.styleColors {
font-size: 26rpx;
font-family: Source Han Sans CN;
font-weight: bold;
color: #005BAC;
}
.avatar {
width: 124rpx;
height: 124rpx;
border-radius: 50%;
margin-top: 10rpx;
margin: 0 30rpx;
}
.user-name {
font-size: 32rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #282828;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
}
}
</style>

View File

@ -12,12 +12,5 @@ export const getMemberGift = (params) => http.get('/member/api/member-gift/membe
//全部荣誉墙
export const getMemberHonorWallAll = (params) => http.get('/member/api/member/member-honor-wall-all', { params })
// 获取抗衰达人
export const repurchase =(params)=>http.post('/member/api/achieve/repurchase',params)
// 获取推荐达人
export const recommend =(params)=>http.post('/member/api/achieve/recommend',params)
//年度奖衔
export const yearAwards = (params) => http.get('/member/api/member/year-awards-list', { params })

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

@ -171,13 +171,13 @@ export default {
message: "请输入手机号",
trigger: ["blur"],
},
// {
// validator: (rule, value, callback) => {
// return this.$u.test.mobile(value);
// },
// message: "",
// trigger: ["blur"],
// },
{
validator: (rule, value, callback) => {
return this.$u.test.mobile(value);
},
message: "手机号格式不正确",
trigger: ["blur"],
},
],
},
};

View File

@ -637,15 +637,18 @@
message: '请输入',
trigger: "blur"
}, ],
storePhone: [{
storePhone: [
{
required: true,
message: '请输入联系方式',
trigger: 'blur',
message: '请输入手机号',
trigger: ['blur'],
},
{
min: 11,
message: '请输入正确的手机号',
trigger: 'blur'
validator: (rule, value, callback) => {
return this.$u.test.mobile(value)
},
message: '手机号格式不正确',
trigger: ['blur'],
},
],
storeSign: [{

View File

@ -695,11 +695,17 @@ export default {
],
storePhone: [
{
required: true,
message: '请输入联系方式',
trigger: 'blur',
},
{ min: 11, message: '请输入正确的手机号', trigger: 'blur' },
required: true,
message: '请输入手机号',
trigger: ['blur'],
},
{
validator: (rule, value, callback) => {
return this.$u.test.mobile(value)
},
message: '手机号格式不正确',
trigger: ['blur'],
},
],
storeSign: [
{ required: true, message: " ", trigger: "blur" },

View File

@ -134,7 +134,7 @@
this.tips = text;
},
getCode() {
if (this.dataForm.phone) {
if (this.dataForm.phone && this.$u.test.mobile(this.dataForm.phone)) {
if (this.$refs.uCode.canGetCode) {
//
uni.showLoading({
@ -153,7 +153,7 @@
uni.$u.toast('倒计时结束后再发送');
}
} else {
uni.$u.toast('请先输入手机号')
uni.$u.toast(this.dataForm.phone ? '手机号格式不正确' : '请先输入手机号')
return
}
},

View File

@ -125,13 +125,13 @@ export default {
message: '请输入手机号',
trigger: ['blur'],
},
// {
// validator: (rule, value, callback) => {
// return this.$u.test.mobile(value);
// },
// message: "",
// trigger: ["blur"],
// },
{
validator: (rule, value, callback) => {
return this.$u.test.mobile(value);
},
message: "手机号格式不正确",
trigger: ["blur"],
},
],
},
}

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

@ -252,7 +252,7 @@
this.tips = text;
},
getCode() {
if (this.dataForm.phone) {
if (this.dataForm.phone && this.$u.test.mobile(this.dataForm.phone)) {
if (this.$refs.uCode.canGetCode) {
//
uni.showLoading({
@ -271,7 +271,7 @@
uni.$u.toast('倒计时结束后再发送');
}
} else {
uni.$u.toast('请先输入手机号')
uni.$u.toast(this.dataForm.phone ? '手机号格式不正确' : '请先输入手机号')
return
}
},

View File

@ -112,8 +112,15 @@ export default {
phone: [
{
required: true,
message: '请输入联系方式',
trigger: ['change', 'blur'],
message: '请输入手机号',
trigger: ['blur'],
},
{
validator: (rule, value, callback) => {
return this.$u.test.mobile(value)
},
message: '手机号格式不正确',
trigger: ['blur'],
},
],
name: [

View File

@ -671,7 +671,21 @@ export default {
trigger: ["blur"],
},
],
phone: [{ validator: this.phonePass, trigger: ["blur"] }],
phone: [
{
required: true,
message: "请输入手机号",
trigger: ["blur"],
},
{
validator: (rule, value, callback) => {
return this.$u.test.mobile(value);
},
message: "手机号格式不正确",
trigger: ["blur"],
}
],
recName: [
{
required: true,

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

@ -1,26 +1,26 @@
<template>
<view class="content">
<view @click="goRouter(item.path)"
class="kuaibox"
v-for="(item,index) in theselfHeader"
:key="index">
<view
@click="goRouter(item.path)"
class="kuaibox"
v-for="(item, index) in theselfHeader"
:key="index"
>
<view class="">
{{item.name}}
{{ item.name }}
</view>
<image class="kuaiimg"
:src="item.url"
mode=""></image>
<image class="kuaiimg" :src="item.url" mode=""></image>
</view>
</view>
</template>
<script>
import * as sel from '@/config/selfService.js'
import { mapGetters } from "vuex";
import { mapGetters } from 'vuex'
export default {
computed: {
...mapGetters(["user"]),
...mapGetters(['user']),
},
data() {
return {
@ -43,12 +43,6 @@ export default {
path: '/pages/selfService/updateDomicile/updateDomicile',
id: '3',
},
{
name: '经销商认证',
url: '../../static/images/zz_jxs.png',
path: '/pages/delear/index',
id: '4',
},
// {
// name: '',
// url: '../../static/images/zz_thhdd.png',
@ -69,97 +63,12 @@ export default {
},
],
theselfHeader: [],
userInfo:''
userInfo: '',
}
},
onLoad() {
this.userInfo = uni.getStorageSync("User");
onShow() {
this.userInfo = uni.getStorageSync('User')
this.checkIfShow()
if(this.userInfo.makerSpaceShow == 1||this.userInfo.makerSpaceShow==undefined) {
this.selfServiceList= [
{
name: '修改地址',
url: '../../static/images/zz_dz.png',
path: '/pages/selfService/updateAdress/updateAdress',
id: '1',
},
// {
// name: '',
// url: '../../static/images/zz_tjbb.png',
// path: '/pages/selfService/orderPick/orderPick',
// id: '2',
// },
{
name: '户籍变更',
url: '../../static/images/zz_gxbg.png',
path: '/pages/selfService/updateDomicile/updateDomicile',
id: '3',
},
// {
// name: '',
// url: '../../static/images/zz_thhdd.png',
// path: '/pages/selfService/monthlyHistory/monthlyHistory',
// id: '7',
// },
{
name: '自助撤单',
url: '../../static/images/zz_gzs.png',
path: '/pages/selfService/cancleOrder/index',
id: '8',
},
{
name: '实名认证',
url: '../../static/images/zz_jxs.png',
path: '/pages/selfService/realName/realName',
id: '9',
},
]
}else{
this.selfServiceList= [
{
name: '修改地址',
url: '../../static/images/zz_dz.png',
path: '/pages/selfService/updateAdress/updateAdress',
id: '1',
},
// {
// name: '',
// url: '../../static/images/zz_tjbb.png',
// path: '/pages/selfService/orderPick/orderPick',
// id: '2',
// },
{
name: '户籍变更',
url: '../../static/images/zz_gxbg.png',
path: '/pages/selfService/updateDomicile/updateDomicile',
id: '3',
},
{
name: '体验中心发起人认证',
url: '../../static/images/zz_cxlj.png',
path: '/pages/makerspace/index',
id: '6',
},
// {
// name: '',
// url: '../../static/images/zz_thhdd.png',
// path: '/pages/selfService/monthlyHistory/monthlyHistory',
// id: '7',
// },
{
name: '自助撤单',
url: '../../static/images/zz_gzs.png',
path: '/pages/selfService/cancleOrder/index',
id: '8',
},
{
name: '实名认证',
url: '../../static/images/zz_jxs.png',
path: '/pages/selfService/realName/realName',
id: '9',
},
]
}
},
methods: {
goRouter(path) {
@ -168,8 +77,8 @@ export default {
})
},
checkIfShow() {
sel.checkIfShow().then((res) => {
this.selfServiceList.forEach((ele) => {
sel.checkIfShow().then(res => {
this.selfServiceList.forEach(ele => {
if (ele.id == 1) {
ele.ifshow = res.data.existAddress
} else if (ele.id == 2) {
@ -187,13 +96,12 @@ export default {
// existMemberMonth
} else if (ele.id == 8) {
ele.ifshow = res.data.selfRevokeOrder
} else if (ele.id == 9&&this.userInfo.pkCountry == 1) {
} else if (ele.id == 9 && this.userInfo.pkCountry == 1) {
ele.ifshow = res.data.existRealName
}
})
const theselfHeader = []
this.selfServiceList.forEach((element) => {
this.selfServiceList.forEach(element => {
if (element.ifshow == 0) {
theselfHeader.push(element)
}
@ -234,4 +142,4 @@ export default {
}
}
}
</style>
</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({
@ -517,7 +514,7 @@ export default {
this.tips = text
},
getCode() {
if (this.dataForm.phone) {
if (this.dataForm.phone && this.$u.test.mobile(this.dataForm.phone)) {
if (this.$refs.uCode.canGetCode) {
//
uni.showLoading({
@ -538,7 +535,9 @@ export default {
uni.$u.toast('倒计时结束后再发送')
}
} else {
uni.$u.toast('请先输入手机号')
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 {

View File

@ -4,52 +4,62 @@
<!-- <view class="top_text">
{{'注:修改地址后,若涉及运费问题,系统将自动扣除请在原订单基础上填写新的收货人信息'}}
</view> -->
<u-form :model="addressForm"
labelWidth="auto"
ref="uForm">
<u-form :model="addressForm" labelWidth="auto" ref="uForm">
<view class="view-class">
<u-form-item :label="'订单编号'"
label-width="150rpx"
prop="orderCode">
<u--input v-model="addressForm.orderCode"
disabled
disabledColor="#ffffff"
placeholder="请选择"
border="none"></u--input>
<u-form-item
:label="'订单编号'"
label-width="150rpx"
prop="orderCode"
>
<u--input
v-model="addressForm.orderCode"
disabled
disabledColor="#ffffff"
placeholder="请选择"
border="none"
></u--input>
</u-form-item>
</view>
<view class="view-class">
<u-form-item :label="'收货人'"
label-width="150rpx"
prop="newRecName">
<u-input v-model="addressForm.newRecName"
placeholder-class="place-class"
class="border-color"
:placeholder="'请输入'" />
<u-form-item :label="'收货人'" label-width="150rpx" prop="newRecName">
<u-input
v-model="addressForm.newRecName"
placeholder-class="place-class"
class="border-color"
:placeholder="'请输入'"
/>
</u-form-item>
</view>
<view class="view-class">
<u-form-item :label="'联系方式'"
label-width="150rpx"
prop="newRecPhone">
<u-input v-model="addressForm.newRecPhone"
placeholder-class="place-class"
:maxlength="userInfo.pkSettleCountry == 1?11:20"
class="border-color"
:placeholder="'请输入'" />
<u-form-item
:label="'联系方式'"
label-width="150rpx"
prop="newRecPhone"
>
<u-input
v-model="addressForm.newRecPhone"
placeholder-class="place-class"
:maxlength="userInfo.pkSettleCountry == 1 ? 11 : 20"
class="border-color"
:placeholder="'请输入'"
/>
</u-form-item>
</view>
<view class="view-class"
@click="getDiqu">
<u-form-item :label="'收货地址'"
label-width="150rpx"
prop="address">
<view v-if="address"
style="font-size: 28rpx;color: #333;margin-left: 20rpx;">{{address}}</view>
<view style="margin-left: 20rpx;font-size: 28rpx;color: rgb(192, 196, 204);"
v-else>请选择收货地址
<view class="view-class" @click="getDiqu">
<u-form-item :label="'收货地址'" label-width="150rpx" prop="address">
<view
v-if="address"
style="font-size: 28rpx; color: #333; margin-left: 20rpx"
>{{ address }}</view
>
<view
style="
margin-left: 20rpx;
font-size: 28rpx;
color: rgb(192, 196, 204);
"
v-else
>请选择收货地址
</view>
</u-form-item>
<view class="drop">
@ -57,106 +67,81 @@
</view>
</view>
<view class="view-class">
<u-form-item :label="'详细地址'"
class="label-style"
label-width="150rpx"
prop="newRecAddress">
<u-textarea v-model="addressForm.newRecAddress"
placeholder-class="place-class"
maxlength="200"
class="border-color"
:placeholder="'请输入详细地址'" />
<u-form-item
:label="'详细地址'"
class="label-style"
label-width="150rpx"
prop="newRecAddress"
>
<u-textarea
v-model="addressForm.newRecAddress"
placeholder-class="place-class"
maxlength="200"
class="border-color"
:placeholder="'请输入详细地址'"
/>
</u-form-item>
<view class="lis_address"
v-if="addressList.length>0">
<view class="lis_title">{{'历史地址'}}</view>
<view class="lis_address" v-if="addressList.length > 0">
<view class="lis_title">{{ '历史地址' }}</view>
<view class="">
<u-radio-group @change="groupChange"
placement="column"
v-model="choiceValue"
iconPlacement="left">
<div v-for="(item, index) in addressList"
:key="index"
class="custom-radio-label">
<u-radio :name="item.pkId"
activeColor="#005BAC"></u-radio>
<u-radio-group
@change="groupChange"
placement="column"
v-model="choiceValue"
iconPlacement="left"
>
<div
v-for="(item, index) in addressList"
:key="index"
class="custom-radio-label"
>
<u-radio :name="item.pkId" activeColor="#005BAC"></u-radio>
<div class="custom-label-content">
<view class="label_name">{{ item.recName }}</view>
<view class="label_phone">{{ item.recPhone }}</view>
<view class="label_address">{{ item.recArea }}</view>
</div>
</div>
</u-radio-group>
</view>
</view>
</view>
<view class="view-class">
<u-form-item :label="'邮费扣除'"
label-width="150rpx"
prop="newPostage">
<u--input v-model="addressForm.newPostage"
disabled
disabledColor="#ffffff"
placeholder=""
border="none"></u--input>
<u-form-item
:label="'邮费扣除'"
label-width="150rpx"
prop="newPostage"
>
<u--input
v-model="addressForm.newPostage"
disabled
disabledColor="#ffffff"
placeholder=""
border="none"
></u--input>
</u-form-item>
</view>
<view class="view-class">
<u-form-item :label="'备注'"
label-width="150rpx"
prop="selfRemark">
<u-input v-model="addressForm.selfRemark"
placeholder-class="place-class"
class="border-color"
:placeholder="'请输入'" />
<u-form-item :label="'备注'" label-width="150rpx" prop="selfRemark">
<u-input
v-model="addressForm.selfRemark"
placeholder-class="place-class"
class="border-color"
:placeholder="'请输入'"
/>
</u-form-item>
</view>
</u-form>
</view>
<v-address ref="address"
@getAddressData="AddressData"
:defaultCode="defaultCode"
@addressData="addressData"></v-address>
<u-button type="success"
shape="circle"
class="btn"
@click="submit">{{'确定'}}</u-button>
<u-popup class="thePopup"
:show="successShow"
mode="center"
@close="successShow = false">
<view class="successPopup">
<view class="poupTop">
<view class="theiconbox">
<u-icon name="checkbox-mark"
color="#ffffff"
size="26"></u-icon>
</view>
<view class="theicontitle">
{{'提交成功'}}
</view>
</view>
<view class="poupContent">
{{'我们将在24小时内完成业务受理具体进度将会以通知形式发送给您请注意查收'}}
<!-- <view>
{{'售后电话'}}400-111-2818
</view> -->
</view>
<!-- <view class="poupContent">
{{'我们将在24小时内完成业务受理具体进度将会以通知形式发送给您请注意查收'}}</br>
{{'售后电话'}}400-111-2818
</view> -->
<view class="poupBtn"
@click="sureBtn">
{{'确定'}}
</view>
</view>
</u-popup>
<v-address
ref="address"
@getAddressData="AddressData"
:defaultCode="defaultCode"
@addressData="addressData"
></v-address>
<u-button type="success" shape="circle" class="btn" @click="submit">{{
'确定'
}}</u-button>
</view>
</template>
@ -217,14 +202,14 @@ export default {
newRecPhone: [
{
required: true,
message: '请输入',
message: '请输入手机号',
trigger: ['blur'],
},
{
validator: (rule, value, callback) => {
return this.$u.test.mobile(value)
},
message: '请先输入手机号',
message: '手机号格式不正确',
trigger: ['blur'],
},
],
@ -243,7 +228,7 @@ export default {
this.address = query.recProvinceVal + query.recCityVal
}
this.addressForm.newRecName = query.recName
this.addressForm.newRecPhone = query.recPhone
this.$set(this.addressForm, 'newRecPhone', query.recPhone)
this.addressForm.newRecAddress = query.recAddress
this.addressForm.newRecProvince = query.recProvince
this.addressForm.newRecCity = query.recCity
@ -261,7 +246,7 @@ export default {
},
methods: {
groupChange(value) {
this.addressList.forEach((ele) => {
this.addressList.forEach(ele => {
if (value == ele.pkId) {
this.$set(this.addressForm, 'newRecName', ele.recName)
this.$set(this.addressForm, 'newRecPhone', ele.recPhone)
@ -290,13 +275,13 @@ export default {
tranType: this.addressForm.tranType,
orderItemsParams: this.addressForm.orderItemsParams,
}
sel.queryAdressPostage(postageData).then((res) => {
sel.queryAdressPostage(postageData).then(res => {
this.$set(this.addressForm, 'newPostage', res.data.postage)
this.$forceUpdate()
})
},
getAddressList() {
sel.addressList({}).then((res) => {
sel.addressList({}).then(res => {
this.addressList = res.data
})
},
@ -304,17 +289,20 @@ export default {
this.address = name
},
submit() {
this.$refs.uForm.validate().then((res) => {
sel.saveSelfAddress(this.addressForm).then((res) => {
this.$refs.uForm.validate().then(res => {
sel.saveSelfAddress(this.addressForm).then(res => {
if (res.code == '200') {
// uni.showToast({
// title: res.msg,
// icon: 'none',
// success() {
uni.showToast({
title: '修改成功',
icon: 'none',
success() {
setTimeout(() => {
uni.navigateBack()
}, 600)
},
})
// }
// })
this.successShow = true
// this.successShow = true
}
})
})
@ -438,7 +426,7 @@ export default {
font-size: 28rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #005BAC;
color: #005bac;
}
}
@ -482,7 +470,7 @@ page {
}
.btn {
background-color: #005BAC;
background-color: #005bac;
border: none;
height: 92rpx;
line-height: 92rpx;
@ -528,7 +516,7 @@ page {
}
.poupBtn {
background: #005BAC;
background: #005bac;
border-radius: 39rpx;
padding: 26rpx 0;
display: flex;
@ -543,4 +531,4 @@ page {
::v-deep .thePopup .u-popup__content {
background-color: rgba(0, 0, 0, 0);
}
</style>
</style>

View File

@ -1,360 +1,388 @@
<template>
<view class="content">
<view class="con_top">
<view class="seach">
<view class="seach_i">
<u--input prefixIcon="search" v-model="queryParams.orderCode"
prefixIconStyle="font-size: 22px;color: #909399;height:32px" border="none" placeholder="请输入订单编号"
suffixIconStyle="color: #909399"></u--input>
</view>
<view class="seatch_r" @click="getDataList">
<u-icon name="search" size="22" color="#fff"></u-icon>
</view>
</view>
</view>
<template v-if="orderLists.length>0">
<view class="theListbox">
<view v-for="(item, index) in orderLists" class="orderList_i">
<view class="list_flex">
<view class="top_flex">
<view class="zc_btn">{{item.orderTypeVal}}</view>
<view class="code_text">{{'订单编号'}}{{item.orderCode}}</view>
</view>
<view class="top_status">
{{item.orderStatusVal}}
</view>
</view>
<view class="list_flex">
<view class="center_price">{{item.orderAmount}}</view>
</view>
<view class="list_flex" style="margin-top: 10rpx;">
<view class="top_flex">
<view class="code_text">{{'审核状态'}}{{item.approveStatusVal}}</view>
</view>
<view v-if="item.approveStatus==3" class="top_status" @click="findWhy(item)">
{{'驳回原因'}}
</view>
</view>
<view class="btm_time">
{{'创建时间'}}:{{item.creationTime}}
</view>
<view class="content">
<view class="con_top">
<view class="seach">
<view class="seach_i">
<u--input
prefixIcon="search"
v-model="queryParams.orderCode"
prefixIconStyle="font-size: 22px;color: #909399;height:32px"
border="none"
placeholder="请输入订单编号"
suffixIconStyle="color: #909399"
></u--input>
</view>
<view class="seatch_r" @click="getDataList">
<u-icon name="search" size="22" color="#fff"></u-icon>
</view>
</view>
</view>
<template v-if="orderLists.length > 0">
<view class="theListbox">
<view v-for="(item, index) in orderLists" class="orderList_i">
<view class="list_flex">
<view class="top_flex">
<view class="zc_btn">{{ item.orderTypeVal }}</view>
<view class="code_text"
>{{ '订单编号' }}{{ item.orderCode }}</view
>
</view>
<view class="top_status">
{{ item.orderStatusVal }}
</view>
</view>
<view class="list_flex">
<view class="center_price">{{ item.orderAmount }}</view>
</view>
<!-- <view class="list_flex" style="margin-top: 10rpx">
<view class="top_flex">
<view class="code_text"
>{{ '审核状态' }}{{ item.approveStatusVal }}</view
>
</view>
<view
v-if="item.approveStatus == 3"
class="top_status"
@click="findWhy(item)"
>
{{ '驳回原因' }}
</view>
</view> -->
<view class="btm_time">
{{ '创建时间' }}:{{ item.creationTime }}
</view>
<view class="list_btn">
<view class="sub_btn" @click="updateAdress(item)">
{{'修改地址'}}
</view>
</view>
<!-- <view class='line_title'>变更后省/{{item.recProvinceVal}}</view>
<view class="list_btn">
<view class="sub_btn" @click="updateAdress(item)">
{{ '修改地址' }}
</view>
</view>
<!-- <view class='line_title'>变更后省/{{item.recProvinceVal}}</view>
<view class='line_title'>变更后市{{item.recCityVal}}</view>
<view class='line_title'>变更后区/{{item.recCountyVal}}</view>
<view class='line_title'>变更后详细地址{{item.recAddress}}</view>
<view class='line_title'>申请时间{{item.creationTime}}</view>
<view class='line_title'>备注{{item.remark}}</view> -->
</view>
</view>
</template>
<template v-else>
<view class="theListbox" style="background-color: #f2f2f2;">
<u-empty mode="list">
</u-empty>
</view>
</template>
<u-popup :show="rejectShow" closeable mode="center" round='10' @close="rejectShow=false">\
<view class="popview">
<view class="email_neir " @click="clickhtml(rejectContent)" v-html="rejectContent">
</view>
</view>
</u-popup>
</view>
</view>
</view>
</template>
<template v-else>
<view class="theListbox" style="background-color: #f2f2f2">
<u-empty mode="list"> </u-empty>
</view>
</template>
<u-popup
:show="rejectShow"
closeable
mode="center"
round="10"
@close="rejectShow = false"
>\
<view class="popview">
<view
class="email_neir"
@click="clickhtml(rejectContent)"
v-html="rejectContent"
>
</view>
</view>
</u-popup>
</view>
</template>
<script>
import * as sel from '@/config/selfService.js'
import {
formatMsToDate
} from '@/util/index'
export default {
data() {
return {
dataShow: false,
value1: '',
import * as sel from '@/config/selfService.js'
import { formatMsToDate } from '@/util/index'
export default {
data() {
return {
dataShow: false,
value1: '',
//
queryParams: {
pageNum: 1,
pageSize: 50,
orderCode: "",
},
orderLists: [],
timeIndex: 0,
rejectShow: false,
rejectContent: ""
}
},
watch: {
//
queryParams: {
pageNum: 1,
pageSize: 50,
orderCode: '',
},
orderLists: [],
timeIndex: 0,
rejectShow: false,
rejectContent: '',
}
},
watch: {},
onShow() {
this.getDataList()
},
methods: {
findWhy(item) {
this.rejectContent = item.rejectMsg
this.rejectShow = true
},
clickhtml(content) {
this.rejectShow = false
// handleImageClick
const parser = new DOMParser()
const doc = parser.parseFromString(content, 'text/html')
const imgElements = doc.getElementsByTagName('img')
if (imgElements.length > 0) {
const firstImageUrl = imgElements[0].src
this.handleImageClick(firstImageUrl, content)
}
},
handleImageClick(url, content) {
uni.previewImage({
urls: this.getUrls(content),
current: url,
})
},
getUrls(content) {
const parser = new DOMParser()
const doc = parser.parseFromString(content, 'text/html')
const imgElements = doc.getElementsByTagName('img')
const urls = []
for (let i = 0; i < imgElements.length; i++) {
urls.push(imgElements[i].src)
}
return urls
},
getDataList() {
// loading
uni.showLoading({
title: '加载中...',
mask: true,
})
},
onLoad() {
this.getDataList()
},
onShow() {},
methods: {
findWhy(item) {
this.rejectContent = item.rejectMsg
this.rejectShow = true
},
clickhtml(content) {
this.rejectShow = false
// handleImageClick
const parser = new DOMParser();
const doc = parser.parseFromString(content, "text/html");
const imgElements = doc.getElementsByTagName("img");
if (imgElements.length > 0) {
const firstImageUrl = imgElements[0].src;
this.handleImageClick(firstImageUrl, content);
}
},
handleImageClick(url, content) {
uni.previewImage({
urls: this.getUrls(content),
current: url
});
},
getUrls(content) {
const parser = new DOMParser();
const doc = parser.parseFromString(content, "text/html");
const imgElements = doc.getElementsByTagName("img");
const urls = [];
for (let i = 0; i < imgElements.length; i++) {
urls.push(imgElements[i].src);
}
return urls;
},
getDataList() {
sel
.getOderSelfList(this.queryParams)
.then((res) => {
this.orderLists = res.rows
})
},
updateAdress(item) {
let params = item
console.log('%c [ params ]-144', 'font-size:13px; background:#f37aa1; color:#ffbee5;', params)
// let queryString = Object.keys(params).map(key =>
// `${encodeURIComponent(key)}=${encodeURIComponent(params[key])}`).join('&')
// let paramsString = encodeURIComponent(JSON.stringify(params))
sel
.getOderSelfList(this.queryParams)
.then(res => {
this.orderLists = res.rows
})
.catch(err => {
console.error('获取订单列表失败:', err)
//
uni.showToast({
title: '获取数据失败',
icon: 'none',
})
})
.finally(() => {
// loading
uni.hideLoading()
})
},
updateAdress(item) {
let params = item
console.log(
'%c [ params ]-144',
'font-size:13px; background:#f37aa1; color:#ffbee5;',
params
)
// let queryString = Object.keys(params).map(key =>
// `${encodeURIComponent(key)}=${encodeURIComponent(params[key])}`).join('&')
// let paramsString = encodeURIComponent(JSON.stringify(params))
uni.navigateTo({
url: '/pages/selfService/updateAdress/addAdress?obj=' + JSON.stringify(params),
})
}
},
}
uni.navigateTo({
url:
'/pages/selfService/updateAdress/addAdress?obj=' +
JSON.stringify(params),
})
},
},
}
</script>
<style lang="scss" scoped>
::v-deep img {
max-width: 100%;
height: auto;
}
.popview {
padding: 24rpx;
width: 620rpx;
.email_neir {
font-size: 24rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #666666;
}
}
::v-deep img {
max-width: 100%;
height: auto;
}
.popview {
padding: 24rpx;
width: 620rpx;
.email_neir {
font-size: 24rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #666666;
}
}
.con_top {
position: fixed;
background: #fff;
width: 100%;
z-index: 10;
}
.seach {
background: #fff;
overflow: hidden;
height: 100rpx;
padding: 0 20rpx;
display: flex;
justify-content: space-between;
align-items: center;
position: relative;
border-bottom: 2rpx solid #eee;
.con_top {
position: fixed;
background: #fff;
width: 100%;
z-index: 10;
}
.seach_i {
padding: 0 20rpx;
border-radius: 34rpx;
background: #fff;
flex: 1;
background: #f5f6f8;
// margin-right: 40rpx;
}
.seach {
background: #fff;
overflow: hidden;
height: 100rpx;
padding: 0 20rpx;
display: flex;
justify-content: space-between;
align-items: center;
position: relative;
border-bottom: 2rpx solid #eee;
.seatch_r {
background: #005bac;
border-radius: 50%;
padding: 8rpx;
margin-left: 24rpx;
}
}
.seach_i {
padding: 0 20rpx;
border-radius: 34rpx;
background: #fff;
flex: 1;
background: #f5f6f8;
// margin-right: 40rpx;
}
.theListbox {
padding-top: 90rpx;
.seatch_r {
background: #005BAC;
border-radius: 50%;
padding: 8rpx;
margin-left: 24rpx;
}
}
.orderList_i {
background-color: #ffffff;
padding: 22rpx;
margin-top: 22rpx;
.theListbox {
padding-top: 90rpx;
.list_flex {
display: flex;
align-items: center;
justify-content: space-between;
.top_flex {
display: flex;
align-items: center;
.orderList_i {
background-color: #FFFFFF;
padding: 22rpx;
margin-top: 22rpx;
.zc_btn {
display: flex;
align-items: center;
justify-content: center;
background: #3d3d3d;
color: #ffffff;
border-radius: 30rpx;
padding: 7rpx 23rpx;
margin-right: 8rpx;
font-size: 20rpx;
font-family: Source Han Sans CN;
font-weight: 400;
}
.list_flex {
display: flex;
align-items: center;
justify-content: space-between;
.code_text {
font-size: 24rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #999999;
}
}
.top_flex {
display: flex;
align-items: center;
.top_status {
font-size: 24rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #69a35b;
}
.zc_btn {
display: flex;
align-items: center;
justify-content: center;
background: #3D3D3D;
color: #FFFFFF;
border-radius: 30rpx;
padding: 7rpx 23rpx;
margin-right: 8rpx;
font-size: 20rpx;
font-family: Source Han Sans CN;
font-weight: 400;
}
.center_left {
display: flex;
align-items: center;
.code_text {
font-size: 24rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #999999;
}
}
.center_img {
width: 124rpx;
height: 124rpx;
border-radius: 15rpx;
margin-right: 20rpx;
}
.top_status {
font-size: 24rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #69A35B;
}
.center_title {
font-size: 28rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #333333;
}
}
.center_left {
display: flex;
align-items: center;
.center_right {
.center_price {
font-size: 32rpx;
font-family: Source Han Sans CN;
font-weight: bold;
color: #f82c1a;
}
.center_img {
width: 124rpx;
height: 124rpx;
border-radius: 15rpx;
margin-right: 20rpx;
}
.center_num {
text-align: right;
font-size: 22rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #666666;
}
}
}
.center_title {
font-size: 28rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #333333;
}
}
.center_price {
font-size: 32rpx;
font-family: Source Han Sans CN;
font-weight: bold;
color: #f82c1a;
margin-top: 20rpx;
}
.center_right {
.center_price {
font-size: 32rpx;
font-family: Source Han Sans CN;
font-weight: bold;
color: #f82c1a;
}
.btm_time {
padding: 20rpx 0;
font-size: 24rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #999999;
border-bottom: 1rpx solid #eeeeee;
}
.center_num {
text-align: right;
font-size: 22rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #666666;
}
}
.list_btn {
margin-top: 20rpx;
display: flex;
justify-content: flex-end;
align-items: center;
}
.sub_btn {
display: flex;
align-items: center;
justify-content: center;
border-radius: 30rpx;
background: #005bac;
color: #ffffff;
padding: 15rpx 28rpx;
font-size: 24rpx;
font-family: Source Han Sans CN;
font-weight: 400;
}
}
.list_top {
// background-color: pink;
padding: 30rpx 0;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 24rpx;
font-weight: 400;
color: #333333;
border-bottom: 2rpx solid #eeeeee;
}
.center_price {
font-size: 32rpx;
font-family: Source Han Sans CN;
font-weight: bold;
color: #f82c1a;
margin-top: 20rpx;
}
.btm_time {
padding: 20rpx 0;
font-size: 24rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #999999;
border-bottom: 1rpx solid #EEEEEE;
}
.list_btn {
margin-top: 20rpx;
display: flex;
justify-content: flex-end;
align-items: center;
.sub_btn {
display: flex;
align-items: center;
justify-content: center;
border-radius: 30rpx;
background: #005BAC;
color: #ffffff;
padding: 15rpx 28rpx;
font-size: 24rpx;
font-family: Source Han Sans CN;
font-weight: 400;
}
}
.list_top {
// background-color: pink;
padding: 30rpx 0;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 24rpx;
font-weight: 400;
color: #333333;
border-bottom: 2rpx solid #eeeeee;
}
.line_title {
font-size: 24rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #999999;
margin: 18rpx 0;
}
}
}
</style>
.line_title {
font-size: 24rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #999999;
margin: 18rpx 0;
}
}
}
</style>

File diff suppressed because it is too large Load Diff

View File

@ -1,308 +1,316 @@
<template>
<view class="content">
<view class="tab">
<view v-for="(item, index) in tabList" :key="index" @click="isTab = item.value" class="tab_i"
:class="[isTab===item.value?'heng':'heng1']">
{{ item.label }}
</view>
</view>
<view class="content">
<!-- <view class="tab">
<view
v-for="(item, index) in tabList"
:key="index"
@click="isTab = item.value"
class="tab_i"
:class="[isTab === item.value ? 'heng' : 'heng1']"
>
{{ item.label }}
</view>
</view> -->
<template v-if="tableData.length>0">
<view class="thecontent" v-for='(item,index) in tableData' :key="index">
<view class="line_box">
<view class='line1'>{{'会员编号'}}</view>
<view class='line2'>{{item.memberCode}}</view>
</view>
<view class="line_box">
<view class='line1'>{{'变更前会员姓名'}}</view>
<view class='line2'>{{item.memberName}}</view>
</view>
<view class="line_box">
<view class='line1'>{{'变更前联系方式'}}</view>
<view class='line2'>{{item.phone}}</view>
</view>
<view class="line_box bgrightBox" v-if="queryParams.assessType==0">
<view class="">
</view>
<view class="">
<u-button shape="circle" color="#005BAC" size="small" :text="'申请变更'"
@click="updateDomicile(item)"></u-button>
</view>
</view>
<template v-if="queryParams.assessType==1">
<view class="line_box">
<view class='line1'>{{'变更后会员姓名'}}</view>
<view class='line3'>{{item.changeMemberName}}</view>
</view>
<view class="line_box">
<view class='line1'>{{'变更后联系方式'}}</view>
<view class='line3'>{{item.changePhone}}</view>
</view>
<view class="line_box">
<template v-if="tableData.length > 0">
<view class="thecontent" v-for="(item, index) in tableData" :key="index">
<view class="line_box">
<view class="line1">{{ '会员编号' }}</view>
<view class="line2">{{ item.memberCode }}</view>
</view>
<view class="line_box">
<view class="line1">{{ '变更前会员姓名' }}</view>
<view class="line2">{{ item.memberName }}</view>
</view>
<view class="line_box">
<view class="line1">{{ '变更前联系方式' }}</view>
<view class="line2">{{ item.phone }}</view>
</view>
<view class="line_box bgrightBox" v-if="queryParams.assessType == 0">
<view class=""> </view>
<view class="">
<u-button
shape="circle"
color="#005BAC"
size="small"
:text="'申请变更'"
@click="updateDomicile(item)"
></u-button>
</view>
</view>
<template v-if="queryParams.assessType == 1">
<view class="line_box">
<view class="line1">{{ '变更后会员姓名' }}</view>
<view class="line3">{{ item.changeMemberName }}</view>
</view>
<view class="line_box">
<view class="line1">{{ '变更后联系方式' }}</view>
<view class="line3">{{ item.changePhone }}</view>
</view>
<!-- <view class="line_box">
<view class='line1'>{{'业务扣费'}}(¥)</view>
<view class='line3'>{{item.amount}}</view>
</view>
<view class="line_box">
<view class='line1'>{{'申请时间'}}</view>
<view class='line3'>{{item.creationTime}}</view>
</view>
<view class="line_box">
<view class='line1'>{{'审核时间'}}</view>
<view class='line3'>{{item.approveTime}}</view>
</view>
<view class="line_box">
<view class='line1'>{{'审核状态'}}</view>
<view class='line3'>{{item.approveStatusVal}}</view>
</view>
<view class="line_box">
<view class='line1'>{{'备注'}}</view>
<view class='line3'>{{item.remark}}</view>
</view>
<view class="list_btn" v-if="item.approveStatus==3">
<view class="sub_btn" @click="findWhy(item)">
{{'驳回原因'}}
</view>
</view>
</template>
</view>
</template>
<u-empty v-else mode="list" icon="http://cdn.uviewui.com/uview/empty/list.png">
</u-empty>
<u-popup :show="rejectShow" closeable mode="center" round='10' @close="rejectShow=false">\
<view class="popview">
<view class="email_neir " @click="clickhtml(rejectContent)" v-html="rejectContent">
</view>
</view>
</u-popup>
</view>
</view> -->
<view class="line_box">
<view class="line1">{{ '申请时间' }}</view>
<view class="line3">{{ item.creationTime }}</view>
</view>
<!-- <view class="line_box">
<view class="line1">{{ '审核时间' }}</view>
<view class="line3">{{ item.approveTime }}</view>
</view>
<view class="line_box">
<view class="line1">{{ '审核状态' }}</view>
<view class="line3">{{ item.approveStatusVal }}</view>
</view> -->
<view class="line_box">
<view class="line1">{{ '备注' }}</view>
<view class="line3">{{ item.remark }}</view>
</view>
<!-- <view class="list_btn" v-if="item.approveStatus == 3">
<view class="sub_btn" @click="findWhy(item)">
{{ '驳回原因' }}
</view>
</view> -->
</template>
</view>
</template>
<u-empty
v-else
mode="list"
icon="http://cdn.uviewui.com/uview/empty/list.png"
>
</u-empty>
<u-popup
:show="rejectShow"
closeable
mode="center"
round="10"
@close="rejectShow = false"
>\
<view class="popview">
<view
class="email_neir"
@click="clickhtml(rejectContent)"
v-html="rejectContent"
>
</view>
</view>
</u-popup>
</view>
</template>
<script>
import * as sel from "@/config/selfService.js"
export default {
data() {
return {
tabList: [{
value: 0,
label: '可申请信息'
}, {
value: 1,
label: '已申请信息'
}],
isTab: 0,
queryParams: {
assessType: 0,
},
tableData: [],
rejectShow: false,
rejectContent: ""
import * as sel from '@/config/selfService.js'
export default {
data() {
return {
tabList: [
{
value: 0,
label: '可变更信息',
},
{
value: 1,
label: '变更记录',
},
],
isTab: 0,
queryParams: {
assessType: 0,
},
tableData: [],
rejectShow: false,
rejectContent: '',
}
},
watch: {
isTab(n, o) {
this.queryParams.assessType = n
this.getDataList()
},
},
onLoad() {
this.getDataList()
},
methods: {
findWhy(item) {
this.rejectContent = item.rejectMsg
this.rejectShow = true
},
clickhtml(content) {
this.rejectShow = false
// handleImageClick
const parser = new DOMParser()
const doc = parser.parseFromString(content, 'text/html')
const imgElements = doc.getElementsByTagName('img')
if (imgElements.length > 0) {
const firstImageUrl = imgElements[0].src
this.handleImageClick(firstImageUrl, content)
}
},
handleImageClick(url, content) {
uni.previewImage({
urls: this.getUrls(content),
current: url,
})
},
getUrls(content) {
const parser = new DOMParser()
const doc = parser.parseFromString(content, 'text/html')
const imgElements = doc.getElementsByTagName('img')
const urls = []
for (let i = 0; i < imgElements.length; i++) {
urls.push(imgElements[i].src)
}
return urls
},
updateDomicile(item) {
if (this.queryParams.assessType == 0) {
item.assessType = this.queryParams.assessType
let params = item
let queryString = Object.keys(params)
.map(
key =>
`${encodeURIComponent(key)}=${encodeURIComponent(params[key])}`
)
.join('&')
// let paramsString = encodeURIComponent(JSON.stringify(params))
}
},
watch: {
isTab(n, o) {
this.queryParams.assessType = n
this.getDataList()
},
},
onLoad() {
uni.redirectTo({
url: '/pages/selfService/updateDomicile/addDomicile?' + queryString,
})
}
},
this.getDataList()
},
methods: {
findWhy(item) {
this.rejectContent = item.rejectMsg
this.rejectShow = true
},
clickhtml(content) {
this.rejectShow = false
// handleImageClick
const parser = new DOMParser();
const doc = parser.parseFromString(content, "text/html");
const imgElements = doc.getElementsByTagName("img");
if (imgElements.length > 0) {
const firstImageUrl = imgElements[0].src;
this.handleImageClick(firstImageUrl, content);
}
},
handleImageClick(url, content) {
uni.previewImage({
urls: this.getUrls(content),
current: url
});
},
getUrls(content) {
const parser = new DOMParser();
const doc = parser.parseFromString(content, "text/html");
const imgElements = doc.getElementsByTagName("img");
const urls = [];
for (let i = 0; i < imgElements.length; i++) {
urls.push(imgElements[i].src);
}
return urls;
},
updateDomicile(item) {
if (this.queryParams.assessType == 0) {
item.assessType = this.queryParams.assessType
let params = item
let queryString = Object.keys(params).map(key =>
`${encodeURIComponent(key)}=${encodeURIComponent(params[key])}`).join('&')
// let paramsString = encodeURIComponent(JSON.stringify(params))
uni.navigateTo({
url: '/pages/selfService/updateDomicile/addDomicile?' + queryString,
})
}
},
getDataList() {
if (this.queryParams.assessType == 0) {
//
sel.getApplicationInfoList(this.queryParams).then(res => {
this.tableData = [res.data]
})
} else if (this.queryParams.assessType == 1) {
//
sel.getAppliedInfoList(this.queryParams).then(res => {
this.tableData = res.data
})
}
}
}
}
getDataList() {
if (this.queryParams.assessType == 0) {
//
sel.getApplicationInfoList(this.queryParams).then(res => {
this.tableData = [res.data]
})
} else if (this.queryParams.assessType == 1) {
//
sel.getAppliedInfoList(this.queryParams).then(res => {
this.tableData = res.data
})
}
},
},
}
</script>
<style lang="scss" scoped>
::v-deep img {
max-width: 100%;
height: auto;
}
.popview {
padding: 24rpx;
width: 620rpx;
.email_neir {
font-size: 24rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #666666;
}
}
.list_btn {
border-top: 1rpx solid #EEEEEE;
margin-top: 20rpx;
display: flex;
justify-content: flex-end;
align-items: center;
padding-top: 20rpx;
.sub_btn {
display: flex;
align-items: center;
justify-content: center;
border-radius: 30rpx;
background: #005BAC;
color: #ffffff;
padding: 15rpx 28rpx;
font-size: 24rpx;
font-family: Source Han Sans CN;
font-weight: 400;
}
}
.content {
background: #F2F2F2;
padding-bottom: 20rpx;
::v-deep img {
max-width: 100%;
height: auto;
}
.popview {
padding: 24rpx;
width: 620rpx;
.email_neir {
font-size: 24rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #666666;
}
}
.list_btn {
border-top: 1rpx solid #eeeeee;
margin-top: 20rpx;
display: flex;
justify-content: flex-end;
align-items: center;
padding-top: 20rpx;
.sub_btn {
display: flex;
align-items: center;
justify-content: center;
border-radius: 30rpx;
background: #005bac;
color: #ffffff;
padding: 15rpx 28rpx;
font-size: 24rpx;
font-family: Source Han Sans CN;
font-weight: 400;
}
}
.content {
background: #f2f2f2;
padding-bottom: 20rpx;
.tab {
display: flex;
align-items: center;
justify-content: space-around;
margin-bottom: 6rpx;
background-color: #FFFFFF;
.tab {
display: flex;
align-items: center;
justify-content: space-around;
margin-bottom: 6rpx;
background-color: #ffffff;
.tab_i {
text-align: center;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: #333333;
white-space: nowrap;
display: flex;
flex-direction: column;
align-items: center;
padding: 24rpx 0;
// background-color: pink;
.tab_i {
text-align: center;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: #333333;
white-space: nowrap;
display: flex;
flex-direction: column;
align-items: center;
padding: 24rpx 0;
// background-color: pink;
}
}
.heng {
border-bottom: 6rpx solid #005bac;
color: #005bac;
}
.heng {
border-bottom: 6rpx solid #005BAC;
color: #005BAC;
.heng {
color: #333333;
}
}
}
.thecontent {
background-color: #ffffff;
// margin-bottom: 21rpx;
margin-top: 20rpx;
padding: 10rpx 23rpx 30rpx 23rpx;
.heng {
color: #333333;
}
.line_box {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 20rpx;
}
.line1 {
font-size: 26rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #999999;
}
.line2 {
font-size: 26rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #333333;
}
.line3 {
font-size: 26rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: rgba(251, 48, 36, 1);
}
}
.thecontent {
background-color: #FFFFFF;
// margin-bottom: 21rpx;
margin-top: 20rpx;
padding: 10rpx 23rpx 30rpx 23rpx;
.line_box {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 20rpx;
.line1 {
font-size: 26rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #999999;
}
.line2 {
font-size: 26rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #333333;
}
.line3 {
font-size: 26rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: rgba(251, 48, 36, 1);
}
}
.bgrightBox {
margin-top: 20rpx;
padding-top: 20rpx;
display: flex;
justify-content: flex-end;
border-top: 1rpx solid #eeeeee;
}
}
}
</style>
.bgrightBox {
margin-top: 20rpx;
padding-top: 20rpx;
display: flex;
justify-content: flex-end;
border-top: 1rpx solid #eeeeee;
}
}
}
</style>

View File

@ -682,12 +682,17 @@ export default {
],
storePhone: [
{
required: true,
message: '请输入',
trigger: 'blur',
},
{ min: 11, message: '请输入正确的手机号',trigger: 'blur', },
required: true,
message: '请输入手机号',
trigger: ['blur'],
},
{
validator: (rule, value, callback) => {
return this.$u.test.mobile(value)
},
message: '手机号格式不正确',
trigger: ['blur'],
},
],
storeSign: [
{ required: true, message: " ", trigger: "blur" },

View File

@ -215,13 +215,13 @@ export default {
message: '请输入手机号',
trigger: ['blur'],
},
// {
// validator: (rule, value, callback) => {
// return this.$u.test.mobile(value);
// },
// message: "",
// trigger: ["blur"],
// },
{
validator: (rule, value, callback) => {
return this.$u.test.mobile(value);
},
message: "手机号格式不正确",
trigger: ["blur"],
},
],
},
allData: [],

View File

@ -9,7 +9,7 @@ function email(value) {
* 验证手机格式
*/
function mobile(value) {
return /^1([3589]\d|4[5-9]|6[1-2,4-7]|7[0-8])\d{8}$/.test(value)
return /^1\d{10}$/.test(value)
}
/**