update 订单
This commit is contained in:
parent
2cea3d2187
commit
9d9745e6c2
@ -72,7 +72,7 @@ export function GetSalesReturnOrderDetails(params) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 退货订单不通过
|
* 退货订单拒绝退款
|
||||||
* @author Seven
|
* @author Seven
|
||||||
* @data 2025-3-28
|
* @data 2025-3-28
|
||||||
* @param {
|
* @param {
|
||||||
@ -93,7 +93,7 @@ export function GetSalesReturnOrderNoPass(params) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 退货订单不通过
|
* 退货订单同意退款
|
||||||
* @author Seven
|
* @author Seven
|
||||||
* @data 2025-3-28
|
* @data 2025-3-28
|
||||||
* @param {
|
* @param {
|
||||||
@ -124,6 +124,26 @@ export function GetInitiativeOrderRefund(params) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 催单
|
||||||
|
* @author Seven
|
||||||
|
* @data 2025-3-28
|
||||||
|
* @param {
|
||||||
|
* order_id : "DD-20241206-13"
|
||||||
|
* }
|
||||||
|
* @returns { }
|
||||||
|
* @see https://mall.gpxscs.cn/api/admin/shop/shop-order-info/picking/completed
|
||||||
|
*/
|
||||||
|
|
||||||
|
export function GetExpediteSFOrder(params) {
|
||||||
|
return http({
|
||||||
|
url: "/shop/sf-express/reminder-order",
|
||||||
|
method: "post",
|
||||||
|
params,
|
||||||
|
baseURL: config.apiMobile,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 拣货完成
|
* 拣货完成
|
||||||
* @author Seven
|
* @author Seven
|
||||||
|
|||||||
@ -1,346 +1,382 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="tui-tabs-view"
|
<view
|
||||||
:class="[isFixed ? 'tui-tabs-fixed' : 'tui-tabs-relative', unlined ? 'tui-unlined' : '']" :style="{
|
class="tui-tabs-view"
|
||||||
width: tabsWidth + 'px',
|
:class="[
|
||||||
height: height + 'rpx',
|
isFixed ? 'tui-tabs-fixed' : 'tui-tabs-relative',
|
||||||
padding: `0 ${padding}rpx`,
|
unlined ? 'tui-unlined' : '',
|
||||||
background: backgroundColor,
|
]"
|
||||||
top: isFixed ? top + 'px' : 'auto',
|
:style="{
|
||||||
zIndex: isFixed ? zIndex : 'auto'
|
width: tabsWidth + 'px',
|
||||||
}" v-if="tabsWidth>0">
|
height: height + 'rpx',
|
||||||
<view v-for="(item, index) in tabs" :key="index" :class="['tui-tabs-item', { 'tui__tab_current': currentTab==index}]"
|
padding: `0 ${padding}rpx`,
|
||||||
:style="{ width: getItemWidth,height: height + 'rpx' }" @tap.stop="swichTabs(index)">
|
background: backgroundColor,
|
||||||
<view class="tui-tabs-title" :class="{'tui-tabs-disabled': item.disabled }" :style="{
|
top: isFixed ? top + 'px' : 'auto',
|
||||||
color: currentTab == index ? getSelectedColor : color,
|
zIndex: isFixed ? zIndex : 'auto',
|
||||||
fontSize: size + 'rpx',
|
}"
|
||||||
fontWeight: bold && currentTab == index ? 'bold' : 'normal',transform:`scale(${currentTab == index?scale:1})`
|
v-if="tabsWidth > 0"
|
||||||
}">
|
>
|
||||||
{{ item[field] }}
|
<view
|
||||||
<view :class="[item.isDot ? 'tui-badge__dot' : 'tui-tabs__badge']"
|
v-for="(item, index) in tabs"
|
||||||
:style="{ color: badgeColor, backgroundColor: getBadgeBgColor }"
|
:key="index"
|
||||||
v-if="item[badgeField] || item.isDot">
|
:class="['tui-tabs-item', { tui__tab_current: currentTab == index }]"
|
||||||
{{ item.isDot ? '' : item[badgeField] }}
|
:style="{ width: getItemWidth, height: height + 'rpx' }"
|
||||||
</view>
|
@tap.stop="swichTabs(index)"
|
||||||
</view>
|
>
|
||||||
</view>
|
<view
|
||||||
<view v-if="isSlider" class="tui-tabs-slider" :style="{
|
class="tui-tabs-title"
|
||||||
transform: 'translateX(' + scrollLeft + 'px)',
|
:class="{ 'tui-tabs-disabled': item.disabled }"
|
||||||
width: sliderWidth + 'rpx',
|
:style="{
|
||||||
height: sliderHeight + 'rpx',
|
color: currentTab == index ? getSelectedColor : color,
|
||||||
borderRadius: sliderRadius,
|
fontSize: size + 'rpx',
|
||||||
bottom: bottom,
|
fontWeight: bold && currentTab == index ? 'bold' : 'normal',
|
||||||
background: getSliderBgColor,
|
transform: `scale(${currentTab == index ? scale : 1})`,
|
||||||
marginBottom: bottom == '50%' ? '-' + sliderHeight / 2 + 'rpx' : 0
|
}"
|
||||||
}"></view>
|
>
|
||||||
</view>
|
{{ item[field] }}
|
||||||
|
<view
|
||||||
|
:class="[item.isDot ? 'tui-badge__dot' : 'tui-tabs__badge']"
|
||||||
|
:style="{ color: badgeColor, backgroundColor: getBadgeBgColor }"
|
||||||
|
v-if="item[badgeField] || item.isDot"
|
||||||
|
>
|
||||||
|
{{ item.isDot ? "" : item[badgeField] }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
v-if="isSlider"
|
||||||
|
class="tui-tabs-slider"
|
||||||
|
:style="{
|
||||||
|
transform: 'translateX(' + scrollLeft + 'px)',
|
||||||
|
width: sliderWidth + 'rpx',
|
||||||
|
height: sliderHeight + 'rpx',
|
||||||
|
borderRadius: sliderRadius,
|
||||||
|
bottom: bottom,
|
||||||
|
background: getSliderBgColor,
|
||||||
|
marginBottom: bottom == '50%' ? '-' + sliderHeight / 2 + 'rpx' : 0,
|
||||||
|
}"
|
||||||
|
></view>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'tuiTabs',
|
name: "tuiTabs",
|
||||||
emits: ['change'],
|
emits: ["change"],
|
||||||
props: {
|
props: {
|
||||||
//标签页
|
//标签页
|
||||||
tabs: {
|
tabs: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default () {
|
default() {
|
||||||
return [];
|
return [];
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
//显示文本字段名称
|
//显示文本字段名称
|
||||||
field: {
|
field: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'name'
|
default: "name",
|
||||||
},
|
},
|
||||||
badgeField: {
|
badgeField: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'num'
|
default: "num",
|
||||||
},
|
},
|
||||||
//tabs宽度,不传值则默认使用windowWidth,单位px
|
//tabs宽度,不传值则默认使用windowWidth,单位px
|
||||||
width: {
|
width: {
|
||||||
type: [Number, String],
|
type: [Number, String],
|
||||||
default: 0
|
default: 0,
|
||||||
},
|
},
|
||||||
//rpx
|
//rpx
|
||||||
height: {
|
height: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 80
|
default: 80,
|
||||||
},
|
},
|
||||||
//rpx 只对左右padding起作用,上下为0
|
//rpx 只对左右padding起作用,上下为0
|
||||||
padding: {
|
padding: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 30
|
default: 30,
|
||||||
},
|
},
|
||||||
//背景色
|
//背景色
|
||||||
backgroundColor: {
|
backgroundColor: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '#FFFFFF'
|
default: "#FFFFFF",
|
||||||
},
|
},
|
||||||
//是否固定
|
//是否固定
|
||||||
isFixed: {
|
isFixed: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false,
|
||||||
},
|
},
|
||||||
//px
|
//px
|
||||||
top: {
|
top: {
|
||||||
type: Number,
|
type: Number,
|
||||||
// #ifndef H5
|
// #ifndef H5
|
||||||
default: 0,
|
default: 0,
|
||||||
// #endif
|
// #endif
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
default: 44
|
default: 44,
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
//是否去掉底部线条
|
//是否去掉底部线条
|
||||||
unlined: {
|
unlined: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false,
|
||||||
},
|
},
|
||||||
//当前选项卡
|
//当前选项卡
|
||||||
currentTab: {
|
currentTab: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 0
|
default: 0,
|
||||||
},
|
},
|
||||||
isSlider: {
|
isSlider: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true
|
default: true,
|
||||||
},
|
},
|
||||||
//滑块宽度
|
//滑块宽度
|
||||||
sliderWidth: {
|
sliderWidth: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 68
|
default: 68,
|
||||||
},
|
},
|
||||||
//滑块高度
|
//滑块高度
|
||||||
sliderHeight: {
|
sliderHeight: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 6
|
default: 6,
|
||||||
},
|
},
|
||||||
//滑块背景颜色
|
//滑块背景颜色
|
||||||
sliderBgColor: {
|
sliderBgColor: {
|
||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: "",
|
||||||
},
|
},
|
||||||
sliderRadius: {
|
sliderRadius: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '50rpx'
|
default: "50rpx",
|
||||||
},
|
},
|
||||||
//滑块bottom
|
//滑块bottom
|
||||||
bottom: {
|
bottom: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '0'
|
default: "0",
|
||||||
},
|
},
|
||||||
//标签页宽度
|
//标签页宽度
|
||||||
itemWidth: {
|
itemWidth: {
|
||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: "",
|
||||||
},
|
},
|
||||||
//字体颜色
|
//字体颜色
|
||||||
color: {
|
color: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '#666'
|
default: "#666",
|
||||||
},
|
},
|
||||||
//选中后字体颜色
|
//选中后字体颜色
|
||||||
selectedColor: {
|
selectedColor: {
|
||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: "",
|
||||||
},
|
},
|
||||||
//字体大小
|
//字体大小
|
||||||
size: {
|
size: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 28
|
default: 28,
|
||||||
},
|
},
|
||||||
//选中后 是否加粗 ,未选中则无效
|
//选中后 是否加粗 ,未选中则无效
|
||||||
bold: {
|
bold: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false,
|
||||||
},
|
},
|
||||||
//2.3.0+
|
//2.3.0+
|
||||||
scale: {
|
scale: {
|
||||||
type: [Number, String],
|
type: [Number, String],
|
||||||
default: 1
|
default: 1,
|
||||||
},
|
},
|
||||||
//角标字体颜色
|
//角标字体颜色
|
||||||
badgeColor: {
|
badgeColor: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '#fff'
|
default: "#fff",
|
||||||
},
|
},
|
||||||
//角标背景颜色
|
//角标背景颜色
|
||||||
badgeBgColor: {
|
badgeBgColor: {
|
||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: "",
|
||||||
},
|
},
|
||||||
zIndex: {
|
zIndex: {
|
||||||
type: [Number, String],
|
type: [Number, String],
|
||||||
default: 996
|
default: 996,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
currentTab() {
|
currentTab() {
|
||||||
this.checkCor();
|
this.checkCor();
|
||||||
},
|
},
|
||||||
tabs() {
|
tabs() {
|
||||||
this.checkCor();
|
this.checkCor();
|
||||||
},
|
},
|
||||||
width(val) {
|
width(val) {
|
||||||
this.tabsWidth = val;
|
this.tabsWidth = val;
|
||||||
this.checkCor();
|
this.checkCor();
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
getItemWidth() {
|
getItemWidth() {
|
||||||
let width = 100 / (this.tabs.length || 4) + '%'
|
let width = 100 / (this.tabs.length || 4) + "%";
|
||||||
return this.itemWidth ? this.itemWidth : width
|
return this.itemWidth ? this.itemWidth : width;
|
||||||
},
|
},
|
||||||
getSliderBgColor() {
|
getSliderBgColor() {
|
||||||
return this.sliderBgColor || (uni && uni.$tui && uni.$tui.color.primary) || '#5677fc';
|
return (
|
||||||
},
|
this.sliderBgColor ||
|
||||||
getSelectedColor() {
|
(uni && uni.$tui && uni.$tui.color.primary) ||
|
||||||
return this.selectedColor || (uni && uni.$tui && uni.$tui.color.primary) || '#5677fc';
|
"#5677fc"
|
||||||
},
|
);
|
||||||
getBadgeBgColor() {
|
},
|
||||||
return this.badgeBgColor || (uni && uni.$tui && uni.$tui.color.pink) || '#f74d54';
|
getSelectedColor() {
|
||||||
}
|
return (
|
||||||
},
|
this.selectedColor ||
|
||||||
created() {
|
(uni && uni.$tui && uni.$tui.color.primary) ||
|
||||||
// 高度自适应
|
"#5677fc"
|
||||||
setTimeout(() => {
|
);
|
||||||
uni.getSystemInfo({
|
},
|
||||||
success: res => {
|
getBadgeBgColor() {
|
||||||
this.winWidth = res.windowWidth;
|
return (
|
||||||
this.tabsWidth = this.width == 0 ? this.winWidth : Number(this.width);
|
this.badgeBgColor ||
|
||||||
this.checkCor();
|
(uni && uni.$tui && uni.$tui.color.pink) ||
|
||||||
}
|
"#f74d54"
|
||||||
});
|
);
|
||||||
}, 0);
|
},
|
||||||
},
|
},
|
||||||
data() {
|
created() {
|
||||||
return {
|
// 高度自适应
|
||||||
winWidth: 0,
|
setTimeout(() => {
|
||||||
tabsWidth: 0,
|
uni.getSystemInfo({
|
||||||
scrollLeft: 0
|
success: (res) => {
|
||||||
};
|
this.winWidth = res.windowWidth;
|
||||||
},
|
this.tabsWidth = this.width == 0 ? this.winWidth : Number(this.width);
|
||||||
methods: {
|
this.checkCor();
|
||||||
checkCor: function() {
|
},
|
||||||
let tabsNum = this.tabs.length;
|
});
|
||||||
let padding = uni.upx2px(Number(this.padding));
|
}, 0);
|
||||||
let width = this.tabsWidth - padding * 2;
|
},
|
||||||
let left = (width / tabsNum - uni.upx2px(Number(this.sliderWidth))) / 2 + padding;
|
data() {
|
||||||
let scrollLeft = left;
|
return {
|
||||||
if (this.currentTab > 0) {
|
winWidth: 0,
|
||||||
scrollLeft = scrollLeft + (width / tabsNum) * this.currentTab;
|
tabsWidth: 0,
|
||||||
}
|
scrollLeft: 0,
|
||||||
this.scrollLeft = scrollLeft;
|
};
|
||||||
},
|
},
|
||||||
// 点击标题切换当前页时改变样式
|
methods: {
|
||||||
swichTabs: function(index) {
|
checkCor: function () {
|
||||||
let item = this.tabs[index];
|
let tabsNum = this.tabs.length;
|
||||||
if (item && item.disabled) return;
|
let padding = uni.upx2px(Number(this.padding));
|
||||||
if (this.currentTab == index) {
|
let width = this.tabsWidth - padding * 2;
|
||||||
return false;
|
let left =
|
||||||
} else {
|
(width / tabsNum - uni.upx2px(Number(this.sliderWidth))) / 2 + padding;
|
||||||
this.$emit('change', {
|
let scrollLeft = left;
|
||||||
index: Number(index),
|
if (this.currentTab > 0) {
|
||||||
item: item
|
scrollLeft = scrollLeft + (width / tabsNum) * this.currentTab;
|
||||||
});
|
}
|
||||||
}
|
this.scrollLeft = scrollLeft;
|
||||||
}
|
},
|
||||||
}
|
// 点击标题切换当前页时改变样式
|
||||||
};
|
swichTabs: function (index) {
|
||||||
|
let item = this.tabs[index];
|
||||||
|
if (item && item.disabled) return;
|
||||||
|
if (this.currentTab == index) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
this.$emit("change", {
|
||||||
|
index: Number(index),
|
||||||
|
item: item,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.tui-tabs-view {
|
.tui-tabs-view {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tui-tabs-relative {
|
.tui-tabs-relative {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tui-tabs-fixed {
|
.tui-tabs-fixed {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 0;
|
left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tui-tabs-fixed::before,
|
.tui-tabs-fixed::before,
|
||||||
.tui-tabs-relative::before {
|
.tui-tabs-relative::before {
|
||||||
content: '';
|
content: "";
|
||||||
position: absolute;
|
position: absolute;
|
||||||
border-bottom: 1rpx solid #eaeef1;
|
border-bottom: 1rpx solid #eaeef1;
|
||||||
-webkit-transform: scaleY(0.5) translateZ(0);
|
-webkit-transform: scaleY(0.5) translateZ(0);
|
||||||
transform: scaleY(0.5) translateZ(0);
|
transform: scaleY(0.5) translateZ(0);
|
||||||
transform-origin: 0 100%;
|
transform-origin: 0 100%;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tui-unlined::before {
|
.tui-unlined::before {
|
||||||
border-bottom: 0 !important;
|
border-bottom: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tui-tabs-item {
|
.tui-tabs-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
/* #ifdef H5 */
|
/* #ifdef H5 */
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
/* #endif */
|
/* #endif */
|
||||||
}
|
}
|
||||||
|
|
||||||
.tui-tabs-disabled {
|
.tui-tabs-disabled {
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tui-tabs-title {
|
.tui-tabs-title {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 3;
|
z-index: 3;
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
transition: all 0.15s ease-in-out;
|
transition: all 0.15s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tui-tabs-slider {
|
.tui-tabs-slider {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
transition: all 0.3s ease-in-out;
|
transition: all 0.3s ease-in-out;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
transform-style: preserve-3d;
|
transform-style: preserve-3d;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tui-tabs__badge {
|
.tui-tabs__badge {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
height: 32rpx;
|
height: 32rpx;
|
||||||
min-width: 20rpx;
|
min-width: 20rpx;
|
||||||
padding: 0 6rpx;
|
padding: 0 6rpx;
|
||||||
border-radius: 40rpx;
|
border-radius: 40rpx;
|
||||||
right: 0;
|
right: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
transform: translate(88%, -50%);
|
transform: translate(88%, -50%);
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
z-index: 4;
|
z-index: 4;
|
||||||
font-weight: normal !important;
|
font-weight: normal !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tui-badge__dot {
|
.tui-badge__dot {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
height: 16rpx;
|
height: 16rpx;
|
||||||
width: 16rpx;
|
width: 16rpx;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
right: -10rpx;
|
right: -10rpx;
|
||||||
top: -10rpx;
|
top: -10rpx;
|
||||||
z-index: 4;
|
z-index: 4;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
1128
java-mall-app-shop-admin/pages/order/components/retrunOrderItem.vue
Normal file
1128
java-mall-app-shop-admin/pages/order/components/retrunOrderItem.vue
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -234,7 +234,7 @@
|
|||||||
>
|
>
|
||||||
<view class="total-content">
|
<view class="total-content">
|
||||||
<view class="total-name">
|
<view class="total-name">
|
||||||
共{{ specificationInfoList.length }}个规格
|
共{{ specificationInfoList.length || 1 }}个规格
|
||||||
</view>
|
</view>
|
||||||
<u-icon name="arrow-right"></u-icon>
|
<u-icon name="arrow-right"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
@ -748,6 +748,9 @@ export default {
|
|||||||
return item; // 如果没有匹配项,返回原 item
|
return item; // 如果没有匹配项,返回原 item
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (this.specificationInfoList.length == 0) {
|
||||||
|
debugger;
|
||||||
|
}
|
||||||
console.log(this.specificationInfoList);
|
console.log(this.specificationInfoList);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error("解析productSpec失败:", e);
|
console.error("解析productSpec失败:", e);
|
||||||
|
|||||||
@ -359,7 +359,6 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.loadingCommodityData = true;
|
this.loadingCommodityData = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.isRefreshing) {
|
if (this.isRefreshing) {
|
||||||
this.pageNum = 1;
|
this.pageNum = 1;
|
||||||
this.isNoCommodityData = false;
|
this.isNoCommodityData = false;
|
||||||
|
|||||||
@ -521,7 +521,7 @@ export default {
|
|||||||
item_quantity: item.itemQuantity,
|
item_quantity: item.itemQuantity,
|
||||||
item_quantity_2: "",
|
item_quantity_2: "",
|
||||||
item_unit_price: item.product_unit_price,
|
item_unit_price: item.product_unit_price,
|
||||||
item_quantity_2: "",
|
item_unit_price_2: "",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@ -740,7 +740,7 @@ export default {
|
|||||||
item_id: item.item_id,
|
item_id: item.item_id,
|
||||||
product_id: item.product_id,
|
product_id: item.product_id,
|
||||||
item_quantity: item.item_quantity_2 || item.item_quantity,
|
item_quantity: item.item_quantity_2 || item.item_quantity,
|
||||||
item_unit_price: item.item_quantity_2 || item.item_unit_price,
|
item_unit_price: item.item_unit_price_2 || item.item_unit_price,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -342,6 +342,7 @@ export default {
|
|||||||
productItem: {},
|
productItem: {},
|
||||||
isAdd: true,
|
isAdd: true,
|
||||||
selectCommodisItems: [],
|
selectCommodisItems: [],
|
||||||
|
inputSearch: "",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
@ -409,60 +410,71 @@ export default {
|
|||||||
|
|
||||||
// 1. 解析产品规格模板
|
// 1. 解析产品规格模板
|
||||||
let productSpec = JSON.parse(JSON.stringify(item.product_spec));
|
let productSpec = JSON.parse(JSON.stringify(item.product_spec));
|
||||||
|
if (productSpec.length > 0) {
|
||||||
productSpec = JSON.parse(productSpec);
|
productSpec = JSON.parse(productSpec);
|
||||||
if (!Array.isArray(productSpec)) {
|
if (!Array.isArray(productSpec)) {
|
||||||
productSpec = [productSpec]; // 确保是数组格式
|
productSpec = [productSpec]; // 确保是数组格式
|
||||||
}
|
|
||||||
|
|
||||||
const specItemMap = [];
|
|
||||||
|
|
||||||
productSpec.forEach((specGroup) => {
|
|
||||||
if (specGroup.item && Array.isArray(specGroup.item)) {
|
|
||||||
specGroup.item.forEach((item) => {
|
|
||||||
specItemMap.push(item.id);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
|
||||||
this.currSpecificationList = this.selectCommodisItems
|
const specItemMap = [];
|
||||||
.map((item) => {
|
|
||||||
try {
|
|
||||||
// 解析规格数据(兼容字符串和对象)
|
|
||||||
const itemSpec =
|
|
||||||
typeof item.item_spec === "string"
|
|
||||||
? JSON.parse(item.item_spec)
|
|
||||||
: item.item_spec;
|
|
||||||
|
|
||||||
if (Array.isArray(itemSpec) && itemSpec.length > 0) {
|
productSpec.forEach((specGroup) => {
|
||||||
const firstSpec = itemSpec[0];
|
if (specGroup.item && Array.isArray(specGroup.item)) {
|
||||||
|
specGroup.item.forEach((item) => {
|
||||||
|
specItemMap.push(item.id);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// 匹配规格逻辑
|
this.currSpecificationList = this.selectCommodisItems
|
||||||
if (firstSpec.item && firstSpec.item.id) {
|
.map((item) => {
|
||||||
const matchedSpec = specItemMap.find(
|
try {
|
||||||
(id) => id == firstSpec.item.id
|
// 解析规格数据(兼容字符串和对象)
|
||||||
);
|
const itemSpec =
|
||||||
|
typeof item.item_spec === "string"
|
||||||
|
? JSON.parse(item.item_spec)
|
||||||
|
: item.item_spec;
|
||||||
|
|
||||||
if (matchedSpec) {
|
if (Array.isArray(itemSpec) && itemSpec.length > 0) {
|
||||||
return {
|
const firstSpec = itemSpec[0];
|
||||||
...item,
|
|
||||||
spec_item_id: matchedSpec,
|
// 匹配规格逻辑
|
||||||
item_is_default: Boolean(item.item_is_default),
|
if (firstSpec.item && firstSpec.item.id) {
|
||||||
// 保留原始数据(调试用)
|
const matchedSpec = specItemMap.find(
|
||||||
};
|
(id) => id == firstSpec.item.id
|
||||||
|
);
|
||||||
|
|
||||||
|
if (matchedSpec) {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
spec_item_id: matchedSpec,
|
||||||
|
item_is_default: Boolean(item.item_is_default),
|
||||||
|
// 保留原始数据(调试用)
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.error(`处理商品 ${item.item_id} 时出错:`, e);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
})
|
||||||
console.error(`处理商品 ${item.item_id} 时出错:`, e);
|
.filter((item) => item != undefined);
|
||||||
}
|
} else {
|
||||||
})
|
this.currSpecificationList = [
|
||||||
.filter((item) => item != undefined);
|
{
|
||||||
console.log(this.currSpecificationList);
|
...item,
|
||||||
|
item_quantity: item.itemQuantity,
|
||||||
|
item_quantity_2: "",
|
||||||
|
item_unit_price: item.product_unit_price,
|
||||||
|
item_unit_price_2: "",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
}
|
||||||
this.showBottomPopup = true;
|
this.showBottomPopup = true;
|
||||||
|
console.log(this.currSpecificationList);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async getProductList(inputSearch) {
|
async getProductList() {
|
||||||
if (this.loadingDownCommodityData) {
|
if (this.loadingDownCommodityData) {
|
||||||
this.loadingCommodityData = false;
|
this.loadingCommodityData = false;
|
||||||
} else {
|
} else {
|
||||||
@ -484,9 +496,9 @@ export default {
|
|||||||
openCount: true,
|
openCount: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (inputSearch) {
|
if (this.inputSearch) {
|
||||||
this.pageNum = 1;
|
this.pageNum = 1;
|
||||||
params.product_name = inputSearch;
|
params.product_name = this.inputSearch;
|
||||||
}
|
}
|
||||||
|
|
||||||
let res = await GetProductList(params);
|
let res = await GetProductList(params);
|
||||||
@ -660,30 +672,26 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
async updateCommodityPriceAndQuantity(item) {
|
async updateCommodityPriceAndQuantity(item) {
|
||||||
let params = {};
|
let params = this.currSpecificationList.map((item) => {
|
||||||
|
return {
|
||||||
|
item_id: item.item_id,
|
||||||
|
product_id: item.product_id,
|
||||||
|
item_quantity: item.item_quantity_2 || item.item_quantity,
|
||||||
|
item_unit_price: item.item_unit_price_2 || item.item_unit_price,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
debugger;
|
||||||
let res = await UpdateCommodityPriceAndQuantity(params);
|
let res = await UpdateCommodityPriceAndQuantity(params);
|
||||||
if (res && res.status) {
|
if (res && res.status) {
|
||||||
|
this.showBottomPopup = false;
|
||||||
|
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
message: "修改成功",
|
message: "修改成功",
|
||||||
type: "succeed",
|
type: "succeed",
|
||||||
duration: 1000,
|
duration: 1000,
|
||||||
});
|
});
|
||||||
|
|
||||||
// 静默更新数组
|
await this.getProductList();
|
||||||
let listParams = {
|
|
||||||
kind_id: "1201,1202,1203",
|
|
||||||
pageNum: 9999,
|
|
||||||
pageSize: this.pageSize,
|
|
||||||
product_state_id: this.currProductStateId,
|
|
||||||
category_id: this.currCategoryId,
|
|
||||||
openCount: true,
|
|
||||||
};
|
|
||||||
|
|
||||||
let result = await GetProductList(listParams);
|
|
||||||
if (result && result.status == 200) {
|
|
||||||
this.commodityList = res.data.items;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
this.showBottomPopup = false;
|
this.showBottomPopup = false;
|
||||||
},
|
},
|
||||||
|
|||||||
@ -21,6 +21,10 @@
|
|||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.custom-icon-a-Frame3:before {
|
||||||
|
content: "\e60c";
|
||||||
|
}
|
||||||
|
|
||||||
.custom-icon-jianhao_fangxing:before {
|
.custom-icon-jianhao_fangxing:before {
|
||||||
content: "\e728";
|
content: "\e728";
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -52,8 +52,6 @@ service.interceptors.response.use(
|
|||||||
// });
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(res);
|
|
||||||
|
|
||||||
if (res && res.code == 30) {
|
if (res && res.code == 30) {
|
||||||
uni.$u.toast(`token已经过期需要重新登录`);
|
uni.$u.toast(`token已经过期需要重新登录`);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user