feat(updateAddress): 修改地址去除审核状态相关展示

This commit is contained in:
woody 2025-05-26 11:14:14 +08:00
parent 30558bbeae
commit 21d10de6e2
2 changed files with 453 additions and 456 deletions

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>
@ -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;

View File

@ -1,360 +1,369 @@
<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: {},
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))
},
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))
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;
.seach_i {
padding: 0 20rpx;
border-radius: 34rpx;
background: #fff;
flex: 1;
background: #f5f6f8;
// margin-right: 40rpx;
}
.con_top {
position: fixed;
background: #fff;
width: 100%;
z-index: 10;
}
.seatch_r {
background: #005bac;
border-radius: 50%;
padding: 8rpx;
margin-left: 24rpx;
}
}
.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;
.theListbox {
padding-top: 90rpx;
.seach_i {
padding: 0 20rpx;
border-radius: 34rpx;
background: #fff;
flex: 1;
background: #f5f6f8;
// margin-right: 40rpx;
}
.orderList_i {
background-color: #ffffff;
padding: 22rpx;
margin-top: 22rpx;
.seatch_r {
background: #005BAC;
border-radius: 50%;
padding: 8rpx;
margin-left: 24rpx;
}
}
.list_flex {
display: flex;
align-items: center;
justify-content: space-between;
.theListbox {
padding-top: 90rpx;
.top_flex {
display: flex;
align-items: center;
.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;
}
.orderList_i {
background-color: #FFFFFF;
padding: 22rpx;
margin-top: 22rpx;
.code_text {
font-size: 24rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #999999;
}
}
.list_flex {
display: flex;
align-items: center;
justify-content: space-between;
.top_status {
font-size: 24rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #69a35b;
}
.top_flex {
display: flex;
align-items: center;
.center_left {
display: flex;
align-items: center;
.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_img {
width: 124rpx;
height: 124rpx;
border-radius: 15rpx;
margin-right: 20rpx;
}
.code_text {
font-size: 24rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #999999;
}
}
.center_title {
font-size: 28rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #333333;
}
}
.top_status {
font-size: 24rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #69A35B;
}
.center_right {
.center_price {
font-size: 32rpx;
font-family: Source Han Sans CN;
font-weight: bold;
color: #f82c1a;
}
.center_left {
display: flex;
align-items: center;
.center_num {
text-align: right;
font-size: 22rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #666666;
}
}
}
.center_img {
width: 124rpx;
height: 124rpx;
border-radius: 15rpx;
margin-right: 20rpx;
}
.center_price {
font-size: 32rpx;
font-family: Source Han Sans CN;
font-weight: bold;
color: #f82c1a;
margin-top: 20rpx;
}
.center_title {
font-size: 28rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #333333;
}
}
.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_right {
.center_price {
font-size: 32rpx;
font-family: Source Han Sans CN;
font-weight: bold;
color: #f82c1a;
}
.list_btn {
margin-top: 20rpx;
display: flex;
justify-content: flex-end;
align-items: center;
.center_num {
text-align: right;
font-size: 22rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #666666;
}
}
.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;
}
}
}
.line_title {
font-size: 24rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #999999;
margin: 18rpx 0;
}
}
}
</style>