Commit e74e96ee by 赵雅纹

Merge branch 'dev_7.1.0' into fixbug-ZYW

parents fdc50988 37e741f8
......@@ -121,5 +121,6 @@ App({
// brandId: 2005,
// brandId: 1001,
brandId: 1002,
// brandId: 3001,
}
})
......@@ -4,7 +4,7 @@ const needMock = '' //
// appid_dev_wx wxc3b64b09b1d3dfc2
// appid_test_wx wx857ea77f4f7f4f34 wxac09792264c49b5c
// appid_pre_711 wx358b56af62edbde1
// appid_prod_711 wx700028bf32a3be66
// appid_prod_711 wx700028bf32a3be66 wx313ec36b710125d4---3001
// 1 2 3 步!!!!!!!!!!!!!!!!!!!!!! prod appid brandId
......
......@@ -97,8 +97,8 @@
<!-- <image class="bottom-image" src="/assets/imgs/7_1_0/explain.png" /> -->
</view>
</view>
<view class="vip-right">
<view class="right-check-status" bindtap="handelChangeSelectVip">
<view class="vip-right df" bindtap="handelChangeSelectVip">
<view class="right-check-status">
<image class="check-status-img" src="{{isSelect ? '/assets/imgs/7_1_0/08_22/trade-success.png' : '/assets/imgs/7_1_0/08_22/trade-unsel.png'}}" />
</view>
<view class="right-check-tips {{isSelect? 'tip-check' : 'tip-un-check'}}">
......@@ -130,7 +130,7 @@
<view>
<text class="price-label">优惠券</text>
<view class="select-coupon" bindtap="selectCoupon">
<text class="{{defalutCoupon ? 'coupon-price' : 'no-coupon'}}"> {{defalutCoupon?'-': '无可用优惠券'}}{{currentCoupon ? currentCoupon : defalutCoupon}}{{defalutCoupon?'元': ''}}</text>
<text class="{{defalutCoupon ? 'coupon-price' : 'no-coupon'}}"> {{defalutCoupon?'-': '无可用优惠券'}}{{currentCoupon ? currentCoupon : defalutCoupon}}</text>
<image class="arrow-right" src="/assets/imgs/7_1_0/arrow-right.png" />
</view>
</view>
......
......@@ -9,6 +9,10 @@
.address-wrap{
padding: 0 30rpx;
}
.vip-right {
width: 100rpx;
height: 100rpx;
}
.address-section{
display: flex;
justify-content: space-between;
......@@ -278,10 +282,10 @@
.tip-check {
width: 155rpx;
height: 55rpx;
right: 4rpx;
right: 33rpx;
}
.tip-un-check {
width: 100rpx;
height: 55rpx;
right: 0rpx;
right: 33rpx;
}
\ No newline at end of file
......@@ -21,10 +21,15 @@
>
<view class="order-list">
<view class="order-header">
<view class="order-number">
<view class="order-number" wx:if="{{currentIndex == 5}}">
<text>退单号</text>
<text class="number"> {{item.tradeId}}</text>
</view>
<view class="order-number" wx:else>
<text>订单号</text>
<text class="number">{{item.id}}</text>
</view>
<!--订单状态(C:取消;N:新建,P:已支付;D:已发货;R:已收货) 关闭 取消 新建 待付款 已支付 待发货 已发货 待收货 已完成 已收货 交易关闭 取消-->
<!--退单状态(C:取消;N:新建;A:已审核;R:已拒绝;R:退货已发;D:退货已收货)-->
<!-- RJ-退款驳回 R-退货中 N-待审核 A-待寄回 C-退款取消 D-退款成功 退款中 -->
......@@ -172,7 +177,7 @@
当前无数据
</view>
</view>
<apply-refund show="{{showApplyRefundModal}}" refundId="{{refundId}}" bind:ok="onDeliveryOk"/>
<apply-refund show="{{showApplyRefundModal}}" refundId="{{refundId}}" bind:ok="onDeliveryOk" />
<!--goHome-->
<go-home/>
......@@ -23,36 +23,16 @@ wxService.page({
value: 0,
name: '请选择'
},
resonType: [{ // 所有退货原因
value: 0,
name: '请选择'
}, {
value: 1,
name: '质量问题'
}, {
value: 2,
name: '大小尺码问题'
}, {
value: 3,
name: '不想要了'
}, {
value: 4,
name: '卖家发错漏发'
}, {
value: 5,
name: '拍错商品'
}, {
value: 6,
name: '商品实物与描述不同'
}],
// 所有退货原因
resonType: [],
refundAmount: 0,
checkedColor: 'rgb(203, 60, 60)',
pics: [],
id: ''
id: '',
returnOrder: 0
},
submitRefund() {
var selectGoods = this.data.cartList.filter(item => item.checked)
if (selectGoods.length == 0) {
wx.showToast({
title: '请选择退款商品',
......@@ -60,7 +40,6 @@ wxService.page({
})
return false
}
if (this.data.curType.value == 0) {
wx.showToast({
title: '请选择退款原因',
......@@ -69,10 +48,17 @@ wxService.page({
return false
}
console.log('selectGoods', selectGoods)
let skulist = [];
selectGoods.forEach(item=>{
const {skuId,count} = item;
skulist.push({
skuId,
count
})
});
this.reFundPreview({skuList:skulist})
var refundCreateDto = this.data.refundCreateDto
// refundCreateDto.reason = this.data.curType.value // 退款原因
refundCreateDto.reason = this.data.curType.name // 退款原因
refundCreateDto.skuList = selectGoods.map(function (item) {
......@@ -82,12 +68,7 @@ wxService.page({
skuId: item.skuId
}
})
console.log('refundCreateDto', refundCreateDto)
this.handelRequestRefund(refundCreateDto)
this.handelRequestRefund(refundCreateDto)
},
handelRequestRefund(params) {
wx.showLoading({
......@@ -119,22 +100,20 @@ wxService.page({
mask: true
})
const refundReason = {}
const { resonType } = this.data
wxService.post('/sale/refund/reason/buyer/sortAll', refundReason).then(res => {
if (res) {
const { result, data } = res.data
if (result == 0) {
wx.hideLoading()
let newReasonList = []
data.forEach((item, index) => {
let params = {
value: '',
name: ''
}
params.name = item.reason
params.value = index
newReasonList.push(params)
})
let newReasonList = [];
data.forEach((item,index)=>{
const {reason} = item;
newReasonList.push({
name: reason,
value: index + 1
})
});
this.setData({
resonType: newReasonList
})
......@@ -163,6 +142,8 @@ wxService.page({
}
this.setData({
cartList
},()=>{
this.getReturnPrice()
})
},
changeRemark(event) { // 备注
......@@ -194,8 +175,8 @@ wxService.page({
this.setData({
cartList: cartList
}, () => {
// this.getReturnPrice()
// this.editOk(cartList[e]) //调用完成
this.getReturnPrice()
this.editOk(cartList[index]) //调用完成
})
},
addNum: function (e) { // 增加数量
......@@ -210,33 +191,62 @@ wxService.page({
this.setData({
cartList: cartList
}, () => {
this.getReturnPrice()
this.editOk(cartList[index]) //调用完成
})
},
inputNum: function (e) { // 输入数量
blurNum: function (e) { // 输入数量
var newNum = e.detail.value
var order = this.data.cartList
var cartList = this.data.cartList
var index = e.currentTarget.dataset.index
var refundNum = cartList[index].count
var refundNum = order[index].count
console.log('inputNum', index, newNum, refundNum)
if (newNum === '' || newNum === '0') {
newNum = 1
} else {
newNum = parseInt(newNum)
if (newNum > refundNum) {
newNum = refundNum
} else {
newNum = newNum
}
}
order[index].count = refundNum
cartList[index].count = newNum
this.setData({
order: order
cartList: cartList
}, () => {
// this.getReturnPrice()
this.getReturnPrice()
this.editOk(cartList[index]) //调用完成
})
},
editOk(cartPro){
let skulist = [];
const {skuId,count} = cartPro;
skulist.push({
skuId,
count
})
this.reFundPreview({skuList:skulist}) // 退款预览
},
getReturnPrice() {
var cartList = this.data.cartList
var returnPrice = 0
for (let i = 0; i < cartList.length; i++) {
if (cartList[i].checked) {
returnPrice += cartList[i].price * (cartList[i].count ? cartList[i].count : 1)
}
}
this.setData({
returnOrder:returnPrice
})
},
/**
* 生命周期函数--监听页面加载
*/
......@@ -257,7 +267,7 @@ wxService.page({
onShow: function () {
const { params } = this.options
let detail = JSON.parse(params)
console.log("detail", detail)
console.log("detail", detail)
// item.checked
detail.skuVOList.forEach(item => {
item.checked = false
......@@ -272,7 +282,23 @@ console.log("detail", detail)
this.getReasonList()
})
},
reFundPreview(cartPro={}) {
const params = {
refundCreateDto: {...cartPro}
}
wx.showLoading({
title: '加载中',
mask: true
})
wxService.post(`/sale/refund/buyer/preview`,params).then(res => {
if (res) {
const { result, data } = res.data
if (result == 0) {
wx.hideLoading()
}
}
})
},
/**
* 生命周期函数--监听页面隐藏
*/
......
......@@ -26,7 +26,7 @@
class="pro-num-edit-input"
type="number"
data-index="{{index}}"
bindinput="inputNum"
bindblur="blurNum"
value="{{item.count}}"
/>
<button class="add-num" data-index="{{index}}" catchtap="addNum">+</button>
......@@ -56,7 +56,7 @@
<view class="form">
<view class="form-label">退款金额</view>
<view class="form-picker">
<text class="refund-price">¥{{refundAmount}}</text>
<text class="refund-price">¥{{returnOrder}}</text>
</view>
</view>
<view class="form">
......
......@@ -39,7 +39,7 @@
"list": []
},
"miniprogram": {
"current": 25,
"current": 23,
"list": [
{
"id": -1,
......@@ -183,24 +183,24 @@
"scene": null
},
{
"id": 23,
"id": 22,
"name": "退单详情",
"pathName": "pages/refundDetail/refundDetail",
"query": "id=614542180811411456",
"query": "id=625052614006149120",
"scene": null
},
{
"id": 24,
"id": 23,
"name": "退款申请",
"pathName": "pages/refund/refund",
"query": "params={\"id\":\"614116644096184320\",\"memberId\":\"598887367880871936\",\"status\":\"P\",\"skuVOList\":[{\"productId\":\"1556108606443006\",\"productCode\":\"test001\",\"productName\":\"test001\",\"skuId\":\"1556108807316001\",\"skuCode\":\"test001-4\",\"skuSpec\":\"颜色:白,尺寸:xl\",\"count\":1,\"price\":0.03,\"discount\":0,\"mainImgUrl\":\"http://testimg3.bigaka.com/group3/M00/00/17/Cv6CBF1Z9TKAU6T1AAAG8CvHO2o415.png\",\"amount\":0.03}],\"createTime\":\"2019-08-22 15:20:17\",\"payTime\":\"2019-08-22 15:20:42\",\"discount\":0,\"freightMoney\":0,\"payAmount\":0.03,\"skuCount\":1}",
"query": "params={\"id\":\"625333960830095360\",\"memberId\":\"598914337624711168\",\"status\":\"P\",\"skuVOList\":[{\"productId\":\"624190866919264256\",\"productCode\":\"bianma-zyh-1yuan\",\"productName\":\"zyh标准1元商品-棒棒糖\",\"skuId\":\"624250996851478528\",\"skuCode\":\"sku-zhenzhibang-strawberry\",\"skuSpec\":\"口味:草莓\",\"count\":1,\"price\":0.7,\"discount\":0,\"discountFromCoupon\":0,\"mainImgUrl\":\"https://img3.bigaka.com/test/1002/201909/20190919/1002cd48315e-ef68-49d1-9411-d0eea0cfc0dd.jpg\",\"amount\":0.7},{\"productId\":\"623232471294676992\",\"productCode\":\"guniangguo\",\"productName\":\"姑娘果\",\"skuId\":\"623232471298871296\",\"skuCode\":\"sku-gunaingguo-huang\",\"skuSpec\":\"颜色:黄\",\"count\":4,\"price\":0.01,\"discount\":0,\"discountFromCoupon\":0,\"mainImgUrl\":\"https://img3.bigaka.com/test/1002/201909/20190916/10025624b093-23d7-44bc-9f55-2e070bab726b.jpg\",\"amount\":0.04}],\"createTime\":\"2019-09-22 14:13:54\",\"payTime\":\"2019-09-22 14:14:34\",\"freightMoney\":10,\"logistic\":{\"receiverId\":\"624293464875606016\",\"receiverInfo\":\"上海,上海市,浦东新区,浦东,张三,020-8116788\"},\"payAmount\":10.74,\"promotionDiscount\":0,\"coouponDiscount\":0,\"skuAmount\":0.74,\"skuCount\":5}",
"scene": null
},
{
"id": 25,
"id": 24,
"name": "订单详情",
"pathName": "pages/orderDetail/orderDetail",
"query": "id=616360692727025664",
"query": "id=625052614006149120",
"scene": null
},
{
......
<!--subPackage/page/pages/myReleaseDetail.wxml-->
<wxs src="../../wxs/utils.wxs" module="utils" />
<wxs src="../../../../wxs/utils.wxs" module="utils" />
<view class="release-detail">
<!-- <view class="detail-img">
......
......@@ -535,6 +535,8 @@ class WXService extends Http {
const page = this
_self.currentPage = page
config.onShow && config.onShow.apply(page, args)
wx.removeStorageSync('_premiumExpireTime')
const baseUserInfo = wx.getStorageSync('_baseUserInfo')
const premiumExpireTime = baseUserInfo && baseUserInfo.member && baseUserInfo.member.premiumExpireTime || ''
wx.setStorageSync('_premiumExpireTime', premiumExpireTime)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment