分销商铺解绑,优化商品售后部分的流程

master
lemon橪 2021-07-01 11:16:46 +08:00
parent 4599b02a41
commit ef51049ed4
10 changed files with 173 additions and 65 deletions

View File

@ -197,10 +197,11 @@ export function distributionGoods(params) {
/** /**
* 选择分销商品 分销商品id * 选择分销商品 分销商品id
*/ */
export function checkedDistributionGoods(id) { export function checkedDistributionGoods(params) {
return http.request({ return http.request({
url: `/distributionGoods/checked/${id}`, url: `/distributionGoods/checked/${params.id}`,
method: Method.GET, method: Method.GET,
params
}); });
} }

View File

@ -6,6 +6,8 @@
const dev = { const dev = {
common: "https://common-api.pickmall.cn", common: "https://common-api.pickmall.cn",
buyer: "https://buyer-api.pickmall.cn", buyer: "https://buyer-api.pickmall.cn",
// common: "http://192.168.0.109:8890",
// buyer: "http://192.168.0.109:8888",
}; };
// 生产环境 // 生产环境
const prod = { const prod = {

View File

@ -2,8 +2,8 @@
"name" : "lili商城", "name" : "lili商城",
"appid" : "__UNI__C100675", "appid" : "__UNI__C100675",
"description" : "", "description" : "",
"versionName" : "4.0.21", "versionName" : "4.0.22",
"versionCode" : 4000021, "versionCode" : 4000022,
"transformPx" : false, "transformPx" : false,
"app-plus" : { "app-plus" : {
"compatible" : { "compatible" : {

View File

@ -1,6 +1,7 @@
<template> <template>
<view class="log-list"> <view class="log-list">
<view class="log-way" v-for="(item, index) in datas" :key="index"> <!-- 提现记录 -->
<view class="log-way" v-if="cashLogData.length != 0" v-for="(item, index) in cashLogData" :key="index">
<view class="log-item"> <view class="log-item">
<view class="log-item-view"> <view class="log-item-view">
<view class="title">{{ <view class="title">{{
@ -18,10 +19,22 @@
</view> </view>
</view> </view>
</view> </view>
<!-- 分销业绩 -->
<view class="log-way" v-if="achievementData.length != 0" v-for="(item, index) in achievementData" :key="index">
<view class="log-item">
<view class="log-item-view">
<view class="title">{{item.goodsName}}</view>
<view class="price">+{{ item.rebate | unitPrice }}</view>
</view>
<view class="log-item-view">
<view>{{ item.createTime }}</view>
<view>{{item.storeName}}</view>
</view>
</view>
</view>
<view class="empty" v-if="empty"> <view class="empty" v-if="empty">
<u-loadmore :status="status" :icon-type="iconType" bg-color="#f7f7f7" /> <u-loadmore :status="status" :icon-type="iconType" bg-color="#f7f7f7" />
<!-- <u-empty text="暂无更多提现历史" mode="order"></u-empty> -->
</view> </view>
</view> </view>
</template> </template>
@ -30,7 +43,8 @@ import { cashLog, distributionOrderList } from "@/api/goods";
export default { export default {
data() { data() {
return { return {
datas: "", // cashLogData: [], //
achievementData: [], //,
status: "loadmore", status: "loadmore",
iconType: "flower", iconType: "flower",
empty: false, empty: false,
@ -71,7 +85,18 @@ export default {
methods: { methods: {
// //
achievement() { achievement() {
distributionOrderList(this.achParams).then((res) => {}); uni.showLoading({
title: "加载中",
});
distributionOrderList(this.achParams).then((res) => {
if (res.data.success && res.data.result.records.length >= 1) {
this.achievementData = res.data.result.records;
} else {
this.status = "nomore";
this.empty = true;
}
uni.hideLoading();
});
}, },
// //
history() { history() {
@ -80,7 +105,7 @@ export default {
}); });
cashLog(this.params).then((res) => { cashLog(this.params).then((res) => {
if (res.data.success && res.data.result.records.length >= 1) { if (res.data.success && res.data.result.records.length >= 1) {
this.datas = res.data.result.records; this.cashLogData = res.data.result.records;
} else { } else {
this.status = "nomore"; this.status = "nomore";
this.empty = true; this.empty = true;

View File

@ -82,7 +82,7 @@ export default {
}); });
}, },
}, },
mounted() { onShow() {
this.init(); this.init();
}, },
}; };
@ -90,21 +90,15 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.nav { .nav {
// height: 176rpx;
background: #fff; background: #fff;
align-items: center; align-items: center;
display: flex; display: flex;
// border-radius: 20rpx;
// transform: translateY(-20rpx);
// box-shadow: 4rpx 10rpx 22rpx rgba(0, 0, 0, 0.1);
flex-wrap: wrap; flex-wrap: wrap;
} }
.nav-list { .nav-list {
color: #fff; color: #fff;
padding: 40rpx 0; padding: 40rpx 0;
background: $aider-light-color; background: $aider-light-color;
// border-bottom-left-radius: 100rpx;
// border-bottom-right-radius: 100rpx;
} }
.total { .total {
padding: 10rpx 0; padding: 10rpx 0;

View File

@ -1,7 +1,7 @@
<template> <template>
<view class="wrapper"> <view class="wrapper">
<!-- 筛选弹出层 --> <!-- 筛选弹出层 TODO后续版本更新 -->
<u-popup width="90%" v-model="popup" mode="right"> <!-- <u-popup width="90%" v-model="popup" mode="right">
<view class="screen-title">商品筛选</view> <view class="screen-title">商品筛选</view>
<view class="screen-view"> <view class="screen-view">
@ -54,7 +54,7 @@
<view class="screen-clear"> 重置 </view> <view class="screen-clear"> 重置 </view>
<view class="screen-submit"> 确定 </view> <view class="screen-submit"> 确定 </view>
</view> </view>
</u-popup> </u-popup> -->
<!-- 导航栏 --> <!-- 导航栏 -->
<view class="nav"> <view class="nav">
@ -66,7 +66,10 @@
<!-- 商品列表 --> <!-- 商品列表 -->
<view class="goods-list"> <view class="goods-list">
<view class="goods-item" v-for="(item, index) in goodsList" :key="index"> <u-swipe-action v-for="(item, index) in goodsList" :disabled="!params.checked" :show="item.___selected" @open="openAction(item)" :index="index" :options="options" bg-color="#fff"
ref="swiperAction" :key="item.id" @click="changeActionTab(item)">
<div class="goods-item">
<view class="goods-item-img" @click="handleNavgationGoods(item)"> <view class="goods-item-img" @click="handleNavgationGoods(item)">
<u-image width="176rpx" height="176rpx" :src="item.thumbnail"></u-image> <u-image width="176rpx" height="176rpx" :src="item.thumbnail"></u-image>
</view> </view>
@ -97,13 +100,16 @@
</view> </view>
</view> </view>
</view> </view>
</view> </div>
</u-swipe-action>
<view class="empty"> <view class="empty">
<!-- <u-empty v-if="empty" text="没有分销商品了" mode="list"></u-empty> --> <!-- <u-empty v-if="empty" text="没有分销商品了" mode="list"></u-empty> -->
</view> </view>
</view> </view>
<canvas class="canvas-hide" canvas-id="qrcode" /> <canvas class="canvas-hide" canvas-id="qrcode" />
<drawCanvas ref="drawCanvas" v-if="showFlag" :res="res" /> <drawCanvas ref="drawCanvas" v-if="showFlag" :res="res" />
<u-modal v-model="deleteShow" :confirm-style="{'color':lightColor}" @confirm="delectConfirm" show-cancel-button :content="deleteContent" :async-close="true"></u-modal>
</view> </view>
</template> </template>
@ -118,6 +124,17 @@ import drawCanvas from "@/components/m-canvas";
export default { export default {
data() { data() {
return { return {
lightColor: this.$lightColor,
deleteContent: "解绑该商品?", //
//
options: [
{
text: "解绑",
style: {
backgroundColor: this.$lightColor, //
},
},
],
showFlag: false, // showFlag: false, //
empty: false, empty: false,
popup: false, // popup: false, //
@ -147,6 +164,8 @@ export default {
}, },
routers: "", routers: "",
deleteShow: false, //
goodsVal: false, //
}; };
}, },
components: { components: {
@ -163,6 +182,46 @@ export default {
this.init(); this.init();
}, },
methods: { methods: {
/**
* 滑动删除
*/
changeActionTab(val) {
this.deleteShow = true;
this.goodsVal = val;
},
/**
* 点击解绑商品
*/
delectConfirm() {
checkedDistributionGoods({ id: this.goodsVal.id, checked: false }).then(
(res) => {
if (res.data.success) {
uni.showToast({
title: "此商品解绑成功",
duration: 2000,
});
this.deleteShow = false;
this.goodsList = [];
this.init();
}
}
);
},
/**
* 左滑打开删除
*/
openAction(val) {
this.goodsList.forEach((item) => {
this.$set(item, "___selected", false);
});
this.$set(val, "___selected", true);
},
/**
* 查看图片
*/
handleNavgationGoods(val) { handleNavgationGoods(val) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/product/goods?id=${val.skuId}&goodsId=${val.id}`, url: `/pages/product/goods?id=${val.skuId}&goodsId=${val.id}`,
@ -218,7 +277,7 @@ export default {
title: "加载中", title: "加载中",
mask: true, mask: true,
}); });
checkedDistributionGoods(val.id).then((res) => { checkedDistributionGoods({ id: val.id, checked: true }).then((res) => {
uni.hideLoading(); uni.hideLoading();
if (res.data.success) { if (res.data.success) {
uni.showToast({ uni.showToast({
@ -243,6 +302,9 @@ export default {
uni.hideLoading(); uni.hideLoading();
if (res.data.success && res.data.result.records.length >= 1) { if (res.data.success && res.data.result.records.length >= 1) {
res.data.result.records.forEach((item) => {
this.$set(item, "___selected", false);
});
this.goodsList.push(...res.data.result.records); this.goodsList.push(...res.data.result.records);
} }
if (this.goodsList.length == 0) { if (this.goodsList.length == 0) {

View File

@ -3,6 +3,9 @@
<view class="u-tabs-box"> <view class="u-tabs-box">
<u-tabs bg-color="#fff" :list="list" :is-scroll="false" :current="current" @change="change" :active-color="$lightColor"></u-tabs> <u-tabs bg-color="#fff" :list="list" :is-scroll="false" :current="current" @change="change" :active-color="$lightColor"></u-tabs>
</view> </view>
<div class="u-tabs-search">
<u-search placeholder="请输入订单编号" @search="handleGetOrderList(current)" @clear="handleGetOrderList(current)" @custom="handleGetOrderList(current)" v-model="params.orderSn"></u-search>
</div>
<scroll-view class="body-view" scroll-y @scrolltolower="renderDate"> <scroll-view class="body-view" scroll-y @scrolltolower="renderDate">
<view class="seller-view" v-for="(order, orderIndex) in orderList" :key="orderIndex"> <view class="seller-view" v-for="(order, orderIndex) in orderList" :key="orderIndex">
<!-- 店铺名称 --> <!-- 店铺名称 -->
@ -135,15 +138,20 @@ export default {
status: "loadmore", status: "loadmore",
}; };
}, },
onLoad() { onLoad(options) {
this.orderList = []; this.orderList = [];
this.params.pageNumber = 1; this.params.pageNumber = 1;
if (options.orderSn) this.params.orderSn = options.orderSn;
this.getOrderList(this.current); this.getOrderList(this.current);
}, },
onPullDownRefresh() { onPullDownRefresh() {
this.change(this.current); this.change(this.current);
}, },
methods: { methods: {
handleGetOrderList(current) {
this.orderList = [];
this.getOrderList(current);
},
/** /**
* 切换tab页时初始化数据 * 切换tab页时初始化数据
*/ */
@ -220,7 +228,6 @@ export default {
price: item.flowPrice, price: item.flowPrice,
}, },
]; ];
}); });
this.orderList = this.orderList.concat(afterSaleLogList); this.orderList = this.orderList.concat(afterSaleLogList);
@ -296,9 +303,12 @@ page,
height: 100%; height: 100%;
} }
.body-view { .body-view {
// height: calc(100vh - 44px -40px); overflow-y: auto;
// overflow-y: auto; height: calc(100vh - 44px - 80rpx - 104rpx);
height: 100%; }
.u-tabs-search {
padding: 20rpx;
background: #fff;
} }
.countMoney { .countMoney {
margin-left: 7rpx; margin-left: 7rpx;

View File

@ -57,6 +57,9 @@
<u-button ripple :customStyle="{'background':lightColor,'color':'#fff' }" shape="circle" class="pay-btn" size="mini" v-if="order.allowOperationVO.rog" @click="onRog(order.sn)"> <u-button ripple :customStyle="{'background':lightColor,'color':'#fff' }" shape="circle" class="pay-btn" size="mini" v-if="order.allowOperationVO.rog" @click="onRog(order.sn)">
确认收货 确认收货
</u-button> </u-button>
<u-button ripple shape="circle" class="cancel-btn" size="mini" v-if="order.groupAfterSaleStatus=='NOT_APPLIED'" @click="applyService(order)">
退款/售后
</u-button>
<!-- TODO 后续完善 --> <!-- TODO 后续完善 -->
<!-- <u-button ripple shape="circle" class="rebuy-btn" size="mini" v-if=" <!-- <u-button ripple shape="circle" class="rebuy-btn" size="mini" v-if="
order.orderStatus === 'CANCELLED' || order.orderStatus === 'CANCELLED' ||
@ -203,6 +206,8 @@ export default {
this.loadData(this.status); this.loadData(this.status);
}, },
onLoad(options) { onLoad(options) {
/** /**
* 修复app端点击除全部订单外的按钮进入时不加载数据的问题 * 修复app端点击除全部订单外的按钮进入时不加载数据的问题
@ -230,6 +235,18 @@ export default {
}, },
}, },
methods: { methods: {
//
applyService(order){
uni.navigateTo({
url: `/pages/order/afterSales/afterSales?orderSn=${order.sn}`
});
},
// //
navigateToStore(val) { navigateToStore(val) {
uni.navigateTo({ uni.navigateTo({
@ -309,9 +326,8 @@ export default {
this.navList[index].loadStatus = "noMore"; this.navList[index].loadStatus = "noMore";
} }
if (orderList.length > 0) { if (orderList.length > 0) {
this.navList[index].orderList = this.navList[index].orderList.concat( this.navList[index].orderList =
orderList this.navList[index].orderList.concat(orderList);
);
this.navList[index].pageNumber += 1; this.navList[index].pageNumber += 1;
} }
}); });
@ -458,14 +474,11 @@ export default {
* 重新购买 * 重新购买
*/ */
reBuy(order) { reBuy(order) {
console.log(order) console.log(order);
return return;
uni.navigateTo({ uni.navigateTo({
url: url:
"/pages/product/goods?id=" + "/pages/product/goods?id=" + order.id + "&goodsId=" + order.goodsId,
order.id +
"&goodsId=" +
order.goodsId,
}); });
}, },
@ -673,5 +686,4 @@ page,
margin-left: 15rpx; margin-left: 15rpx;
height: 60rpx; height: 60rpx;
} }
</style> </style>

View File

@ -102,10 +102,12 @@ export default {
duration: 2000, duration: 2000,
icon: "none", icon: "none",
}); });
this.flage = false;
} }
}) })
.catch((e) => { .catch((e) => {
this.$refs.uCode.start(); this.flage = false;
this.codeFlag = true;
}); });
} else { } else {
this.$u.toast("请倒计时结束后再发送"); this.$u.toast("请倒计时结束后再发送");
@ -209,6 +211,7 @@ export default {
uni.hideLoading(); uni.hideLoading();
}, 2000); }, 2000);
} }
if (!this.$u.test.mobile(this.codeForm.mobile)) { if (!this.$u.test.mobile(this.codeForm.mobile)) {
uni.showToast({ uni.showToast({
title: "请输入正确手机号", title: "请输入正确手机号",

View File

@ -100,13 +100,12 @@
<span>.{{ formatPrice(skuItem.priceDetailDTO.flowPrice)[1] }} </span> <span>.{{ formatPrice(skuItem.priceDetailDTO.flowPrice)[1] }} </span>
</div> </div>
</p>
</view> </view>
</view> </view>
</u-swipe-action> </u-swipe-action>
</div> </div>
</div> </div>
<u-modal v-model="deleteShow" @delectConfirm="delectConfirm" show-cancel-button :content="deleteContent" :async-close="true"></u-modal> <u-modal v-model="deleteShow" :confirm-style="{'color':lightColor}" @confirm="delectConfirm" show-cancel-button :content="deleteContent" :async-close="true"></u-modal>
<!-- 结账 --> <!-- 结账 -->
<div class="box box6"> <div class="box box6">
<view class="navL"> <view class="navL">