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

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
*/
export function checkedDistributionGoods(id) {
export function checkedDistributionGoods(params) {
return http.request({
url: `/distributionGoods/checked/${id}`,
url: `/distributionGoods/checked/${params.id}`,
method: Method.GET,
params
});
}

View File

@ -6,6 +6,8 @@
const dev = {
common: "https://common-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 = {

View File

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

View File

@ -1,6 +1,7 @@
<template>
<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">
<view class="title">{{
@ -18,10 +19,22 @@
</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">
<u-loadmore :status="status" :icon-type="iconType" bg-color="#f7f7f7" />
<!-- <u-empty text="暂无更多提现历史" mode="order"></u-empty> -->
</view>
</view>
</template>
@ -30,7 +43,8 @@ import { cashLog, distributionOrderList } from "@/api/goods";
export default {
data() {
return {
datas: "", //
cashLogData: [], //
achievementData: [], //,
status: "loadmore",
iconType: "flower",
empty: false,
@ -71,7 +85,18 @@ export default {
methods: {
//
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() {
@ -80,7 +105,7 @@ export default {
});
cashLog(this.params).then((res) => {
if (res.data.success && res.data.result.records.length >= 1) {
this.datas = res.data.result.records;
this.cashLogData = res.data.result.records;
} else {
this.status = "nomore";
this.empty = true;

View File

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

View File

@ -1,7 +1,7 @@
<template>
<view class="wrapper">
<!-- 筛选弹出层 -->
<u-popup width="90%" v-model="popup" mode="right">
<!-- 筛选弹出层 TODO后续版本更新 -->
<!-- <u-popup width="90%" v-model="popup" mode="right">
<view class="screen-title">商品筛选</view>
<view class="screen-view">
@ -54,7 +54,7 @@
<view class="screen-clear"> 重置 </view>
<view class="screen-submit"> 确定 </view>
</view>
</u-popup>
</u-popup> -->
<!-- 导航栏 -->
<view class="nav">
@ -66,44 +66,50 @@
<!-- 商品列表 -->
<view class="goods-list">
<view class="goods-item" v-for="(item, index) in goodsList" :key="index">
<view class="goods-item-img" @click="handleNavgationGoods(item)">
<u-image width="176rpx" height="176rpx" :src="item.thumbnail"></u-image>
</view>
<view class="goods-item-desc">
<!-- 商品描述 -->
<view class="-item-title" @click="handleNavgationGoods(item)">
{{ item.goodsName }}
<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)">
<u-image width="176rpx" height="176rpx" :src="item.thumbnail"></u-image>
</view>
<!-- 商品金额 -->
<view class="-item-price" @click="handleNavgationGoods(item)">
佣金:
<span> {{ item.commission | unitPrice }}</span>
</view>
<!-- 比率佣金 -->
<view class="-item-bottom">
<view class="-item-bootom-money" @click="handleNavgationGoods(item)">
<!-- <view class="-item-bl">
<view class="goods-item-desc">
<!-- 商品描述 -->
<view class="-item-title" @click="handleNavgationGoods(item)">
{{ item.goodsName }}
</view>
<!-- 商品金额 -->
<view class="-item-price" @click="handleNavgationGoods(item)">
佣金:
<span> {{ item.commission | unitPrice }}</span>
</view>
<!-- 比率佣金 -->
<view class="-item-bottom">
<view class="-item-bootom-money" @click="handleNavgationGoods(item)">
<!-- <view class="-item-bl">
比率:
<span>{{ "5.00%" }}</span>
</view> -->
<view class="-item-yj">
<span>{{ item.price | unitPrice }}</span>
<view class="-item-yj">
<span>{{ item.price | unitPrice }}</span>
</view>
</view>
<view>
<view class="click" v-if="!params.checked" @click="handleClickGoods(item)"></view>
<view class="click" v-if="params.checked" @click="handleLink(item)"></view>
</view>
</view>
<view>
<view class="click" v-if="!params.checked" @click="handleClickGoods(item)"></view>
<view class="click" v-if="params.checked" @click="handleLink(item)"></view>
</view>
</view>
</view>
</view>
</div>
</u-swipe-action>
<view class="empty">
<!-- <u-empty v-if="empty" text="没有分销商品了" mode="list"></u-empty> -->
</view>
</view>
<canvas class="canvas-hide" canvas-id="qrcode" />
<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>
</template>
@ -118,6 +124,17 @@ import drawCanvas from "@/components/m-canvas";
export default {
data() {
return {
lightColor: this.$lightColor,
deleteContent: "解绑该商品?", //
//
options: [
{
text: "解绑",
style: {
backgroundColor: this.$lightColor, //
},
},
],
showFlag: false, //
empty: false,
popup: false, //
@ -147,6 +164,8 @@ export default {
},
routers: "",
deleteShow: false, //
goodsVal: false, //
};
},
components: {
@ -163,6 +182,46 @@ export default {
this.init();
},
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) {
uni.navigateTo({
url: `/pages/product/goods?id=${val.skuId}&goodsId=${val.id}`,
@ -218,7 +277,7 @@ export default {
title: "加载中",
mask: true,
});
checkedDistributionGoods(val.id).then((res) => {
checkedDistributionGoods({ id: val.id, checked: true }).then((res) => {
uni.hideLoading();
if (res.data.success) {
uni.showToast({
@ -243,6 +302,9 @@ export default {
uni.hideLoading();
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);
}
if (this.goodsList.length == 0) {

View File

@ -3,6 +3,9 @@
<view class="u-tabs-box">
<u-tabs bg-color="#fff" :list="list" :is-scroll="false" :current="current" @change="change" :active-color="$lightColor"></u-tabs>
</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">
<view class="seller-view" v-for="(order, orderIndex) in orderList" :key="orderIndex">
<!-- 店铺名称 -->
@ -135,15 +138,20 @@ export default {
status: "loadmore",
};
},
onLoad() {
onLoad(options) {
this.orderList = [];
this.params.pageNumber = 1;
if (options.orderSn) this.params.orderSn = options.orderSn;
this.getOrderList(this.current);
},
onPullDownRefresh() {
this.change(this.current);
},
methods: {
handleGetOrderList(current) {
this.orderList = [];
this.getOrderList(current);
},
/**
* 切换tab页时初始化数据
*/
@ -220,7 +228,6 @@ export default {
price: item.flowPrice,
},
];
});
this.orderList = this.orderList.concat(afterSaleLogList);
@ -296,9 +303,12 @@ page,
height: 100%;
}
.body-view {
// height: calc(100vh - 44px -40px);
// overflow-y: auto;
height: 100%;
overflow-y: auto;
height: calc(100vh - 44px - 80rpx - 104rpx);
}
.u-tabs-search {
padding: 20rpx;
background: #fff;
}
.countMoney {
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>
<u-button ripple shape="circle" class="cancel-btn" size="mini" v-if="order.groupAfterSaleStatus=='NOT_APPLIED'" @click="applyService(order)">
退款/售后
</u-button>
<!-- TODO 后续完善 -->
<!-- <u-button ripple shape="circle" class="rebuy-btn" size="mini" v-if="
order.orderStatus === 'CANCELLED' ||
@ -91,7 +94,7 @@
</view>
</u-popup>
<u-toast ref="uToast" />
<u-modal :confirm-color="lightColor" v-model="rogShow" :show-cancel-button="true" :content="'是否确认收货?'" @confirm="confirmRog"></u-modal>
<u-modal :confirm-color="lightColor" v-model="rogShow" :show-cancel-button="true" :content="'是否确认收货?'" @confirm="confirmRog"></u-modal>
</view>
</template>
@ -106,7 +109,7 @@ export default {
},
data() {
return {
lightColor:this.$lightColor,
lightColor: this.$lightColor,
tabCurrentIndex: 0, //
navList: [
//list
@ -203,6 +206,8 @@ export default {
this.loadData(this.status);
},
onLoad(options) {
/**
* 修复app端点击除全部订单外的按钮进入时不加载数据的问题
@ -230,6 +235,18 @@ export default {
},
},
methods: {
//
applyService(order){
uni.navigateTo({
url: `/pages/order/afterSales/afterSales?orderSn=${order.sn}`
});
},
//
navigateToStore(val) {
uni.navigateTo({
@ -309,9 +326,8 @@ export default {
this.navList[index].loadStatus = "noMore";
}
if (orderList.length > 0) {
this.navList[index].orderList = this.navList[index].orderList.concat(
orderList
);
this.navList[index].orderList =
this.navList[index].orderList.concat(orderList);
this.navList[index].pageNumber += 1;
}
});
@ -458,14 +474,11 @@ export default {
* 重新购买
*/
reBuy(order) {
console.log(order)
return
console.log(order);
return;
uni.navigateTo({
url:
"/pages/product/goods?id=" +
order.id +
"&goodsId=" +
order.goodsId,
"/pages/product/goods?id=" + order.id + "&goodsId=" + order.goodsId,
});
},
@ -673,5 +686,4 @@ page,
margin-left: 15rpx;
height: 60rpx;
}
</style>

View File

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

View File

@ -100,13 +100,12 @@
<span>.{{ formatPrice(skuItem.priceDetailDTO.flowPrice)[1] }} </span>
</div>
</p>
</view>
</view>
</u-swipe-action>
</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">
<view class="navL">