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

This commit is contained in:
woody 2025-05-26 11:14:34 +08:00
commit 5ea0fb6f37
2 changed files with 453 additions and 456 deletions

View File

@ -4,52 +4,62 @@
<!-- <view class="top_text"> <!-- <view class="top_text">
{{'注:修改地址后,若涉及运费问题,系统将自动扣除请在原订单基础上填写新的收货人信息'}} {{'注:修改地址后,若涉及运费问题,系统将自动扣除请在原订单基础上填写新的收货人信息'}}
</view> --> </view> -->
<u-form :model="addressForm" <u-form :model="addressForm" labelWidth="auto" ref="uForm">
labelWidth="auto"
ref="uForm">
<view class="view-class"> <view class="view-class">
<u-form-item :label="'订单编号'" <u-form-item
:label="'订单编号'"
label-width="150rpx" label-width="150rpx"
prop="orderCode"> prop="orderCode"
<u--input v-model="addressForm.orderCode" >
<u--input
v-model="addressForm.orderCode"
disabled disabled
disabledColor="#ffffff" disabledColor="#ffffff"
placeholder="请选择" placeholder="请选择"
border="none"></u--input> border="none"
></u--input>
</u-form-item> </u-form-item>
</view> </view>
<view class="view-class"> <view class="view-class">
<u-form-item :label="'收货人'" <u-form-item :label="'收货人'" label-width="150rpx" prop="newRecName">
label-width="150rpx" <u-input
prop="newRecName"> v-model="addressForm.newRecName"
<u-input v-model="addressForm.newRecName"
placeholder-class="place-class" placeholder-class="place-class"
class="border-color" class="border-color"
:placeholder="'请输入'" /> :placeholder="'请输入'"
/>
</u-form-item> </u-form-item>
</view> </view>
<view class="view-class"> <view class="view-class">
<u-form-item :label="'联系方式'" <u-form-item
:label="'联系方式'"
label-width="150rpx" label-width="150rpx"
prop="newRecPhone"> prop="newRecPhone"
<u-input v-model="addressForm.newRecPhone" >
<u-input
v-model="addressForm.newRecPhone"
placeholder-class="place-class" placeholder-class="place-class"
:maxlength="userInfo.pkSettleCountry == 1 ? 11 : 20" :maxlength="userInfo.pkSettleCountry == 1 ? 11 : 20"
class="border-color" class="border-color"
:placeholder="'请输入'" /> :placeholder="'请输入'"
/>
</u-form-item> </u-form-item>
</view> </view>
<view class="view-class" <view class="view-class" @click="getDiqu">
@click="getDiqu"> <u-form-item :label="'收货地址'" label-width="150rpx" prop="address">
<u-form-item :label="'收货地址'" <view
label-width="150rpx" v-if="address"
prop="address"> style="font-size: 28rpx; color: #333; margin-left: 20rpx"
<view v-if="address" >{{ address }}</view
style="font-size: 28rpx;color: #333;margin-left: 20rpx;">{{address}}</view> >
<view style="margin-left: 20rpx;font-size: 28rpx;color: rgb(192, 196, 204);" <view
v-else>请选择收货地址 style="
margin-left: 20rpx;
font-size: 28rpx;
color: rgb(192, 196, 204);
"
v-else
>请选择收货地址
</view> </view>
</u-form-item> </u-form-item>
<view class="drop"> <view class="drop">
@ -57,106 +67,81 @@
</view> </view>
</view> </view>
<view class="view-class"> <view class="view-class">
<u-form-item :label="'详细地址'" <u-form-item
:label="'详细地址'"
class="label-style" class="label-style"
label-width="150rpx" label-width="150rpx"
prop="newRecAddress"> prop="newRecAddress"
<u-textarea v-model="addressForm.newRecAddress" >
<u-textarea
v-model="addressForm.newRecAddress"
placeholder-class="place-class" placeholder-class="place-class"
maxlength="200" maxlength="200"
class="border-color" class="border-color"
:placeholder="'请输入详细地址'" /> :placeholder="'请输入详细地址'"
/>
</u-form-item> </u-form-item>
<view class="lis_address" <view class="lis_address" v-if="addressList.length > 0">
v-if="addressList.length>0">
<view class="lis_title">{{ '历史地址' }}</view> <view class="lis_title">{{ '历史地址' }}</view>
<view class=""> <view class="">
<u-radio-group @change="groupChange" <u-radio-group
@change="groupChange"
placement="column" placement="column"
v-model="choiceValue" v-model="choiceValue"
iconPlacement="left"> iconPlacement="left"
<div v-for="(item, index) in addressList" >
<div
v-for="(item, index) in addressList"
:key="index" :key="index"
class="custom-radio-label"> class="custom-radio-label"
<u-radio :name="item.pkId" >
activeColor="#005BAC"></u-radio> <u-radio :name="item.pkId" activeColor="#005BAC"></u-radio>
<div class="custom-label-content"> <div class="custom-label-content">
<view class="label_name">{{ item.recName }}</view> <view class="label_name">{{ item.recName }}</view>
<view class="label_phone">{{ item.recPhone }}</view> <view class="label_phone">{{ item.recPhone }}</view>
<view class="label_address">{{ item.recArea }}</view> <view class="label_address">{{ item.recArea }}</view>
</div> </div>
</div> </div>
</u-radio-group> </u-radio-group>
</view> </view>
</view> </view>
</view> </view>
<view class="view-class"> <view class="view-class">
<u-form-item :label="'邮费扣除'" <u-form-item
:label="'邮费扣除'"
label-width="150rpx" label-width="150rpx"
prop="newPostage"> prop="newPostage"
<u--input v-model="addressForm.newPostage" >
<u--input
v-model="addressForm.newPostage"
disabled disabled
disabledColor="#ffffff" disabledColor="#ffffff"
placeholder="" placeholder=""
border="none"></u--input> border="none"
></u--input>
</u-form-item> </u-form-item>
</view> </view>
<view class="view-class"> <view class="view-class">
<u-form-item :label="'备注'" <u-form-item :label="'备注'" label-width="150rpx" prop="selfRemark">
label-width="150rpx" <u-input
prop="selfRemark"> v-model="addressForm.selfRemark"
<u-input v-model="addressForm.selfRemark"
placeholder-class="place-class" placeholder-class="place-class"
class="border-color" class="border-color"
:placeholder="'请输入'" /> :placeholder="'请输入'"
/>
</u-form-item> </u-form-item>
</view> </view>
</u-form> </u-form>
</view> </view>
<v-address ref="address" <v-address
ref="address"
@getAddressData="AddressData" @getAddressData="AddressData"
:defaultCode="defaultCode" :defaultCode="defaultCode"
@addressData="addressData"></v-address> @addressData="addressData"
<u-button type="success" ></v-address>
shape="circle" <u-button type="success" shape="circle" class="btn" @click="submit">{{
class="btn" '确定'
@click="submit">{{'确定'}}</u-button> }}</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>
</view> </view>
</template> </template>
@ -261,7 +246,7 @@ export default {
}, },
methods: { methods: {
groupChange(value) { groupChange(value) {
this.addressList.forEach((ele) => { this.addressList.forEach(ele => {
if (value == ele.pkId) { if (value == ele.pkId) {
this.$set(this.addressForm, 'newRecName', ele.recName) this.$set(this.addressForm, 'newRecName', ele.recName)
this.$set(this.addressForm, 'newRecPhone', ele.recPhone) this.$set(this.addressForm, 'newRecPhone', ele.recPhone)
@ -290,13 +275,13 @@ export default {
tranType: this.addressForm.tranType, tranType: this.addressForm.tranType,
orderItemsParams: this.addressForm.orderItemsParams, orderItemsParams: this.addressForm.orderItemsParams,
} }
sel.queryAdressPostage(postageData).then((res) => { sel.queryAdressPostage(postageData).then(res => {
this.$set(this.addressForm, 'newPostage', res.data.postage) this.$set(this.addressForm, 'newPostage', res.data.postage)
this.$forceUpdate() this.$forceUpdate()
}) })
}, },
getAddressList() { getAddressList() {
sel.addressList({}).then((res) => { sel.addressList({}).then(res => {
this.addressList = res.data this.addressList = res.data
}) })
}, },
@ -304,17 +289,20 @@ export default {
this.address = name this.address = name
}, },
submit() { submit() {
this.$refs.uForm.validate().then((res) => { this.$refs.uForm.validate().then(res => {
sel.saveSelfAddress(this.addressForm).then((res) => { sel.saveSelfAddress(this.addressForm).then(res => {
if (res.code == '200') { if (res.code == '200') {
// uni.showToast({ uni.showToast({
// title: res.msg, title: '修改成功',
// icon: 'none', icon: 'none',
// success() { success() {
setTimeout(() => {
uni.navigateBack()
}, 600)
},
})
// } // this.successShow = true
// })
this.successShow = true
} }
}) })
}) })
@ -438,7 +426,7 @@ export default {
font-size: 28rpx; font-size: 28rpx;
font-family: Source Han Sans CN; font-family: Source Han Sans CN;
font-weight: 400; font-weight: 400;
color: #005BAC; color: #005bac;
} }
} }
@ -482,7 +470,7 @@ page {
} }
.btn { .btn {
background-color: #005BAC; background-color: #005bac;
border: none; border: none;
height: 92rpx; height: 92rpx;
line-height: 92rpx; line-height: 92rpx;
@ -528,7 +516,7 @@ page {
} }
.poupBtn { .poupBtn {
background: #005BAC; background: #005bac;
border-radius: 39rpx; border-radius: 39rpx;
padding: 26rpx 0; padding: 26rpx 0;
display: flex; display: flex;

View File

@ -3,9 +3,14 @@
<view class="con_top"> <view class="con_top">
<view class="seach"> <view class="seach">
<view class="seach_i"> <view class="seach_i">
<u--input prefixIcon="search" v-model="queryParams.orderCode" <u--input
prefixIconStyle="font-size: 22px;color: #909399;height:32px" border="none" placeholder="请输入订单编号" prefixIcon="search"
suffixIconStyle="color: #909399"></u--input> v-model="queryParams.orderCode"
prefixIconStyle="font-size: 22px;color: #909399;height:32px"
border="none"
placeholder="请输入订单编号"
suffixIconStyle="color: #909399"
></u--input>
</view> </view>
<view class="seatch_r" @click="getDataList"> <view class="seatch_r" @click="getDataList">
<u-icon name="search" size="22" color="#fff"></u-icon> <u-icon name="search" size="22" color="#fff"></u-icon>
@ -18,7 +23,9 @@
<view class="list_flex"> <view class="list_flex">
<view class="top_flex"> <view class="top_flex">
<view class="zc_btn">{{ item.orderTypeVal }}</view> <view class="zc_btn">{{ item.orderTypeVal }}</view>
<view class="code_text">{{'订单编号'}}{{item.orderCode}}</view> <view class="code_text"
>{{ '订单编号' }}{{ item.orderCode }}</view
>
</view> </view>
<view class="top_status"> <view class="top_status">
{{ item.orderStatusVal }} {{ item.orderStatusVal }}
@ -27,14 +34,20 @@
<view class="list_flex"> <view class="list_flex">
<view class="center_price">{{ item.orderAmount }}</view> <view class="center_price">{{ item.orderAmount }}</view>
</view> </view>
<view class="list_flex" style="margin-top: 10rpx;"> <!-- <view class="list_flex" style="margin-top: 10rpx">
<view class="top_flex"> <view class="top_flex">
<view class="code_text">{{'审核状态'}}{{item.approveStatusVal}}</view> <view class="code_text"
>{{ '审核状态' }}{{ item.approveStatusVal }}</view
>
</view> </view>
<view v-if="item.approveStatus==3" class="top_status" @click="findWhy(item)"> <view
v-if="item.approveStatus == 3"
class="top_status"
@click="findWhy(item)"
>
{{ '驳回原因' }} {{ '驳回原因' }}
</view> </view>
</view> </view> -->
<view class="btm_time"> <view class="btm_time">
{{ '创建时间' }}:{{ item.creationTime }} {{ '创建时间' }}:{{ item.creationTime }}
</view> </view>
@ -54,27 +67,32 @@
</view> </view>
</template> </template>
<template v-else> <template v-else>
<view class="theListbox" style="background-color: #f2f2f2;"> <view class="theListbox" style="background-color: #f2f2f2">
<u-empty mode="list"> <u-empty mode="list"> </u-empty>
</u-empty>
</view> </view>
</template> </template>
<u-popup :show="rejectShow" closeable mode="center" round='10' @close="rejectShow=false">\ <u-popup
:show="rejectShow"
closeable
mode="center"
round="10"
@close="rejectShow = false"
>\
<view class="popview"> <view class="popview">
<view class="email_neir " @click="clickhtml(rejectContent)" v-html="rejectContent"> <view
class="email_neir"
@click="clickhtml(rejectContent)"
v-html="rejectContent"
>
</view> </view>
</view> </view>
</u-popup> </u-popup>
</view> </view>
</template> </template>
<script> <script>
import * as sel from '@/config/selfService.js' import * as sel from '@/config/selfService.js'
import { import { formatMsToDate } from '@/util/index'
formatMsToDate
} from '@/util/index'
export default { export default {
data() { data() {
return { return {
@ -85,17 +103,15 @@
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 50, pageSize: 50,
orderCode: "", orderCode: '',
}, },
orderLists: [], orderLists: [],
timeIndex: 0, timeIndex: 0,
rejectShow: false, rejectShow: false,
rejectContent: "" rejectContent: '',
} }
}, },
watch: { watch: {},
},
onLoad() { onLoad() {
this.getDataList() this.getDataList()
}, },
@ -108,55 +124,57 @@
clickhtml(content) { clickhtml(content) {
this.rejectShow = false this.rejectShow = false
// handleImageClick // handleImageClick
const parser = new DOMParser(); const parser = new DOMParser()
const doc = parser.parseFromString(content, "text/html"); const doc = parser.parseFromString(content, 'text/html')
const imgElements = doc.getElementsByTagName("img"); const imgElements = doc.getElementsByTagName('img')
if (imgElements.length > 0) { if (imgElements.length > 0) {
const firstImageUrl = imgElements[0].src; const firstImageUrl = imgElements[0].src
this.handleImageClick(firstImageUrl, content); this.handleImageClick(firstImageUrl, content)
} }
}, },
handleImageClick(url, content) { handleImageClick(url, content) {
uni.previewImage({ uni.previewImage({
urls: this.getUrls(content), urls: this.getUrls(content),
current: url current: url,
}); })
}, },
getUrls(content) { getUrls(content) {
const parser = new DOMParser(); const parser = new DOMParser()
const doc = parser.parseFromString(content, "text/html"); const doc = parser.parseFromString(content, 'text/html')
const imgElements = doc.getElementsByTagName("img"); const imgElements = doc.getElementsByTagName('img')
const urls = []; const urls = []
for (let i = 0; i < imgElements.length; i++) { for (let i = 0; i < imgElements.length; i++) {
urls.push(imgElements[i].src); urls.push(imgElements[i].src)
} }
return urls; return urls
}, },
getDataList() { getDataList() {
sel sel.getOderSelfList(this.queryParams).then(res => {
.getOderSelfList(this.queryParams)
.then((res) => {
this.orderLists = res.rows this.orderLists = res.rows
}) })
}, },
updateAdress(item) { updateAdress(item) {
let params = item let params = item
console.log('%c [ params ]-144', 'font-size:13px; background:#f37aa1; color:#ffbee5;', params) console.log(
'%c [ params ]-144',
'font-size:13px; background:#f37aa1; color:#ffbee5;',
params
)
// let queryString = Object.keys(params).map(key => // let queryString = Object.keys(params).map(key =>
// `${encodeURIComponent(key)}=${encodeURIComponent(params[key])}`).join('&') // `${encodeURIComponent(key)}=${encodeURIComponent(params[key])}`).join('&')
// let paramsString = encodeURIComponent(JSON.stringify(params)) // let paramsString = encodeURIComponent(JSON.stringify(params))
uni.navigateTo({ uni.navigateTo({
url: '/pages/selfService/updateAdress/addAdress?obj=' + JSON.stringify(params), url:
'/pages/selfService/updateAdress/addAdress?obj=' +
JSON.stringify(params),
}) })
} },
}, },
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep img { ::v-deep img {
max-width: 100%; max-width: 100%;
height: auto; height: auto;
@ -172,8 +190,6 @@
} }
} }
.con_top { .con_top {
position: fixed; position: fixed;
background: #fff; background: #fff;
@ -202,7 +218,7 @@
} }
.seatch_r { .seatch_r {
background: #005BAC; background: #005bac;
border-radius: 50%; border-radius: 50%;
padding: 8rpx; padding: 8rpx;
margin-left: 24rpx; margin-left: 24rpx;
@ -212,9 +228,8 @@
.theListbox { .theListbox {
padding-top: 90rpx; padding-top: 90rpx;
.orderList_i { .orderList_i {
background-color: #FFFFFF; background-color: #ffffff;
padding: 22rpx; padding: 22rpx;
margin-top: 22rpx; margin-top: 22rpx;
@ -231,8 +246,8 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background: #3D3D3D; background: #3d3d3d;
color: #FFFFFF; color: #ffffff;
border-radius: 30rpx; border-radius: 30rpx;
padding: 7rpx 23rpx; padding: 7rpx 23rpx;
margin-right: 8rpx; margin-right: 8rpx;
@ -253,7 +268,7 @@
font-size: 24rpx; font-size: 24rpx;
font-family: Source Han Sans CN; font-family: Source Han Sans CN;
font-weight: 400; font-weight: 400;
color: #69A35B; color: #69a35b;
} }
.center_left { .center_left {
@ -291,11 +306,8 @@
color: #666666; color: #666666;
} }
} }
} }
.center_price { .center_price {
font-size: 32rpx; font-size: 32rpx;
font-family: Source Han Sans CN; font-family: Source Han Sans CN;
@ -310,7 +322,7 @@
font-family: Source Han Sans CN; font-family: Source Han Sans CN;
font-weight: 400; font-weight: 400;
color: #999999; color: #999999;
border-bottom: 1rpx solid #EEEEEE; border-bottom: 1rpx solid #eeeeee;
} }
.list_btn { .list_btn {
@ -324,7 +336,7 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
border-radius: 30rpx; border-radius: 30rpx;
background: #005BAC; background: #005bac;
color: #ffffff; color: #ffffff;
padding: 15rpx 28rpx; padding: 15rpx 28rpx;
font-size: 24rpx; font-size: 24rpx;
@ -333,8 +345,6 @@
} }
} }
.list_top { .list_top {
// background-color: pink; // background-color: pink;
padding: 30rpx 0; padding: 30rpx 0;
@ -354,7 +364,6 @@
color: #999999; color: #999999;
margin: 18rpx 0; margin: 18rpx 0;
} }
} }
} }
</style> </style>