更新功能

This commit is contained in:
weipengfei 2023-11-16 19:10:49 +08:00
parent 753c4ed835
commit 9d50e20fc2
4 changed files with 117 additions and 69 deletions

View File

@ -76,17 +76,19 @@
<view class="nav acea-row row-between-wrapper">
<view class="data">日期</view>
<view class="browse">订单数</view>
<view class="turnover">成交额</view>
<!-- <view class="turnover">成交额</view> -->
<view class="turnover">结算金额</view>
</view>
<view class="conter">
<view class="item acea-row row-between-wrapper" v-for="(item, index) in list" :key="index">
<view class="data">{{ item.day }}</view>
<view class="browse">{{ item.total }}</view>
<!-- <view class="turnover">{{ item.pay_price }}</view> -->
<view class="turnover">{{ item.pay_price }}</view>
</view>
</view>
</view>
<view class="public_footer" v-if="this.type_id == 12">
<!-- <view class="public_footer" v-if="this.type_id == 12">
<view class="footer_bon">
<view class="footer_top public-wrapper ">
@ -139,11 +141,11 @@
</view>
</view>
</view>
</view>
</view> -->
</view>
<button v-if="this.type_id == 12" class="footer-bnt" @click="navigator()">查看更多 ></button>
<!-- <button v-if="this.type_id == 12" class="footer-bnt" @click="navigator()">查看更多 ></button> -->
<!-- <view class="public-wrapper">
<navigator class="item" :url="`/pages/admin/order/monitor?merId=${mer_id}`"
hover-class="none">
@ -343,8 +345,8 @@
background: url("@/static/images/beijin.png") no-repeat;
background-size: 100% 100%;
width: 100%;
height: 280upx;
padding: 40upx 3upx 0 3upx;
height: 280rpx;
padding: 40rpx 3rpx 0 3rpx;
box-sizing: border-box;
}
@ -354,71 +356,71 @@
-o-flex: 1;
-ms-flex: 1;
text-align: center;
font-size: 24upx;
font-size: 24rpx;
color: #fff;
}
.order-index .header .item .num {
font-size: 40upx;
margin-bottom: 7upx;
font-size: 40rpx;
margin-bottom: 7rpx;
height: 60rpx;
}
.order-index .wrapper {
width: 690upx;
width: 690rpx;
background-color: #fff;
border-radius: 10upx;
margin: -115upx auto 0 auto;
padding-top: 25upx;
border-radius: 10rpx;
margin: -115rpx auto 0 auto;
padding-top: 25rpx;
}
.order-index .wrapper .title {
font-size: 30upx;
font-size: 30rpx;
color: #282828;
padding: 0 30upx;
margin-bottom: 40upx;
padding: 0 30rpx;
margin-bottom: 40rpx;
}
.order-index .wrapper .title .iconfont {
color: #2291f8;
font-size: 40upx;
margin-right: 13upx;
font-size: 40rpx;
margin-right: 13rpx;
vertical-align: middle;
}
.order-index .wrapper .list .item {
width: 33.33%;
text-align: center;
font-size: 24upx;
font-size: 24rpx;
color: #999;
margin-bottom: 45upx;
margin-bottom: 45rpx;
}
.order-index .wrapper .list .item .num {
font-size: 40upx;
font-size: 40rpx;
color: #333;
}
.public-wrapper .title {
font-size: 30upx;
font-size: 30rpx;
color: #282828;
padding: 0 30upx;
margin-bottom: 20upx;
padding: 0 30rpx;
margin-bottom: 20rpx;
}
.public-wrapper .title .iconfont {
color: #2291f8;
font-size: 40upx;
margin-right: 13upx;
font-size: 40rpx;
margin-right: 13rpx;
vertical-align: middle;
}
.public-wrapper {
margin: 18upx auto 0 auto;
width: 690upx;
margin: 18rpx auto 0 auto;
width: 690rpx;
background-color: #fff;
border-radius: 10upx;
padding-top: 25upx;
border-radius: 10rpx;
padding-top: 25rpx;
.item {
.num {
@ -430,36 +432,36 @@
}
.public-wrapper .nav {
padding: 0 30upx;
height: 70upx;
line-height: 70upx;
font-size: 24upx;
padding: 0 30rpx;
height: 70rpx;
line-height: 70rpx;
font-size: 24rpx;
color: #999;
}
.public-wrapper .data {
width: 210upx;
width: 130rpx;
text-align: left;
}
.public-wrapper .browse {
width: 192upx;
width: 110rpx;
text-align: right;
}
.public-wrapper .turnover {
width: 227upx;
width: 180rpx;
text-align: right;
}
.public-wrapper .conter {
padding: 0 30upx;
padding: 0 30rpx;
}
.public-wrapper .conter .item {
border-bottom: 1px solid #f7f7f7;
height: 70upx;
font-size: 24upx;
height: 70rpx;
font-size: 24rpx;
}

View File

@ -49,12 +49,12 @@
</image>
<text class="text">运费模板</text>
</navigator>
<navigator class="item"
<!-- <navigator class="item"
:url="`/pages/users/online_warehousing/index?mer_id=${mer_id}&product_id=${data.product_id}&unique=${data.unique}&type=${mer_info.type_code}`"
hover-class='none'>
<image mode='widthFix' class="image" src="@/static/images/daoru.png"></image>
<text class="text">商品导入</text>
</navigator>
</navigator> -->
</view>
</swiper-item>
<!-- <swiper-item :class="{ active: 1 == swiperCur }">
@ -214,6 +214,9 @@
Toast,
Modal,
} from '../../../libs/uniApi.js';
import {
getPreviewProDetail
} from "@/api/store.js";
export default {
name: 'productList',
components: {
@ -243,10 +246,12 @@
//
checkboxList1: [],
data: {
attr: [],
product_id: '',
unique: "",
number: 1,
submit_info:{}
submit_info:{},
spec_type: ''
},
on_line: '',
isshow: false,
@ -375,7 +380,6 @@
mer_id: this.mer_id,
product_id: this.data.product_id,
unique: this.data.unique,
});
}
@ -383,46 +387,80 @@
},
//线
Fline(item) {
this.checkboxList1 = item.attrValue
// console.log(this.checkboxList1.length)
if (this.checkboxList1.length > 0) {
this.show = true
uni.showLoading({
title: '加载中'
})
getPreviewProDetail({
id: item.product_id
}).then(res=>{
uni.hideLoading();
let att = res.data.attr.map(e=>{
return {
value: e.attr_name,
detail: e.attr_values
}
})
this.data.attr = att;
this.data.product_id = this.checkboxList1[0].product_id
this.data.unique = this.checkboxList1[0].unique
this.data.number = this.checkboxList1[0].stock
this.data.spec_type = item.spec_type
this.data.item = item
this.on_line = 1
this.show = true;
}).catch((e)=>{
uni.hideLoading();
uni.showToast({
title: e.msg||e.message||e
})
this.show = false;
})
} else {
this.show = false
navigateTo(1, '/pages/users/online_warehousing/index', {
mer_id: this.mer_id,
product_id: this.data.product_id,
unique: this.data.unique,
});
}
},
//
creat() {
if (this.on_line == 1) {
if (this.data.number < 1) {
if(this.data.spec_type==1 && this.checkboxValue1 !== this.data.unique){
this.show = false
this.$util.Tips({
title: '请选择规格'
})
}
else if (this.data.number < 1) {
this.show = false
this.$util.Tips({
title: '入库数量不得小于一件'
})
} else {
let obj = {
"attr": [],
"attr": this.data.attr,
"attrValue": [...this.checkboxList1],
"mer_cate_id": [],
"spec_type": 0,
"mer_cate_id": this.data.item.merCateId||[],
"spec_type": this.data.spec_type,
"is_stock": 1
};
obj.attrValue[0].stock = this.data.number;
if(this.data.spec_type==1) {
obj.attrValue.forEach((item)=>{
if(item.unique==this.checkboxValue1){
item.stock = this.data.number;
}
})
// let attr = obj.attrValue.find((item)=>item.unique==this.checkboxValue1);
// attr.stock = this.data.number;
// obj.attrValue = [attr];
}
else obj.attrValue[0].stock = this.data.number;
productUpdateFree(this.data.product_id, obj).then(res => {
this.data.unique = ''
this.data.product_id = ''
@ -470,12 +508,15 @@
},
//
checkboxChange(n) {
this.data.unique = n
this.data.unique = n;
this.checkboxList1.forEach(item=>{
if(item.unique==n){
this.data.number = item.stock;
}
})
},
radioChange(n) {
this.data.product_id = n.product_id
},
//
jumpAddGoods() {

View File

@ -62,7 +62,7 @@
</view>
<view class="totalfooter" v-else>
<view class='bnt b-color'
@click="importshop(item.order_id,item.orderProduct[indexs].product_id,item.orderProduct[indexs].product_sku)">
@click="importshop(item.order_id,item.orderProduct[indexs].product_id,item.orderProduct[indexs].product_sku,item)">
立即导入</view>
</view>
<!-- <view class="totalfooter">
@ -172,18 +172,23 @@
// console.log(this.shopList);
})
},
importshop(order_id, product_id, unique) {
importshop(order_id, product_id, unique, item) {
// console.log({...item});
this.data.order_id = order_id
this.data.order_product_id = product_id
this.data.order_unique = unique
console.log(this.data)
this.show = true
this.data.unique = unique
// return ;
postImport(this.mer_id, this.data).then(res => {
console.log(res);
this.show = true
this.title = res.message
this.$util.Tips({
title: res.message
})
}).catch(e=>{
this.$util.Tips({
title: e
})
})
},
close() {

View File

@ -294,7 +294,7 @@
<emptyPage title="暂无订单~"></emptyPage>
</view>
</view>
<home></home>
<!-- <home></home> -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<payment :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id"
:totalPrice='totalPrice'></payment>