更新功能

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

View File

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

View File

@ -62,7 +62,7 @@
</view> </view>
<view class="totalfooter" v-else> <view class="totalfooter" v-else>
<view class='bnt b-color' <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> </view>
<!-- <view class="totalfooter"> <!-- <view class="totalfooter">
@ -172,18 +172,23 @@
// console.log(this.shopList); // 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_id = order_id
this.data.order_product_id = product_id this.data.order_product_id = product_id
this.data.order_unique = unique this.data.order_unique = unique
console.log(this.data) this.data.unique = unique
this.show = true // return ;
postImport(this.mer_id, this.data).then(res => { postImport(this.mer_id, this.data).then(res => {
console.log(res); this.show = true
this.title = res.message this.title = res.message
this.$util.Tips({ this.$util.Tips({
title: res.message title: res.message
}) })
}).catch(e=>{
this.$util.Tips({
title: e
})
}) })
}, },
close() { close() {

View File

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