Commit 25a4877a authored by 罗超's avatar 罗超

1

parent ac1bb85f
......@@ -810,6 +810,10 @@
"path": "timeQuantum"
}, {
"path": "userManage"
}, {
"path": "modifyAddress"//修改地址
},{
"path": "sendGoods" //发货
}]
}
],
......
<template>
<u-popup :maskCloseAble="maskCloseAble" mode="bottom" :popup="false" v-model="value" length="auto"
:safeAreaInsetBottom="safeAreaInsetBottom" @close="close" z-index="999">
<view class="u-picker-header" @touchmove.stop.prevent="stop" catchtouchmove="stop">
<view class="u-btn-picker u-btn-picker--tips" hover-class="u-opacity"
:hover-stay-time="150" @tap="getResult('cancel')">取消</view>
<view class="u-btn-picker u-btn-picker--primary" hover-class="u-opacity"
:hover-stay-time="150" @touchmove.stop="" @tap.stop="getResult('confirm')">确定</view>
</view>
<view class="u-picker-body">
<picker-view :value="pickVal" @change="bindChange" class="u-picker-view">
<picker-view-column>
<view class="u-column-item" v-for="(item,index) in districtsObj.provinces" :key="index">
<view class="u-line-1">
{{item.Name}}
</view>
</view>
</picker-view-column>
<picker-view-column>
<view class="u-column-item" v-for="(item,index) in districtsObj.cities" :key="index">
<view class="u-line-1">
{{item.Name}}
</view>
</view>
</picker-view-column>
<picker-view-column>
<view class="u-column-item" v-for="(item,index) in districtsObj.areas" :key="index">
<view class="u-line-1">
{{item.Name}}
</view>
</view>
</picker-view-column>
</picker-view>
</view>
</u-popup>
</template>
<script>
import uPopup from './u-popup'
export default {
props: {
safeAreaInsetBottom: {
type: Boolean,
default: false
},
// 是否允许通过点击遮罩关闭Picker
maskCloseAble: {
type: Boolean,
default: true
},
// 通过双向绑定控制组件的弹出与收起
value: {
type: Boolean,
default: false
},
},
data() {
return {
pickVal:[0, 0, 0],
districtsObj: {
provinces: [],
cities: [],
areas: [],
},
allData:null,
province: 0,
city: 0,
area: 0
}
},
watch: {
// 如果地区发生变化,为了让picker联动起来,必须重置this.citys和this.areas
province(val) {
this.loadCities(this.districtsObj.provinces[this.province].ID);
},
city(val) {
this.loadAreas(this.districtsObj.cities[this.city].ID);
}
},
mounted() {
this.getAlllist()
},
methods: {
close() {
this.$emit('input', false);
},
getAlllist(){
this.request2(
{
url: '/api/Destination/GetAllList_V2',
data: {}
},
res => {
this.allData = res.data
this.loadDistrict()
},
);
},
async loadDistrict() {
this.loadProvinces()
},
loadProvinces() { // 加载省份
this.districtsObj.provinces = this.allData
this.loadCities()
},
loadCities() {//市
if(this.allData[this.province].Children && this.allData[this.province].Children.length>0){
this.districtsObj.cities = this.allData[this.province].Children
this.loadAreas()
}
},
loadAreas() {//区县
if(this.allData[this.province].Children[this.city]){
if(this.allData[this.province].Children[this.city].Children && this.allData[this.province].Children[this.city].Children.length>0){
this.districtsObj.areas = this.allData[this.province].Children[this.city].Children
}
}
},
bindChange(event) {
this.pickVal = event.detail.value;
let i = 0;
this.province = this.pickVal[i++];
this.city = this.pickVal[i++];
this.area = this.pickVal[i++];
},
getResult(event = null) {
let result = {
province: this.districtsObj.provinces[this.province],
city: this.districtsObj.cities[this.city],
area: this.districtsObj.areas[this.area],
}
if (event) this.$emit(event, result);
this.close();
}
},
components:{
uPopup
}
}
</script>
<style lang="scss" scoped>
.u-datetime-picker {
position: relative;
z-index: 999;
}
.u-picker-view {
height: 100%;
box-sizing: border-box;
}
.u-picker-header {
width: 100%;
height: 90rpx;
padding: 0 40rpx;
display: flex;
justify-content: space-between;
align-items: center;
box-sizing: border-box;
font-size: 32rpx;
background: #ddd;
position: relative;
}
.u-picker-header::after {
content: '';
position: absolute;
border-bottom: 1rpx solid #eaeef1;
-webkit-transform: scaleY(0.5);
transform: scaleY(0.5);
bottom: 0;
right: 0;
left: 0;
}
.u-picker-body {
width: 100%;
height: 500rpx;
overflow: hidden;
background-color: #fff;
}
.u-column-item {
display: flex;
align-items: center;
justify-content: center;
font-size: 32rpx;
padding: 0 8rpx;
}
.u-text {
font-size: 24rpx;
padding-left: 8rpx;
}
.u-btn-picker {
padding: 16rpx;
box-sizing: border-box;
text-align: center;
text-decoration: none;
}
.u-opacity {
opacity: 0.5;
}
.u-btn-picker--primary {
}
.u-btn-picker--tips {
}
</style>
<template>
<view class="u-mask" :style="[maskStyle]" :class="[show ? 'u-mask-show' : '']" @tap="click" @touchmove.stop.prevent>
<slot />
</view>
</template>
<script>
/**
* mask 遮罩
* @description 创建一个遮罩层,用于强调特定的页面元素,并阻止用户对遮罩下层的内容进行操作,一般用于弹窗场景
* @tutorial https://www.uviewui.com/components/mask.html
* @property {Boolean} show 是否显示遮罩(默认false)
* @property {String Number} z-index z-index 层级(默认1070)
* @property {Object} custom-style 自定义样式对象,见上方说明
* @property {String Number} duration 动画时长,单位毫秒(默认300)
* @property {Boolean} zoom 是否使用scale对这招进行缩放(默认true)
* @property {Boolean} mask-click-able 遮罩是否可点击,为false时点击不会发送click事件(默认true)
* @event {Function} click mask-click-able为true时,点击遮罩发送此事件
* @example <u-mask :show="show" @click="show = false"></u-mask>
*/
export default {
name: "u-mask",
props: {
// 是否显示遮罩
show: {
type: Boolean,
default: false
},
// 层级z-index
zIndex: {
type: [Number, String],
default: '1'
},
// 用户自定义样式
customStyle: {
type: Object,
default () {
return {}
}
},
// 遮罩的动画样式, 是否使用使用zoom进行scale进行缩放
zoom: {
type: Boolean,
default: true
},
// 遮罩的过渡时间,单位为ms
duration: {
type: [Number, String],
default: 300
},
// 是否可以通过点击遮罩进行关闭
maskClickAble: {
type: Boolean,
default: true
}
},
computed: {
maskStyle() {
let style = {};
style.backgroundColor = "rgba(0, 0, 0, 0.6)";
style.zIndex = this.zIndex ? this.zIndex : this.$u.zIndex.mask;
style.transition = `all ${this.duration / 1000}s ease-in-out`;
// 缩放
if (this.zoom == true) style.transform = 'scale(1.2, 1.2)';
// 判断用户传递的对象是否为空
if (Object.keys(this.customStyle).length) style = { ...style,
...this.customStyle
};
// 合并自定义的样式
//Object.assign(style, customStyle);
return style;
}
},
methods: {
click() {
if (!this.maskClickAble) return;
this.$emit('click');
}
}
}
</script>
<style lang="scss" scoped>
.u-mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
opacity: 0;
visibility: hidden;
}
.u-mask-show {
opacity: 1;
visibility: visible;
transform: scale(1);
}
</style>
<template>
<view v-if="visibleSync" :style="[customStyle]" :class="{ 'u-drawer-visible': showDrawer }" class="u-drawer">
<u-mask :maskClickAble="maskCloseAble" :show="showDrawer && mask" @click="maskClick"></u-mask>
<view class="u-drawer-content" @tap="modeCenterClose(mode)" :class="[
safeAreaInsetBottom ? 'safe-area-inset-bottom' : '',
'u-drawer-' + mode,
showDrawer ? 'u-drawer-content-visible' : '',
zoom && mode == 'center' ? 'u-animation-zoom' : ''
]"
@touchmove.stop.prevent @tap.stop.prevent :style="[style]">
<view class="u-mode-center-box" @tap.stop.prevent @touchmove.stop.prevent v-if="mode == 'center'" :style="[centerStyle]">
<slot />
</view>
<block v-else>
<slot />
</block>
</view>
</view>
</template>
<script>
/**
* popup 弹窗
* @description 弹出层容器,用于展示弹窗、信息提示等内容,支持上、下、左、右和中部弹出。组件只提供容器,内部内容由用户自定义
* @tutorial https://www.uviewui.com/components/popup.html
* @property {String} mode 弹出方向(默认left)
* @property {Boolean} mask 是否显示遮罩(默认true)
* @property {String Number} length mode=left | 见官网说明(默认auto)
* @property {Boolean} zoom 是否开启缩放动画,只在mode为center时有效(默认true)
* @property {Boolean} safe-area-inset-bottom 是否开启底部安全区适配(默认false)
* @property {Boolean} mask-close-able 点击遮罩是否可以关闭弹出层(默认true)
* @property {Object} custom-style 用户自定义样式
* @property {Number String} border-radius 弹窗圆角值(默认0)
* @property {Number String} z-index 弹出内容的z-index值(默认1075)
* @event {Function} open 弹出层打开
* @event {Function} close 弹出层收起
* @example <u-popup v-model="show"><view>出淤泥而不染,濯清涟而不妖</view></u-popup>
*/
import uMask from './u-mask'
export default {
name: 'u-popup',
props: {
/**
* 显示状态
*/
show: {
type: Boolean,
default: false
},
/**
* 弹出方向,left|right|top|bottom|center
*/
mode: {
type: String,
default: 'left'
},
/**
* 是否显示遮罩
*/
mask: {
type: Boolean,
default: true
},
// 抽屉的宽度(mode=left|right),或者高度(mode=top|bottom),单位rpx,或者"auto"
// 或者百分比"50%",表示由内容撑开高度或者宽度
length: {
type: [Number, String],
default: 'auto'
},
// 是否开启缩放动画,只在mode=center时有效
zoom: {
type: Boolean,
default: true
},
// 是否开启底部安全区适配,开启的话,会在iPhoneX机型底部添加一定的内边距
safeAreaInsetBottom: {
type: Boolean,
default: false
},
// 是否可以通过点击遮罩进行关闭
maskCloseAble: {
type: Boolean,
default: true
},
// 用户自定义样式
customStyle: {
type: Object,
default () {
return {};
}
},
value: {
type: Boolean,
default: false
},
// 此为内部参数,不在文档对外使用,为了解决Picker和keyboard等融合了弹窗的组件
// 对v-model双向绑定多层调用造成报错不能修改props值的问题
popup: {
type: Boolean,
default: true
},
// 显示显示弹窗的圆角,单位rpx
borderRadius: {
type: [Number, String],
default: 0
},
zIndex: {
type: [Number, String],
default: '100'
}
},
data() {
return {
visibleSync: false,
showDrawer: false,
timer: null,
style1: {}
};
},
computed: {
// 根据mode的位置,设定其弹窗的宽度(mode = left|right),或者高度(mode = top|bottom)
style() {
let style = {};
let translate = '100%';
// 判断是否是否百分比或者auto值,是的话,直接使用该值,否则默认为rpx单位的数值
let length = (/%$/.test(this.length) || this.length == 'auto') ? this.length : uni.upx2px(this.length) + 'px';
// 如果是左边或者上边弹出时,需要给translate设置为负值,用于隐藏
if (this.mode == 'left' || this.mode == 'top') translate = length == 'auto' ? '-100%' : '-' + length;
if (this.mode == 'left' || this.mode == 'right') {
style = {
width: length,
height: '100%',
transform: `translate3D(${translate},0px,0px)`
};
} else if (this.mode == 'top' || this.mode == 'bottom') {
style = {
width: '100%',
height: length,
transform: `translate3D(0px,${translate},0px)`
};
}
style.zIndex = this.zIndex ? this.zIndex : this.$u.zIndex.popup;
// 如果用户设置了borderRadius值,添加弹窗的圆角
if (this.borderRadius) {
switch (this.mode) {
case 'left':
style.borderRadius = `0 ${this.borderRadius}rpx ${this.borderRadius}rpx 0`;
break;
case 'top':
style.borderRadius = `0 0 ${this.borderRadius}rpx ${this.borderRadius}rpx`;
break;
case 'right':
style.borderRadius = `${this.borderRadius}rpx 0 0 ${this.borderRadius}rpx`;
break;
case 'bottom':
style.borderRadius = `${this.borderRadius}rpx ${this.borderRadius}rpx 0 0`;
break;
default:
;
}
// 不加可能圆角无效
style.overflow = 'hidden';
}
return style;
},
// 中部弹窗的特有样式
centerStyle() {
let style = {};
let length = (/%$/.test(this.length) || this.length == 'auto') ? this.length : uni.upx2px(this.length) + 'px';
style.width = length;
style.zIndex = this.zIndex ? this.zIndex : this.$u.zIndex.popup;
if (this.borderRadius) {
style.borderRadius = `${this.borderRadius}rpx`;
// 不加可能圆角无效
style.overflow = 'hidden';
}
return style;
}
},
watch: {
value(val) {
if (val) {
this.open();
} else {
this.close();
}
}
},
created() {
// 先让弹窗组件渲染,再改变遮罩和抽屉元素的样式,让其动画其起作用(必须要有延时,才会有效果)
this.visibleSync = this.value;
setTimeout(() => {
this.showDrawer = this.value;
}, 30);
},
methods: {
// 遮罩被点击
maskClick() {
this.close();
},
close() {
this.change('showDrawer', 'visibleSync', false);
},
// 中部弹出时,需要.u-drawer-content将居中内容,此元素会铺满屏幕,点击需要关闭弹窗
// 让其只在mode=center时起作用
modeCenterClose(mode) {
if (mode != 'center' || !this.maskCloseAble) return;
this.close();
},
open() {
this.change('visibleSync', 'showDrawer', true);
},
// 此处的原理是,关闭时先通过动画隐藏弹窗和遮罩,再移除整个组件
// 打开时,先渲染组件,延时一定时间再让遮罩和弹窗的动画起作用
change(param1, param2, status) {
// 如果this.popup为false,以为着为picker,actionsheet等组件调用了popup组件
if (this.popup == true) this.$emit('input', status);
this[param1] = status;
if (this.timer) {
clearTimeout(this.timer);
}
this.timer = setTimeout(
() => {
this[param2] = status;
this.$emit(status ? 'open' : 'close');
},
status ? 30 : 300
);
}
},
components:{
uMask
}
};
</script>
<style scoped lang="scss">
.u-drawer {
/* #ifndef APP-NVUE */
display: block;
/* #endif */
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
overflow: hidden;
z-index: 999;
background-color: rgba(0, 0, 0, 0.4);
}
.u-drawer-content {
/* #ifndef APP-NVUE */
display: block;
/* #endif */
position: absolute;
z-index: 1003;
transition: all 0.25s linear;
}
.u-drawer-left {
top: 0;
bottom: 0;
left: 0;
background-color: #ffffff;
}
.u-drawer-right {
right: 0;
top: 0;
bottom: 0;
background-color: #ffffff;
}
.u-drawer-top {
top: 0;
left: 0;
right: 0;
background-color: #ffffff;
}
.u-drawer-bottom {
bottom: 0;
left: 0;
right: 0;
background-color: #ffffff;
}
.u-drawer-center {
/* #ifndef APP-NVUE */
display: flex;
flex-direction: column;
/* #endif */
bottom: 0;
left: 0;
right: 0;
top: 0;
justify-content: center;
align-items: center;
opacity: 0;
z-index: 99999;
}
.u-mode-center-box {
min-width: 100rpx;
min-height: 100rpx;
/* #ifndef APP-NVUE */
display: block;
/* #endif */
position: relative;
background-color: #ffffff;
}
.u-drawer-content-visible.u-drawer-center {
transform: scale(1);
opacity: 1;
}
.u-animation-zoom {
transform: scale(1.15);
}
.u-drawer-content-visible {
transform: translate3D(0px, 0px, 0px) !important;
}
.u-drawer-mask {
/* #ifndef APP-NVUE */
display: block;
/* #endif */
opacity: 0;
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
background-color: rgba(0, 0, 0, 0.4);
transition: opacity 0.25s;
}
.u-drawer-mask-visible {
/* #ifndef APP-NVUE */
display: block;
/* #endif */
opacity: 1;
}
</style>
......@@ -49,12 +49,28 @@
<button class="btn" @click="modal = true" v-if="orderType === 1">
备注
</button>
<button class="btn" v-if="orderType === 2">拒绝</button>
<button class="btn" v-if="orderType === 2">同意</button>
<button class="btn" v-if="orderType === 1 && data.OrderStatus === 2">
<button
class="btn"
v-if="orderType === 1 && data.OrderStatus === 6"
@click="pending(2)"
>
拒绝
</button>
<button
class="btn"
v-if="orderType === 1 && data.OrderStatus === 6"
@click="pending(1)"
>
同意
</button>
<button class="btn" v-if="orderType === 1 && data.OrderStatus === 2" @click="jumpPage(`/pages/MallMange/sendGoods?OrderId=${data.OrderId}`)">
发货
</button>
<button class="btn" v-if="orderType === 1 && data.OrderStatus === 3">
<button
class="btn"
v-if="orderType === 1 && data.OrderStatus === 3"
@click="ConfirmReceipt"
>
确认收货
</button>
<button class="btn" v-if="orderType === 1 && data.OrderStatus === 3">
......@@ -63,17 +79,23 @@
<button class="btn" v-if="orderType === 1 && data.OrderStatus === 3">
修改物流
</button>
<button class="btn" v-if="orderType === 1 && (data.OrderStatus === 2||data.OrderStatus ===1)">
<button
class="btn"
v-if="
orderType === 1 && (data.OrderStatus === 2 || data.OrderStatus === 1)
"
@click="OrderCancel"
>
强制取消
</button>
<button class="btn" v-if="orderType === 1 && data.OrderStatus === 2">
<button class="btn" v-if="orderType === 1 && (data.OrderStatus === 2)" @click="jumpPage(`/pages/MallMange/modifyAddress?OrderId=${data.OrderId}`)">
修改地址
</button>
</view>
<u-modal
v-model="modal"
:show-cancel-button="true"
@confirm="confirm"
@confirm="setOrderInfo"
contentSlot
title="备注"
>
......@@ -85,6 +107,16 @@
v-model="exitMsg.Remark"
/>
</u-modal>
<!-- 待处理 -->
<u-modal
v-model="pendModal"
:show-cancel-button="true"
@confirm="pendingForm"
contentSlot
title="备注"
>
<textarea class="textarea" v-model="pendMsg.Remark" />
</u-modal>
</view>
</template>
<script>
......@@ -101,9 +133,22 @@ export default {
Type: 1,
Remark: "",
},
// 待处理
pendMsg: {
OrderId: 0,
Type: 1,
Remark: 0,
},
pendModal: false,
};
},
methods: {
jumpPage(url){
uni.navigateTo({
url: url
});
},
//打电话
call(num) {
uni.makePhoneCall({
phoneNumber: num,
......@@ -117,21 +162,103 @@ export default {
.toString();
return str;
},
// 修改备注
setOrderInfo() {
this.modal = false;
this.requestAdmin("/api/order/SetOrderOperation", this.exitMsg, (res) => {
if (res.resultCode === 1) {
this.$emit("update");
}
});
},
confirm() {
this.modal = false;
this.setOrderInfo();
// 强制取消
OrderCancel() {
let that = this;
let text = "";
if (this.data.OrderStatus == 1) {
text = "确认取消?";
} else if (this.data.OrderStatus == 2) {
text = "确认取消?客人付款金额将原路退回。";
}
uni.showModal({
title: "提示",
content: text,
success: function (res) {
if (res.confirm) {
that.requestAdmin(
"/api/order/SetOrderForcedToCancel",
{ OrderId: that.data.OrderId },
(res) => {
if (res.resultCode == 1) {
uni.showToast({
title: "操作成功",
icon: "success",
duration: 2000,
});
that.$emit("update");
}
}
);
}
},
});
},
//确认收货
ConfirmReceipt() {
let msg = {
OrderId: this.data.OrderId,
Type: 5,
};
let that = this;
uni.showModal({
title: "提示",
content: "是否确认收货?",
success: function (res) {
if (res.confirm) {
that.requestAdmin("/api/order/SetOrderOperation", msg, (res) => {
if (res.resultCode == 1) {
uni.showToast({
title: "操作成功",
icon: "success",
duration: 2000,
});
that.$emit("update");
}
});
}
},
});
},
//待处理-->确认|取消
pending(type=1) {
this.pendModal = true;
this.pendMsg.OrderId = this.data.OrderId;
this.pendMsg.Type = type;
this.pendMsg.Remark = "";
},
// 待处理调用接口
pendingForm() {
this.apipost(
"/api/order/SetOrderApplyForCancelAudit",
this.pendMsg,
(res) => {
if (res.resultCode === 1) {
this.pendModal = false;
uni.showToast({
title: "操作成功",
icon: "success",
duration: 2000,
});
that.$emit("update");
}
}
);
},
},
created() {
this.exitMsg.Remark = this.data?.Remark;
this.exitMsg.OrderId = this.data?.OrderId;
console.log(261,this.data)
},
};
</script>
......@@ -236,7 +363,16 @@ export default {
border-radius: 10rpx;
background-color: #f7f7f7;
padding: 0 30rpx;
font-size: 26rpx;
margin: 40rpx auto;
font-size: 24rpx;
margin: 20rpx auto;
}
.textarea {
width: 80%;
// height: 80rpx;
border-radius: 10rpx;
background-color: #f7f7f7;
padding: 30rpx;
font-size: 24rpx;
margin: 20rpx auto;
}
</style>
\ No newline at end of file
<template>
<view class="AddaddressStyle" :style="{ height: contentHeight }">
<view class="addcenter">
<view class="addcenter_item2">
<Text>收货人</Text>
<input class="uni-input inputM" v-model="modifyMsg.Consignee" />
</view>
<view style="width: 100%; height: 1px; background: #f5f5f5" />
<view class="addcenter_item2">
<Text>联系电话</Text>
<input class="uni-input inputM" v-model="modifyMsg.Mobile" />
</view>
<view style="width: 100%; height: 1px; background: #f5f5f5" />
<!-- TODO 动态获取地址数据 -->
<view class="addcenter_item">
<Text>所在地区</Text>
<view
style="display: flex; flex-direction: row; align-items: center"
@click="addressShow = true"
>
<Text :style="{ color: address != '' ? '#303133' : '#9D9C9B' }">{{
address != "" ? address : "请选择"
}}</Text>
<u-icon name="arrow" color="#B2B2B2" size="30"></u-icon>
<pickerAddress v-model="addressShow" @confirm="addresspick" />
</view>
</view>
<view style="width: 100%; height: 1px; background: #f5f5f5" />
<view class="addcenter_item2" style="align-items: flex-start">
<Text>详细地址</Text>
<textarea
style="height: 50px"
class="inputM"
v-model="modifyMsg.ShoppingAddress"
/>
</view>
</view>
<view class="btn" @click="preserve" :style="{ background: mainColor }">
<Text>保存地址</Text>
</view>
</view>
</template>
<script>
import pickerAddress from "./components/liudx-pickerAddress/index.vue";
export default {
components: {
pickerAddress,
},
data() {
return {
pageTitle: "修改地址",
contentHeight: 0,
mainColor: "",
msg: {
Id: 0,
Name: "",
Mobile: "",
Province: "",
City: "",
District: "",
Address: "",
},
address: "",
Pickershwo: false,
addressShow: false,
modifyMsg: {
OrderId: 0,
Consignee: "",
Mobile: "",
Province: "",
City: "",
District: "",
ShoppingAddress: "",
},
};
},
created() {
this.contentHeight = this.$utils.calcContentHeight(-40) + "px";
this.mainColor = this.$uiConfig.mainColor;
uni.setNavigationBarTitle({
title: this.pageTitle,
});
},
onLoad(option) {
//option为object类型,会序列化上个页面传递的参数
if (option.AddressId) {
this.getAddressInfo(option.AddressId);
}
if (option.OrderId) {
this.modifyMsg.OrderId = option.OrderId;
this.getData();
}
},
methods: {
preserve() {
let pages = getCurrentPages(); // 当前页面
let beforePage = pages[pages.length - 2]; // 前一个页面
uni.showNavigationBarLoading();
this.requestAdmin(
"/api/order/SetOrderShopingAddress",
this.modifyMsg,
(res) => {
console.log(110, res);
uni.showToast({
title: "操作成功",
icon: "success",
});
setTimeout(() => {
uni.navigateBack({
success: function () {
beforePage.onLoad(); // 执行前一个页面的created方法
},
});
}, 1000);
uni.hideNavigationBarLoading();
}
);
},
addresspick(obj) {
this.modifyMsg.Province = obj.province.ID;
this.modifyMsg.City = obj.city.ID;
if (obj.area != undefined) {
this.modifyMsg.District = obj.area.ID;
this.address =
obj.province.Name + "," + obj.city.Name + "," + obj.area.Name;
} else {
this.modifyMsg.District = "";
this.address = obj.province.Name + "," + obj.city.Name;
}
},
getData() {
this.requestAdmin(
"/api/order/GetGoodsOrderInfo",
{
OrderId: this.modifyMsg.OrderId,
},
(res) => {
let OrderInfo = res.data.OrderInfo;
this.address = OrderInfo.DistrictAddress.split(" ").join(",");
this.modifyMsg.Consignee = OrderInfo.Consignee;
this.modifyMsg.Mobile = OrderInfo.Mobile;
this.modifyMsg.ShoppingAddress = OrderInfo.ShoppingAddress;
this.modifyMsg.Province = OrderInfo.Province;
this.modifyMsg.City = OrderInfo.City;
this.modifyMsg.District = OrderInfo.District;
console.log(OrderInfo);
}
);
},
},
};
</script>
<style>
.AddaddressStyle {
background: #f3f4f6;
}
.AddaddressStyle .top {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
padding: 20rpx;
background: #fff;
}
.AddaddressStyle .addcenter {
background: #ffffff;
}
.AddaddressStyle .addcenter_item {
width: 100%;
padding: 20rpx 28rpx;
color: #303133;
font-size: 28rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.AddaddressStyle .addcenter_item2 {
width: 100%;
padding: 20rpx 28rpx;
color: #303133;
font-size: 28rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.AddaddressStyle .btn {
width: 94%;
height: 80rpx;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
margin-left: 3%;
margin-top: 46rpx;
border-radius: 40rpx;
}
.AddaddressStyle .btn_smart {
width: 60px;
height: 50rpx;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
margin-top: 10rpx;
border-radius: 25rpx;
}
.AddaddressStyle .inputM {
margin-left: 20rpx;
width: 70%;
text-align: right;
}
</style>
\ No newline at end of file
......@@ -518,7 +518,6 @@ export default {
});
this.getOrderStatus();
this.getAfterSalesOrderstatus();
console.log(512, options);
if (options?.orderType) {
this.orderType = parseInt(options.orderType);
}
......
<template>
<view class="fhpage">
<view class="title"
>选择发货商品<text
style="color:#CCCED5;font-size:26rpx;margin-left:10rpx;"
>(默认全选)</text
>
</view>
<view class="goodsList">
<u-checkbox-group>
<u-checkbox
shape="circle"
v-for="(item, index) in orderData.DetailList"
:value="item.checked"
:key="index"
:name="item.Id"
@change="checkboxChange($event, item, index)"
>
<view class="goodsItem">
<image
:src="item.CoverImage"
mode="aspectFill"
class="image"
></image>
<view class="goodsInfo">
<view class="GoodsName">{{ item.GoodsName }}</view>
<view class="weight"
>规格:{{ item.SpecificationList.join(",") }}</view
>
<view class="price">
<text style="color: #808080">x{{ item.Number }}</text>
<text>{{ item.SmallShopsCostPrice }}</text>
</view>
</view>
</view>
</u-checkbox>
</u-checkbox-group>
</view>
<view class="title"> 物流信息 </view>
<view class="logisticsInfo">
<view class="logisticsItem">
<view class="itemLabel">物流快递</view>
<view class="itemCon">
<u-radio-group
v-model="fhMsg.Type"
:size="28"
@change="radioGroupChange"
>
<u-radio shape="circle" :name="1"> 快递</u-radio>
<u-radio shape="circle" :name="2"> 其他方式</u-radio>
</u-radio-group>
</view>
</view>
<view class="logisticsItem">
<view class="itemLabel">快递公司</view>
<view class="itemCon">
<picker :range="ExpressList" range-key="Name" @change="bindExpress">
<view style="display: flex"
>{{ ExpressStr }}
<u-icon name="arrow" style="margin-left: 10rpx"></u-icon>
</view>
</picker>
</view>
</view>
<view class="logisticsItem">
<view class="itemLabel">收件人邮编</view>
<input type="text" v-model="fhMsg.PostCode" class="input" placeholder="请输入邮编"/>
</view>
<view class="logisticsItem">
<view class="itemLabel">快递单号</view>
<input type="text" v-model="fhMsg.ExpressNumber" class="input" placeholder="请输入单号"/>
</view>
<view class="logisticsItem" style="min-height:80rpx;height:auto;border:none">
<view class="itemLabel">商家留言</view>
<textarea type="text" auto-height v-model="fhMsg.Remark" class="input2"/>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
fhMsg: {
Id: 0,
OrderId: 0,
Type: 1,
ExpressId: "",
PostCode: "",
ExpressNumber: "",
Remark: "",
OrderDetailIdList: [],
},
orderData: {},
showType: 1,
kdShow: false,
ExpressList: [],
ExpressStr: "未选择",
};
},
methods: {
getData() {
this.requestAdmin(
"/api/order/GetGoodsOrderInfo",
{
OrderId: this.fhMsg.OrderId,
},
(res) => {
this.fhMsg.OrderDetailIdList = [];
this.orderData = res.data;
this.orderData.DetailList.forEach((e) => {
e.checked = true;
this.fhMsg.OrderDetailIdList.push(e.Id);
});
console.log(this.orderData.DetailList);
}
);
},
checkboxChange(e, item, index) {
item.checked = !e.value;
this.$set(this.orderData.DetailList, index, item);
this.fhMsg.OrderDetailIdList = [];
this.orderData.DetailList.map((x) => {
if (x.checked) {
this.fhMsg.OrderDetailIdList.push(x.Id);
}
});
},
radioGroupChange(e) {
console.log("tag2", this.fhMsg.Type);
},
// 快递公司
getExpressInfo() {
this.requestAdmin("/api/MallBase/GetExpressInfo", {}, (res) => {
if (res.resultCode == 1) {
this.ExpressList = res.data;
console.log("117", this.ExpressList);
}
});
},
//选择快递公司
bindExpress(e) {
let index = parseInt(e.detail.value);
this.ExpressStr = this.ExpressList[index].Name;
this.fhMsg.ExpressId = this.ExpressList[index].Id;
console.log(133, e);
},
},
onLoad(options) {
uni.setNavigationBarTitle({
title: "发货",
});
if (options.OrderId) {
this.fhMsg.OrderId = options?.OrderId;
this.getData();
}
this.getExpressInfo();
},
};
</script>
<style lang="scss" scoped>
.fhpage {
min-height: 100vh;
background-color: #f7f7f7;
}
.title {
height: 80rpx;
display: flex;
align-items: center;
color: #111;
font-size: 30rpx;
box-sizing: border-box;
padding: 0 25rpx;
}
.goodsList {
box-sizing: border-box;
padding: 0 20rpx;
background-color: #fff;
margin-bottom: 20rpx;
.goodsItem {
// height: 220rpx;
border-radius: 10rpx;
padding: 0 25rpx;
margin: 20rpx 0;
display: flex;
align-items: center;
.image {
width: 160rpx;
height: 160rpx;
border-radius: 6rpx;
box-shadow: 0rpx 0rpx 10rpx 0px rgba(36, 36, 36, 0.2);
margin-right: 20rpx;
}
.goodsInfo {
width: 450rpx;
height: 160rpx;
font-size: 24rpx;
color: #333;
.GoodsName {
height: 66rpx;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
word-break: break-all;
}
.weight {
height: 50rpx;
line-height: 50rpx;
color: #808080;
}
.price {
display: flex;
align-items: center;
justify-content: space-between;
}
}
}
}
.logisticsInfo {
width: 700rpx;
margin: 0 auto;
background-color: #ffffff;
border-radius: 10rpx;
padding: 0 20rpx;
.logisticsItem {
height: 80rpx;
border-bottom: 2rpx solid #ccced5;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 24rpx;
.itemLabel {
width: 200rpx;
font-size: 24rpx;
}
.input{
text-align: right;
}
.input2{
text-align: right;
padding: 20rpx;
}
}
}
</style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment