商品售后余下功能
This commit is contained in:
parent
6661b4dd3d
commit
ac9c2ffa33
File diff suppressed because one or more lines are too long
|
|
@ -914,6 +914,12 @@ button.cuIcon.lg {
|
|||
font-size: 2.5em;
|
||||
}
|
||||
|
||||
.cu-avatar.xxl {
|
||||
width: 156upx;
|
||||
height: 156upx;
|
||||
font-size: 2.5em;
|
||||
}
|
||||
|
||||
.cu-avatar .avatar-text {
|
||||
font-size: 0.4em;
|
||||
}
|
||||
|
|
@ -1964,10 +1970,26 @@ button.cuIcon.lg {
|
|||
display: none;
|
||||
}
|
||||
|
||||
.nav .cu-item {
|
||||
height: 90upx;
|
||||
.nav .cu-item1 {
|
||||
height: 70upx;
|
||||
display: inline-block;
|
||||
line-height: 90upx;
|
||||
line-height: 70upx;
|
||||
margin: 0 10upx;
|
||||
padding: 0 20upx;
|
||||
border-radius: 30rpx;
|
||||
background-color: #9acafb;
|
||||
}
|
||||
|
||||
.nav .cu-item1.cur {
|
||||
/* border-bottom: 4upx solid; */
|
||||
background-color: #0081ff;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.nav .cu-item {
|
||||
height: 70upx;
|
||||
display: inline-block;
|
||||
line-height: 70upx;
|
||||
margin: 0 10upx;
|
||||
padding: 0 20upx;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,13 +5,27 @@
|
|||
const swiperList = [{
|
||||
id: 0,
|
||||
type: 'image',
|
||||
url: 'http://gqz.opsoul.com/f5cd5d9a378044aea5125ff150433bae'
|
||||
url: 'http://gqz.opsoul.com/77991752027084_.pic.jpg'
|
||||
}, {
|
||||
id: 1,
|
||||
type: 'image',
|
||||
url: 'http://gqz.opsoul.com/e456d5ceabec4a7f98895d74d2c6aeea'
|
||||
url: 'http://gqz.opsoul.com/77981752027074_.pic.jpg'
|
||||
}, {
|
||||
id: 2,
|
||||
type: 'image',
|
||||
url: 'http://gqz.opsoul.com/77971752027073_.pic.jpg'
|
||||
}]
|
||||
|
||||
// [{
|
||||
// id: 0,
|
||||
// type: 'image',
|
||||
// url: 'http://gqz.opsoul.com/f5cd5d9a378044aea5125ff150433bae'
|
||||
// }, {
|
||||
// id: 1,
|
||||
// type: 'image',
|
||||
// url: 'http://gqz.opsoul.com/e456d5ceabec4a7f98895d74d2c6aeea'
|
||||
// }]
|
||||
|
||||
const categories = [{
|
||||
id: 1,
|
||||
name: '服务商城'
|
||||
|
|
|
|||
|
|
@ -27,9 +27,23 @@ export default {
|
|||
}
|
||||
return this.countDownDiffCache;
|
||||
},
|
||||
addDays(dateStr, dayAmount) {
|
||||
let date = new Date(dateStr);
|
||||
// 使用时间戳计算,避免时区问题
|
||||
const timestamp = date.getTime() + (dayAmount * 24 * 60 * 60 * 1000);
|
||||
return new Date(timestamp);
|
||||
},
|
||||
addHours(dateStr, hourAmount) {
|
||||
let date = new Date(dateStr);
|
||||
date.setHours(date.getHours() + hourAmount);
|
||||
// date.setHours(date.getHours() + hourAmount);
|
||||
// return date;
|
||||
// 使用时间戳计算,避免时区问题
|
||||
const timestamp = date.getTime() + (hourAmount * 60 * 60 * 1000);
|
||||
return new Date(timestamp);
|
||||
},
|
||||
addMinutes(dateStr, minAmount) {
|
||||
let date = new Date(dateStr);
|
||||
date.setMinutes(date.getMinutes() + minAmount);
|
||||
return date;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
/**
|
||||
* 判断坐标是否在中国境外
|
||||
*/
|
||||
function outOfChina(lng, lat) {
|
||||
return (
|
||||
lng < 72.004 || lng > 137.8347 ||
|
||||
lat < 0.8293 || lat > 55.8271
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 纬度转换
|
||||
*/
|
||||
function transformLat(x, y) {
|
||||
const PI = 3.1415926535897932384626;
|
||||
let ret = -100.0 + 2.0 * x + 3.0 * y + 0.2 * y * y + 0.1 * x * y + 0.2 * Math.sqrt(Math.abs(x));
|
||||
ret += (20.0 * Math.sin(6.0 * x * PI) + 20.0 * Math.sin(2.0 * x * PI)) * 2.0 / 3.0;
|
||||
ret += (20.0 * Math.sin(y * PI) + 40.0 * Math.sin(y / 3.0 * PI)) * 2.0 / 3.0;
|
||||
ret += (160.0 * Math.sin(y / 12.0 * PI) + 320 * Math.sin(y * PI / 30.0)) * 2.0 / 3.0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* 经度转换
|
||||
*/
|
||||
function transformLng(x, y) {
|
||||
const PI = 3.1415926535897932384626;
|
||||
let ret = 300.0 + x + 2.0 * y + 0.1 * x * x + 0.1 * x * y + 0.1 * Math.sqrt(Math.abs(x));
|
||||
ret += (20.0 * Math.sin(6.0 * x * PI) + 20.0 * Math.sin(2.0 * x * PI)) * 2.0 / 3.0;
|
||||
ret += (20.0 * Math.sin(x * PI) + 40.0 * Math.sin(x / 3.0 * PI)) * 2.0 / 3.0;
|
||||
ret += (150.0 * Math.sin(x / 12.0 * PI) + 300.0 * Math.sin(x / 30.0 * PI)) * 2.0 / 3.0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* WGS84 转 GCJ-02(火星坐标系)
|
||||
*/
|
||||
export const wgs84ToGcj02 = function(lng, lat){
|
||||
const PI = 3.1415926535897932384626;
|
||||
const a = 6378245.0; // 长半轴
|
||||
const ee = 0.00669342162296594323; // 扁率
|
||||
|
||||
// 不在中国境内的坐标不转换
|
||||
if (outOfChina(lng, lat)) {
|
||||
return [lng, lat];
|
||||
}
|
||||
|
||||
let dlat = transformLat(lng - 105.0, lat - 35.0);
|
||||
let dlng = transformLng(lng - 105.0, lat - 35.0);
|
||||
const radlat = lat / 180.0 * PI;
|
||||
let magic = Math.sin(radlat);
|
||||
magic = 1 - ee * magic * magic;
|
||||
const sqrtmagic = Math.sqrt(magic);
|
||||
|
||||
dlat = (dlat * 180.0) / ((a * (1 - ee)) / (magic * sqrtmagic) * PI);
|
||||
dlng = (dlng * 180.0) / (a / sqrtmagic * Math.cos(radlat) * PI);
|
||||
|
||||
const mglat = lat + dlat;
|
||||
const mglng = lng + dlng;
|
||||
|
||||
return [mglng, mglat];
|
||||
}
|
||||
|
||||
export const getDistance = function(lat1, lng1, lat2, lng2) {
|
||||
const R = 6371000;
|
||||
const dLat = (lat2 - lat1) * Math.PI / 180;
|
||||
const dLng = (lng2 - lng1) * Math.PI / 180;
|
||||
const a =
|
||||
0.5 - Math.cos(dLat)/2 +
|
||||
Math.cos(lat1 * Math.PI / 180) *
|
||||
Math.cos(lat2 * Math.PI / 180) *
|
||||
(1 - Math.cos(dLng))/2;
|
||||
|
||||
return R * 2 * Math.asin(Math.sqrt(a));
|
||||
}
|
||||
|
|
@ -91,6 +91,7 @@ export default {
|
|||
}
|
||||
},
|
||||
async storageLocation(res) {
|
||||
uni.setStorageSync('userLocation', res);
|
||||
let areaRes = await this.baiduGetLoacation(res.latitude, res.longitude);
|
||||
areaRes = areaRes.data;
|
||||
if (areaRes) {
|
||||
|
|
@ -366,6 +367,19 @@ export default {
|
|||
})
|
||||
return res[1].data;
|
||||
},
|
||||
async getByCustomerAddressId(customerAddressId) {
|
||||
let res = await uni.request({
|
||||
url: '/customer/address/getByCustomerAddressId',
|
||||
method: 'POST',
|
||||
data: {
|
||||
customerAddressId: customerAddressId
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
}
|
||||
})
|
||||
return res[1].data;
|
||||
},
|
||||
async addAddressList(params = {}) {
|
||||
let res = await uni.request({
|
||||
url: '/customer/address/insert',
|
||||
|
|
@ -707,6 +721,37 @@ export default {
|
|||
})
|
||||
return res[1].data;
|
||||
},
|
||||
async editAfterServiceGoodsRecord(params = {}) {
|
||||
let res = await uni.request({
|
||||
url: '/worker/record/editGoods',
|
||||
method: 'POST',
|
||||
data: params,
|
||||
header: {
|
||||
pageNum: params.pageNum,
|
||||
pageSize: params.pageSize
|
||||
}
|
||||
})
|
||||
return res[1].data;
|
||||
},
|
||||
async deleteAttachPrice(params = {}) {
|
||||
let res = await uni.request({
|
||||
url: '/order/attach/deleteByDetailId',
|
||||
method: 'POST',
|
||||
data: params,
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
}
|
||||
})
|
||||
return res[1].data;
|
||||
},
|
||||
async changeOrderPrice(params = {}) {
|
||||
let res = await uni.request({
|
||||
url: '/order/detail/app/change/price',
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
return res[1].data;
|
||||
},
|
||||
async getChangeOrderPrice(params = {}) {
|
||||
let res = await uni.request({
|
||||
url: '/order/detail/app/getChangePrice',
|
||||
|
|
@ -747,5 +792,72 @@ export default {
|
|||
data: params
|
||||
})
|
||||
return res[1].data;
|
||||
},
|
||||
// 子单延期
|
||||
async orderDelayThreeDay(params = {}) {
|
||||
let res = await uni.request({
|
||||
url: '/order/detail/app/delay',
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
return res[1].data;
|
||||
},
|
||||
async updateDetailOrder(params = {}) {
|
||||
let res = await uni.request({
|
||||
url: '/order/detail/app/edit',
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
return res[1].data;
|
||||
},
|
||||
async returnOrder(params = {}) {
|
||||
let res = await uni.request({
|
||||
url: '/order/detail/app/return',
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
return res[1].data;
|
||||
},
|
||||
// 操作流程节点
|
||||
async addOrderOperate(params = {}) {
|
||||
let res = await uni.request({
|
||||
url: '/order/operate/app/add',
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
return res[1].data;
|
||||
},
|
||||
async getShopsByGoodsId(params = {}) {
|
||||
let res = await uni.request({
|
||||
url: '/goods/goods/getShopsByGoodsId',
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
return res[1].data;
|
||||
},
|
||||
async returnGoods(params = {}) {
|
||||
let res = await uni.request({
|
||||
url: '/worker/record/returnGoods',
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
return res[1].data;
|
||||
},
|
||||
async workerConfirmReceive(params = {}) {
|
||||
let res = await uni.request({
|
||||
url: '/worker/record/workerConfirmReceive',
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
return res[1].data;
|
||||
},
|
||||
async getDeliveryFlow(trackingNumber) {
|
||||
// "trackingNumber": "YT8774104632324",
|
||||
let res = await uni.request({
|
||||
url: '/order/logistics/query/'+trackingNumber,
|
||||
method: 'GET',
|
||||
data: {}
|
||||
})
|
||||
return res[1].data;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,8 @@
|
|||
<view class="flex flex-column-around text-left margin-left-sm text-white"
|
||||
@click="goRouter('/pages/publish/publish-task')">
|
||||
<view class="text-xl">发布任务</view>
|
||||
<view>公司、家居家政雇佣上门服务</view>
|
||||
<!-- <view>公司、家居家政雇佣上门服务</view> -->
|
||||
<view>发布功能现正升级中</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -114,16 +115,14 @@
|
|||
uni.$on('initValid', this.initValid)
|
||||
},
|
||||
mounted() {
|
||||
this.authLogin()
|
||||
// this.authLogin()
|
||||
// this.$refs.vertifyLogin.showModal();
|
||||
},
|
||||
methods: {
|
||||
async initValid(initParam) {
|
||||
this.initParam = initParam
|
||||
if (initParam && initParam.distributor) {
|
||||
const res = await this.authLogin()
|
||||
this.$refs.validRef.loadData(initParam, res)
|
||||
}
|
||||
},
|
||||
goRouter(path) {
|
||||
uni.navigateTo({
|
||||
|
|
@ -167,6 +166,9 @@
|
|||
// } else {
|
||||
// this.$refs.vertifyPhone.hideModal();
|
||||
// }
|
||||
|
||||
this.$emit('login-success')
|
||||
|
||||
return true;
|
||||
},
|
||||
async reloadForwardPage() {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<view>
|
||||
<view class="padding-xl text-gray text-center">
|
||||
<view class="big-icon padding-tb" :class="'cuIcon-' + icon"></view>
|
||||
<view class="text-lg">功能开发中,暂无法使用</view>
|
||||
<view class="text-lg">{{msg}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,54 @@
|
|||
<view v-else-if="product.goodsLogoUrl" class="cu-avatar xxl-view" :style="'background-image:url(' + product.goodsLogoUrl + ');'"></view>
|
||||
<view class="margin-left-sm product-content">
|
||||
<view>
|
||||
<view class="text-black">{{product.goodsName}}</view>
|
||||
<view class="text-black" style="vertical-align: middle;" v-if="product.goods">
|
||||
<view class='cu-tag round bg-orange light' v-if="product.goods.installService">
|
||||
<text class="text-black">{{getInstallServiceName(product.goods.installService)}}</text>
|
||||
</view>
|
||||
<view class='cu-tag round bg-orange light' v-if="product.goods.deliveryService">
|
||||
<text class="text-black">{{getDeliveryName(product.goods.deliveryService)}}</text>
|
||||
</view>
|
||||
<template v-if="product.goods.storeService">
|
||||
<view class='cu-tag round bg-orange light' v-if="product.goods.storeService == 1">
|
||||
<text class="text-black">到店服务</text>
|
||||
</view>
|
||||
<view class='cu-tag round bg-orange light' v-if="product.goods.storeService == 2">
|
||||
<text class="text-black">到店+配送(服务)</text>
|
||||
</view>
|
||||
<view class='cu-tag round bg-orange light' v-if="product.goods.storeService == 3">
|
||||
<text class="text-black">到店+上门(服务)</text>
|
||||
</view>
|
||||
</template>
|
||||
<view class="margin-lr-sm" style="display: inline-block;" v-if="product.goods.distance && product.goods.storeService">
|
||||
<view class="cu-tag bg-red" style="padding: 0 2px;height: auto;">距离您</view>
|
||||
<text class="text-gray" style="vertical-align: middle;">{{product.goods.distance}}</text>
|
||||
</view>
|
||||
{{product.goods.goodsName}}
|
||||
</view>
|
||||
<view class="text-black" style="vertical-align: middle;" v-else>
|
||||
<view class='cu-tag round bg-orange light' v-if="product.installService">
|
||||
<text class="text-black">{{getInstallServiceName(product.installService)}}</text>
|
||||
</view>
|
||||
<view class='cu-tag round bg-orange light' v-if="product.deliveryService">
|
||||
<text class="text-black">{{getDeliveryName(product.deliveryService)}}</text>
|
||||
</view>
|
||||
<template v-if="product.storeService">
|
||||
<view class='cu-tag round bg-orange light' v-if="product.storeService == 1">
|
||||
<text class="text-black">到店服务</text>
|
||||
</view>
|
||||
<view class='cu-tag round bg-orange light' v-if="product.storeService == 2">
|
||||
<text class="text-black">到店+配送(服务)</text>
|
||||
</view>
|
||||
<view class='cu-tag round bg-orange light' v-if="product.storeService == 3">
|
||||
<text class="text-black">到店+上门(服务)</text>
|
||||
</view>
|
||||
</template>
|
||||
<view class="margin-lr-sm" style="display: inline-block;" v-if="product.distance && product.storeService">
|
||||
<view class="cu-tag bg-red" style="padding: 0 2px;height: auto;">距离您</view>
|
||||
<text class="text-gray" style="vertical-align: middle;">{{product.distance}}</text>
|
||||
</view>
|
||||
{{product.goodsName}}
|
||||
</view>
|
||||
<view class="text-sm" v-if="ifShowComments">{{product.goodsDesc}}</view>
|
||||
</view>
|
||||
<view class="flex justify-between align-center">
|
||||
|
|
@ -47,7 +94,7 @@
|
|||
<text class='cuIcon-locationfill'></text>
|
||||
</view>
|
||||
<view class="cu-tag line-main-color sm">
|
||||
服务区域
|
||||
{{product.orderType == 1 ? '发货区域' : '服务区域'}}
|
||||
</view>
|
||||
</view>
|
||||
<text v-for="(item,index) in product.goodsAreaList">
|
||||
|
|
@ -72,13 +119,35 @@
|
|||
},
|
||||
product: {
|
||||
type: Object,
|
||||
default: {}
|
||||
default: () => {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getDeliveryName(deliveryService) {
|
||||
if(deliveryService === 1) {
|
||||
return '包邮'
|
||||
} else if(deliveryService === 2) {
|
||||
return '同城包送'
|
||||
} else if(deliveryService === 3) {
|
||||
return '邮费自付/自提'
|
||||
}
|
||||
},
|
||||
getInstallServiceName(installService) {
|
||||
if(installService === 1) {
|
||||
return '包安装'
|
||||
} else if(installService === 2) {
|
||||
return '不包安装'
|
||||
} else if(installService === 3) {
|
||||
return '自费安装'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,17 @@
|
|||
## 简介
|
||||
|
||||
|
||||
|
||||
## 更新日志
|
||||
**2019.12.30**
|
||||
优化:
|
||||
定位下拉内容
|
||||
待实现:只同时展示一个下拉内容
|
||||
**2019.12.27**
|
||||
bug修复
|
||||
支持H5、微信小程序
|
||||
**2019.12.20**
|
||||
第一次发布
|
||||
支持H5下拉,暂不支持小程序。
|
||||
原因:一些适配H5的方法是用vue来写的,小程序不支持。
|
||||
`this.$slots.`在小程序中不能用
|
||||
|
|
@ -0,0 +1,222 @@
|
|||
<template>
|
||||
<div class="dropdown-item">
|
||||
<!-- selected -->
|
||||
<view class="dropdown-item__selected"
|
||||
@click="changePopup">
|
||||
<slot name="title" v-if="$slots.title"></slot>
|
||||
<block v-else>
|
||||
<view class="selected__name">{{title ? title : selectItem.text}}</view>
|
||||
<view class="selected__icon"
|
||||
:class="showClass === 'show'? 'up' : 'down'"
|
||||
>
|
||||
<!-- <span class="iconfont"></span> -->
|
||||
<text class="cuIcon-triangledownfill"></text>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="dropdown-item__content" :style="{top: contentTop + 'px'}" v-if="showList">
|
||||
<!-- dropdown -->
|
||||
<view :class="['list', showClass]">
|
||||
<slot v-if="$slots.default"></slot>
|
||||
<block v-else>
|
||||
<view class="list__option"
|
||||
v-for="(item, index) in list"
|
||||
:key="index"
|
||||
@click="choose(item)">
|
||||
<view>{{item.text}}</view>
|
||||
<icon v-if="item.value === value" type="success_no_circle" size="20"/>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<!-- dropdown-mask -->
|
||||
<view :class="['dropdown-mask', showClass]" v-if="showList" @click="closePopup"></view>
|
||||
</view>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
components: {
|
||||
},
|
||||
props: {
|
||||
value: [Number, String, Object],
|
||||
list: {
|
||||
type: Array,
|
||||
default: ()=> {
|
||||
return []
|
||||
}
|
||||
},
|
||||
title: [Number, String]
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
showList: "",
|
||||
showClass: '',
|
||||
selectItem: {},
|
||||
contentTop: 0
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
},
|
||||
mounted() {
|
||||
this.showList = this.active;
|
||||
this.selectItem = this.list[this.value];
|
||||
// document.addEventListener('click', e => {
|
||||
// //this.$el 可以获取当前组件的容器节点
|
||||
// if (!this.$el.contains(e.target)) {
|
||||
// console.log('change');
|
||||
// this.close()
|
||||
// }
|
||||
// });
|
||||
},
|
||||
methods: {
|
||||
choose(item) {
|
||||
this.selectItem = item
|
||||
this.$emit('input', item.value)
|
||||
this.closePopup()
|
||||
},
|
||||
changePopup() {
|
||||
if(this.showList) {
|
||||
this.closePopup()
|
||||
} else {
|
||||
this.openPopup()
|
||||
}
|
||||
},
|
||||
openPopup() {
|
||||
// this.$parent -> dropdown-menu
|
||||
this.$parent.$emit('close')
|
||||
this.showList = true
|
||||
this.$nextTick(() => {
|
||||
this.getElementData('.dropdown-item__selected', (data)=>{
|
||||
this.contentTop = data[0].bottom
|
||||
this.showClass = 'show'
|
||||
})
|
||||
})
|
||||
},
|
||||
closePopup() {
|
||||
this.showClass = ''
|
||||
setTimeout(() => {
|
||||
this.showList = false
|
||||
}, 300)
|
||||
},
|
||||
close() {
|
||||
this.showClass = ''
|
||||
this.showList = false
|
||||
},
|
||||
getElementData(el, callback){
|
||||
uni.createSelectorQuery().in(this).selectAll(el).boundingClientRect().exec((data) => {
|
||||
callback(data[0]);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@font-face {
|
||||
font-family: 'iconfont'; /* project id 1564327 */
|
||||
src: url('https://at.alicdn.com/t/font_1564327_fcszez4n5i.eot');
|
||||
src: url('https://at.alicdn.com/t/font_1564327_fcszez4n5i.eot?#iefix') format('embedded-opentype'),
|
||||
url('https://at.alicdn.com/t/font_1564327_fcszez4n5i.woff2') format('woff2'),
|
||||
url('https://at.alicdn.com/t/font_1564327_fcszez4n5i.woff') format('woff'),
|
||||
url('https://at.alicdn.com/t/font_1564327_fcszez4n5i.ttf') format('truetype'),
|
||||
url('https://at.alicdn.com/t/font_1564327_fcszez4n5i.svg#iconfont') format('svg');
|
||||
}
|
||||
.iconfont{
|
||||
font-family:"iconfont" !important;
|
||||
font-size:28rpx;
|
||||
font-style:normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-webkit-text-stroke-width: 0.2px;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
.dropdown-item {
|
||||
width: 100%;
|
||||
flex:1;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.dropdown-item__selected {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background: #fff;
|
||||
/* padding: 30rpx; */
|
||||
box-sizing: border-box;
|
||||
justify-content: center;
|
||||
padding-top: 3px;
|
||||
}
|
||||
|
||||
.dropdown-item:not(:last-child):after {
|
||||
content: ' ';
|
||||
position: absolute;
|
||||
width: 2rpx;
|
||||
top: 36rpx;
|
||||
bottom: 36rpx;
|
||||
right: 0;
|
||||
background: $uni-border-color;
|
||||
}
|
||||
|
||||
.dropdown-item__selected .selected__name {
|
||||
font-size: 28rpx;
|
||||
color: #000;
|
||||
}
|
||||
.dropdown-item__selected .selected__icon {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.dropdown-item__selected .selected__icon.down {
|
||||
transition: transform .3s;
|
||||
transform: rotateZ(0);
|
||||
}
|
||||
|
||||
.dropdown-item__selected .selected__icon.up {
|
||||
transition: transform .3s;
|
||||
transform: rotateZ(-180deg);
|
||||
}
|
||||
.dropdown-item__content {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
overflow: hidden;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.dropdown-item__content .list {
|
||||
max-height: 400px;
|
||||
overflow-y: auto;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 3;
|
||||
background: #fff;
|
||||
transform: translateY(-100%);
|
||||
transition: all .3s;
|
||||
}
|
||||
.dropdown-item__content .list.show {
|
||||
transform: translateY(0);
|
||||
}
|
||||
.dropdown-item__content .list__option {
|
||||
font-size:30rpx;
|
||||
padding: 26rpx 28rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.dropdown-item__content .list__option:not(:last-child) {
|
||||
border-bottom: 1rpx solid #DDDDDD;
|
||||
}
|
||||
.dropdown-item__content .dropdown-mask {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
transition: all .3s;
|
||||
z-index: 2;
|
||||
}
|
||||
.dropdown-item__content .dropdown-mask.show {
|
||||
background:rgba(0,0,0,0.5);
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
<template>
|
||||
<div class="dropdown-menu">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$on('close', this.closeDropdown)
|
||||
},
|
||||
methods: {
|
||||
closeDropdown() {
|
||||
this.$children.forEach(item =>{
|
||||
item.close();
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.dropdown-menu {
|
||||
display: flex;
|
||||
overflow: auto;
|
||||
white-space: nowrap;
|
||||
margin-right: 5px;
|
||||
}
|
||||
dropdown-item {
|
||||
flex: 1;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -71,9 +71,9 @@
|
|||
chosenCategoryIds: []
|
||||
}
|
||||
},
|
||||
onReady() {
|
||||
this.loadData();
|
||||
},
|
||||
// onReady() {
|
||||
// this.loadData();
|
||||
// },
|
||||
methods: {
|
||||
tabSelect(e) {
|
||||
this.tabCur = e.currentTarget.dataset.index;
|
||||
|
|
|
|||
|
|
@ -211,7 +211,7 @@
|
|||
border: 1px solid #EBEEF5;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||
z-index: 3;
|
||||
z-index: 99;
|
||||
padding: 4px 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@
|
|||
"subPackages": [{
|
||||
"root": "pages/order/",
|
||||
"pages": [{
|
||||
"path": "choose-shop"
|
||||
}, {
|
||||
"path": "order-detail"
|
||||
}, {
|
||||
"path": "pay-result"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<template name="index">
|
||||
<c-tabbar :current="0">
|
||||
<c-tabbar :current="0" @login-success="loginSuccessCallback">
|
||||
<view>
|
||||
<!-- 顶部操作条 -->
|
||||
<!-- <cu-custom class="text-left">
|
||||
|
|
@ -24,6 +24,9 @@
|
|||
<input @confirm="chooseCategory(null)" v-model="searchInfo.inputGoodsName" :adjust-position="true"
|
||||
type="text" placeholder="输入搜索内容" confirm-type="search"></input>
|
||||
</view>
|
||||
<ms-dropdown-menu>
|
||||
<ms-dropdown-item v-model="filterType" :list="filterList"></ms-dropdown-item>
|
||||
</ms-dropdown-menu>
|
||||
<!-- 区域筛选picker -->
|
||||
<view class="action">
|
||||
<picker class="text-black text-bold" :mode="'multiSelector'" @change="regionChange"
|
||||
|
|
@ -43,10 +46,10 @@
|
|||
<text class="cuIcon-apps text-main-color"></text>
|
||||
<text class="cuIcon-triangledownfill"></text>
|
||||
</view>
|
||||
<view class="flex-twice">
|
||||
<view class="flex-1 flex align-center">
|
||||
<scroll-view scroll-x class="nav text-right" :scroll-with-animation="true"
|
||||
:scroll-left="scrollLeft">
|
||||
<view class="cu-item" :class="index==tabCur?'text-main-color cur':''" v-if="index < 2"
|
||||
<view class="cu-item1" :class="index==tabCur?'text-main-color cur':''" v-if="index < 2"
|
||||
v-for="(item,index) in categories" :key="item.goodsCategoryId"
|
||||
@tap="tabSelect($event, item)" :data-index="index">
|
||||
{{item.goodsCategoryName}}
|
||||
|
|
@ -150,6 +153,8 @@
|
|||
import loadStatusBar from '@/components/custom-bar/load-status-bar.vue';
|
||||
import flowGoodsCard from '@/components/goods-card/flow-goods-card.vue';
|
||||
import CTabbar from '@/components/CTabbar.vue';
|
||||
import msDropdownMenu from '@/components/ms-dropdown/dropdown-menu.vue'
|
||||
import msDropdownItem from '@/components/ms-dropdown/dropdown-item.vue'
|
||||
|
||||
// import valid from './components/valid.vue';
|
||||
|
||||
|
|
@ -160,6 +165,8 @@
|
|||
loadStatusBar,
|
||||
flowGoodsCard,
|
||||
CTabbar,
|
||||
msDropdownMenu,
|
||||
msDropdownItem
|
||||
// valid
|
||||
},
|
||||
data() {
|
||||
|
|
@ -168,7 +175,15 @@
|
|||
dotStyle: true,
|
||||
swiperList: [],
|
||||
tabCur: 0,
|
||||
categories: [],
|
||||
categories: [{
|
||||
id: 1,
|
||||
name: '服务商城',
|
||||
goodsCategoryName: '服务商城'
|
||||
}, {
|
||||
id: 2,
|
||||
name: '商品商城',
|
||||
goodsCategoryName: '商品商城'
|
||||
}],
|
||||
subCategories: [],
|
||||
hotServCategory: [],
|
||||
hotFittingsCategory: [],
|
||||
|
|
@ -186,7 +201,19 @@
|
|||
isShowPrivSetting: false,
|
||||
initParam: null,
|
||||
goInfo: false,
|
||||
deptGoodsCategoryIds: []
|
||||
deptGoodsCategoryIds: [],
|
||||
filterList: [
|
||||
{
|
||||
text: '综合搜索',
|
||||
value: 0
|
||||
},
|
||||
{
|
||||
text: '规格搜索',
|
||||
value: 1
|
||||
}
|
||||
],
|
||||
filterType: 0,
|
||||
curUserInfo: null
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
|
|
@ -225,7 +252,7 @@
|
|||
// await this.$request.authAndGetLocation();
|
||||
// 定位当前城市
|
||||
await this.getCurAreaArr();
|
||||
uni.$emit('initValid', this.initParam)
|
||||
|
||||
},
|
||||
async onShow() {
|
||||
if((this.productList.length || this.otherCityProductList.length) && !this.goInfo) {
|
||||
|
|
@ -233,15 +260,6 @@
|
|||
}
|
||||
this.goInfo = false;
|
||||
this.curUserInfo = this.$request.getCurUserInfo();
|
||||
// if (this.initParam && this.initParam.distributor) {
|
||||
// let res = await this.$request.updateUser({
|
||||
// customerPlace: this.initParam.distributor,
|
||||
// customerId: this.curUserInfo.customerId
|
||||
// });
|
||||
// if (res && res.code === 0) {
|
||||
// this.initParam = null;
|
||||
// }
|
||||
// }
|
||||
},
|
||||
async onShareAppMessage(e) {
|
||||
let shareInfo = null;
|
||||
|
|
@ -260,7 +278,7 @@
|
|||
}
|
||||
if (!shareInfo) {
|
||||
shareInfo = {
|
||||
title: '家政服务就找工圈子',
|
||||
title: '养车修车,一搜全有',
|
||||
path: '/pages/index/home?distributor=' + this.curUserInfo.customerId,
|
||||
imageUrl: 'http://gqz.opsoul.com/sys/group-selfie.png'
|
||||
}
|
||||
|
|
@ -268,10 +286,17 @@
|
|||
return shareInfo;
|
||||
},
|
||||
methods: {
|
||||
async loadData() {
|
||||
loginSuccessCallback() {
|
||||
this.curUserInfo = this.$request.getCurUserInfo();
|
||||
this.loadData(true)
|
||||
},
|
||||
async loadData(noLoadAreaAgain = false) {
|
||||
this.initBasicData();
|
||||
// 不再次解析地址
|
||||
if(!noLoadAreaAgain) {
|
||||
// 加载区域信息
|
||||
await this.loadRegionList();
|
||||
}
|
||||
// 加载服务商城热门类目
|
||||
let hotServCategoryRes = await this.$request.getHotCategory({
|
||||
type: 1
|
||||
|
|
@ -283,31 +308,15 @@
|
|||
});
|
||||
this.hotFittingsCategory = hotFittingsCategoryRes.data;
|
||||
|
||||
const deptGoodsCategoryIds = []
|
||||
if(this.curUserInfo) {
|
||||
const res = await this.$request.getChooseCategories({
|
||||
selectionType: 1,
|
||||
customerId: this.curUserInfo.customerId
|
||||
})
|
||||
deptGoodsCategoryIds.push(...res[1].data.data)
|
||||
}
|
||||
this.deptGoodsCategoryIds = deptGoodsCategoryIds
|
||||
|
||||
// 加载品类
|
||||
this.loadCategoryList();
|
||||
// 加载当前定位城市的服务列表
|
||||
this.loadProductPage();
|
||||
// 加载其他城市的服务列表
|
||||
this.loadOtherCityProductPage();
|
||||
|
||||
this.swiperList = await this.$api.data('swiperList');
|
||||
// this.categories = await this.$api.data('categories');
|
||||
// this.subCategories = await this.$api.data('subCategories');
|
||||
this.moduleBarInfos = await this.$api.data('moduleBarInfos');
|
||||
// this.hotGoods = await this.$api.data('hotGoods');
|
||||
// this.discountGoods = await this.$api.data('discountGoods');
|
||||
|
||||
|
||||
},
|
||||
// authCallback() {
|
||||
// this.$refs.validRef.loadData(this.initParam)
|
||||
|
|
@ -434,11 +443,14 @@
|
|||
}
|
||||
await this.wxGetLocation();
|
||||
},
|
||||
async loadCategoryList() {
|
||||
let res = await this.$request.getProductCategories();
|
||||
this.categories = res[1].data.data;
|
||||
this.tabSelect(null, this.categories[0]);
|
||||
},
|
||||
// async loadCategoryList() {
|
||||
// let res = await this.$request.getProductCategories({
|
||||
// customerId: this.curUserInfo.customerId,
|
||||
// isSetting: 0
|
||||
// });
|
||||
// this.categories = res[1].data.data;
|
||||
// this.tabSelect(null, this.categories[0]);
|
||||
// },
|
||||
async loadRegionList() {
|
||||
let area = this.searchInfo.area && this.searchInfo.area.length ? this.searchInfo.area : null
|
||||
let regionList = await this.$request.areaListByStep({
|
||||
|
|
@ -529,35 +541,37 @@
|
|||
this.tabCur = e == null ? 0 : e.currentTarget.dataset.index;
|
||||
this.scrollLeft = (this.tabCur - 1) * 60;
|
||||
|
||||
let subSubTypeList = [];
|
||||
for (let i = 0; i < item.child.length; i++) {
|
||||
let stopFlag = false;
|
||||
let secondList = item.child[i].child;
|
||||
if (secondList && secondList.length) {
|
||||
for (let k = 0; k < secondList.length; k++) {
|
||||
let thirdList = secondList[k].child;
|
||||
if (thirdList && thirdList.length) {
|
||||
for (let j = 0; j < thirdList.length; j++) {
|
||||
subSubTypeList = subSubTypeList.concat(thirdList[j]);
|
||||
if (subSubTypeList.length >= 15) {
|
||||
subSubTypeList = subSubTypeList.slice(0, 15);
|
||||
stopFlag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (stopFlag) break;
|
||||
}
|
||||
}
|
||||
if (stopFlag) break;
|
||||
}
|
||||
this.reloadProductPage()
|
||||
|
||||
let subCategoryOpt = await this.$api.data('subCategories');
|
||||
for (let i = 0; i < subSubTypeList.length; i++) {
|
||||
subSubTypeList[i]['cuIcon'] = subCategoryOpt[i].cuIcon;
|
||||
subSubTypeList[i]['color'] = subCategoryOpt[i].color;
|
||||
}
|
||||
this.subCategories = subSubTypeList;
|
||||
// let subSubTypeList = [];
|
||||
// for (let i = 0; i < item.child.length; i++) {
|
||||
// let stopFlag = false;
|
||||
// let secondList = item.child[i].child;
|
||||
// if (secondList && secondList.length) {
|
||||
// for (let k = 0; k < secondList.length; k++) {
|
||||
// let thirdList = secondList[k].child;
|
||||
// if (thirdList && thirdList.length) {
|
||||
// for (let j = 0; j < thirdList.length; j++) {
|
||||
// subSubTypeList = subSubTypeList.concat(thirdList[j]);
|
||||
// if (subSubTypeList.length >= 15) {
|
||||
// subSubTypeList = subSubTypeList.slice(0, 15);
|
||||
// stopFlag = true;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// if (stopFlag) break;
|
||||
// }
|
||||
// }
|
||||
// if (stopFlag) break;
|
||||
// }
|
||||
|
||||
// let subCategoryOpt = await this.$api.data('subCategories');
|
||||
// for (let i = 0; i < subSubTypeList.length; i++) {
|
||||
// subSubTypeList[i]['cuIcon'] = subCategoryOpt[i].cuIcon;
|
||||
// subSubTypeList[i]['color'] = subCategoryOpt[i].color;
|
||||
// }
|
||||
// this.subCategories = subSubTypeList;
|
||||
},
|
||||
chooseCategory(item) {
|
||||
this.searchInfo.category = item;
|
||||
|
|
@ -565,11 +579,17 @@
|
|||
},
|
||||
|
||||
searchGoods() {
|
||||
if(!this.curUserInfo) {
|
||||
uni.$emit('initValid', this.initParam)
|
||||
return
|
||||
}
|
||||
let params = {
|
||||
category: this.searchInfo.category,
|
||||
area: this.searchInfo.area,
|
||||
inputGoodsName: this.searchInfo.category ? '' : this.searchInfo.inputGoodsName,
|
||||
showData: true
|
||||
showData: true,
|
||||
type: this.tabCur === 0 ? 1 : 2,
|
||||
filterType: this.filterType
|
||||
};
|
||||
// if(!this.deptGoodsCategoryIds.includes(this.searchInfo.category)) {
|
||||
// params.showData = false
|
||||
|
|
@ -579,9 +599,14 @@
|
|||
})
|
||||
},
|
||||
clickHotCategory(item) {
|
||||
if(!this.curUserInfo) {
|
||||
uni.$emit('initValid', this.initParam)
|
||||
return
|
||||
}
|
||||
let params = {
|
||||
category: item,
|
||||
showData: true
|
||||
showData: true,
|
||||
type: this.tabCur === 0 ? 1 : 2
|
||||
};
|
||||
// if(!this.deptGoodsCategoryIds.includes(this.searchInfo.category)) {
|
||||
// params.showData = false
|
||||
|
|
@ -591,8 +616,12 @@
|
|||
})
|
||||
},
|
||||
showProductCategories() {
|
||||
if(!this.curUserInfo) {
|
||||
uni.$emit('initValid', this.initParam)
|
||||
return
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: '/pages/product/product-category'
|
||||
url: '/pages/product/product-category?type=' + (this.tabCur === 0 ? 1 : 2)
|
||||
})
|
||||
},
|
||||
/* 底部当前城市服务列表 start */
|
||||
|
|
@ -605,6 +634,10 @@
|
|||
this.otherCityProductList = [];
|
||||
},
|
||||
showDetails(productItem) {
|
||||
if(!this.curUserInfo) {
|
||||
uni.$emit('initValid', this.initParam)
|
||||
return
|
||||
}
|
||||
let params = {
|
||||
goodsId: productItem.goodsId
|
||||
}
|
||||
|
|
@ -629,10 +662,20 @@
|
|||
params.areaId = null;
|
||||
}
|
||||
|
||||
params.deptGoodsCategoryIds = this.deptGoodsCategoryIds;
|
||||
const deptGoodsCategoryIds = []
|
||||
if(this.curUserInfo) {
|
||||
const res = await this.$request.getChooseCategories({
|
||||
selectionType: 1,
|
||||
customerId: this.curUserInfo.customerId
|
||||
})
|
||||
deptGoodsCategoryIds.push(...res[1].data.data)
|
||||
}
|
||||
|
||||
params.deptGoodsCategoryIds = deptGoodsCategoryIds;
|
||||
params.pageNum = this[pageNumName];
|
||||
params.pageSize = this[pageSizeName];
|
||||
params.status = 0;
|
||||
params.type = this.tabCur === 0 ? 1 : 2;
|
||||
this.$refs[loadStatusBarRefName].showLoading();
|
||||
try {
|
||||
let res = await this.$request.qryProductPage(params);
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@
|
|||
}
|
||||
if (!shareInfo) {
|
||||
shareInfo = {
|
||||
title: '家政服务就找工圈子',
|
||||
title: '养车修车,一搜全有',
|
||||
path: '/pages/index/index?distributor=' + this.curUserInfo.customerId,
|
||||
imageUrl: 'http://gqz.opsoul.com/sys/group-selfie.png'
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<cu-custom :bgColor="'bg-main-color'">
|
||||
<block slot="content">我的消息</block>
|
||||
</cu-custom>
|
||||
<bg-toast :icon="'repair'" :msg="'开发中'"></bg-toast>
|
||||
<bg-toast :icon="'repair'" :msg="'您没有收到新消息'"></bg-toast>
|
||||
</view>
|
||||
</c-tabbar>
|
||||
</template>
|
||||
|
|
@ -42,7 +42,7 @@
|
|||
}
|
||||
if (!shareInfo) {
|
||||
shareInfo = {
|
||||
title: '家政服务就找工圈子',
|
||||
title: '养车修车,一搜全有',
|
||||
path: '/pages/index/home?distributor=' + this.curUserInfo.customerId,
|
||||
imageUrl: 'http://gqz.opsoul.com/sys/group-selfie.png'
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,8 +78,8 @@
|
|||
<view class="cu-list grid no-border col-5">
|
||||
<view class="cu-item" @click="showMyOrders(servOrderTabList, 0, servOrderType)">
|
||||
<view class="cuIcon-news">
|
||||
<view class="cu-tag badge" v-if="waitForPayOrderCount > 0">
|
||||
<block>{{waitForPayOrderCount}}</block>
|
||||
<view class="cu-tag badge" v-if="waitForPayOrderCount0 > 0">
|
||||
<block>{{waitForPayOrderCount0}}</block>
|
||||
</view>
|
||||
</view>
|
||||
<text>待付款</text>
|
||||
|
|
@ -110,16 +110,16 @@
|
|||
</view> -->
|
||||
<view class="cu-item" @click="showMyOrders(servOrderTabList, 1, servOrderType)">
|
||||
<view class="cuIcon-repair">
|
||||
<view class="cu-tag badge" v-if="waitForServOrderCount > 0">
|
||||
<block>{{waitForServOrderCount}}</block>
|
||||
<view class="cu-tag badge" v-if="waitForServOrderCount0 > 0">
|
||||
<block>{{waitForServOrderCount0}}</block>
|
||||
</view>
|
||||
</view>
|
||||
<text>待服务</text>
|
||||
</view>
|
||||
<view class="cu-item" @click="showMyOrders(servOrderTabList, 2, servOrderType)">
|
||||
<view class="cuIcon-comment">
|
||||
<view class="cu-tag badge" v-if="servingOrderCount > 0">
|
||||
<block>{{servingOrderCount}}</block>
|
||||
<view class="cu-tag badge" v-if="servingOrderCount0 > 0">
|
||||
<block>{{servingOrderCount0}}</block>
|
||||
</view>
|
||||
</view>
|
||||
<text>进行中</text>
|
||||
|
|
@ -134,23 +134,23 @@
|
|||
</view> -->
|
||||
<view class="cu-item" @click="showMyOrders(servOrderTabList, 3, servOrderType)">
|
||||
<view class="cuIcon-service">
|
||||
<view class="cu-tag badge" v-if="afterOrderCount > 0">
|
||||
<block>{{afterOrderCount}}</block>
|
||||
<view class="cu-tag badge" v-if="afterOrderCount0 > 0">
|
||||
<block>{{afterOrderCount0}}</block>
|
||||
</view>
|
||||
</view>
|
||||
<text>售后中</text>
|
||||
</view>
|
||||
<view class="cu-item" @click="showMyOrders(servOrderTabList, 4, servOrderType)">
|
||||
<view class="cuIcon-forward">
|
||||
<view class="cu-tag badge" v-if="finishedOrderCount > 0">
|
||||
<block>{{finishedOrderCount}}</block>
|
||||
<view class="cu-tag badge" v-if="finishedOrderCount0 > 0">
|
||||
<block>{{finishedOrderCount0}}</block>
|
||||
</view>
|
||||
</view>
|
||||
<text>已完成</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 商品订单 -->
|
||||
<!-- <view class="cu-bar solid-bottom">
|
||||
<view class="cu-bar solid-bottom">
|
||||
<view class="action bar-first-action">
|
||||
<text class="cuIcon-titles text-main-color"></text> 商品订单
|
||||
</view>
|
||||
|
|
@ -162,46 +162,63 @@
|
|||
<view class="cu-list grid no-border col-5">
|
||||
<view class="cu-item" @click="showMyOrders(productOrderTabList, 0, productOrderType)">
|
||||
<view class="cuIcon-news">
|
||||
<view class="cu-tag badge" v-if="myInfo.serOrderNum.wait2Pay > 0">
|
||||
<!-- <view class="cu-tag badge" v-if="myInfo.serOrderNum.wait2Pay > 0">
|
||||
<block>{{myInfo.serOrderNum.wait2Pay}}</block>
|
||||
</view> -->
|
||||
<view class="cu-tag badge" v-if="waitForPayOrderCount1 > 0">
|
||||
<block>{{waitForPayOrderCount1}}</block>
|
||||
</view>
|
||||
</view>
|
||||
<text>待付款</text>
|
||||
</view>
|
||||
<view class="cu-item" @click="showMyOrders(productOrderTabList, 1, productOrderType)">
|
||||
<view class="cuIcon-goodsfavor">
|
||||
<view class="cu-tag badge" v-if="myInfo.serOrderNum.buy> 0">
|
||||
<!-- <view class="cu-tag badge" v-if="myInfo.serOrderNum.buy> 0">
|
||||
<block>{{myInfo.serOrderNum.buy}}</block>
|
||||
</view> -->
|
||||
<view class="cu-tag badge" v-if="waitForServOrderCount1 > 0">
|
||||
<block>{{waitForServOrderCount1}}</block>
|
||||
</view>
|
||||
</view>
|
||||
<text>买到的</text>
|
||||
<text>待服务</text>
|
||||
</view>
|
||||
<view class="cu-item" @click="showMyOrders(productOrderTabList, 2, productOrderType)">
|
||||
<view class="cuIcon-goodsnew">
|
||||
<view class="cu-tag badge" v-if="myInfo.serOrderNum.sale > 0">
|
||||
<!-- <view class="cu-tag badge" v-if="myInfo.serOrderNum.sale > 0">
|
||||
<block>{{myInfo.serOrderNum.sale}}</block>
|
||||
</view> -->
|
||||
<view class="cu-tag badge" v-if="servingOrderCount1 > 0">
|
||||
<block>{{servingOrderCount1}}</block>
|
||||
</view>
|
||||
</view>
|
||||
<text>卖出的</text>
|
||||
<text>进行中</text>
|
||||
</view>
|
||||
<view class="cu-item" @click="showMyOrders(productOrderTabList, 3, productOrderType)">
|
||||
<view class="cuIcon-comment">
|
||||
<view class="cu-tag badge" v-if="myInfo.serOrderNum.afterServ > 0">
|
||||
<!-- <view class="cu-tag badge" v-if="myInfo.serOrderNum.afterServ > 0">
|
||||
<block>{{myInfo.serOrderNum.afterServ}}</block>
|
||||
</view> -->
|
||||
<view class="cu-tag badge" v-if="afterOrderCount1 > 0">
|
||||
<block>{{afterOrderCount1}}</block>
|
||||
</view>
|
||||
</view>
|
||||
<text>售后中</text>
|
||||
</view>
|
||||
<view class="cu-item" @click="showMyOrders(productOrderTabList, 4, productOrderType)">
|
||||
<view class="cuIcon-forward">
|
||||
<view class="cu-tag badge" v-if="myInfo.serOrderNum.wait2Forward > 0">
|
||||
<!-- <view class="cu-tag badge" v-if="myInfo.serOrderNum.wait2Forward > 0">
|
||||
<block>{{myInfo.serOrderNum.wait2Forward}}</block>
|
||||
</view>
|
||||
</view>
|
||||
<text>待转发</text>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="cu-tag badge" v-if="finishedOrderCount1 > 0">
|
||||
<block>{{finishedOrderCount1}}</block>
|
||||
</view>
|
||||
</view>
|
||||
<text>已完成</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- 所有功能 -->
|
||||
<view class="bg-white padding-lr padding-bottom">
|
||||
<view class="cu-bar margin-top-sm solid-bottom">
|
||||
|
|
@ -359,25 +376,29 @@
|
|||
// type: -1,
|
||||
name: '待付款'
|
||||
}, {
|
||||
type: -1,
|
||||
name: '买到的'
|
||||
type: '0,1,2',
|
||||
name: '待发货'
|
||||
}, {
|
||||
type: -1,
|
||||
name: '卖出的'
|
||||
type: '3,4',
|
||||
name: '待收货'
|
||||
}, {
|
||||
type: -1,
|
||||
name: '售后中'
|
||||
}, {
|
||||
type: -1,
|
||||
type: 5,
|
||||
name: '已完成'
|
||||
}],
|
||||
productOrderType: 1,
|
||||
|
||||
waitForPayOrderCount: 0,
|
||||
waitForServOrderCount: 0,
|
||||
servingOrderCount: 0,
|
||||
afterOrderCount: 0,
|
||||
finishedOrderCount: 0,
|
||||
waitForPayOrderCount0: 0,
|
||||
waitForServOrderCount0: 0,
|
||||
servingOrderCount0: 0,
|
||||
afterOrderCount0: 0,
|
||||
finishedOrderCount0: 0,
|
||||
waitForPayOrderCount1: 0,
|
||||
waitForServOrderCount1: 0,
|
||||
servingOrderCount1: 0,
|
||||
afterOrderCount1: 0,
|
||||
finishedOrderCount1: 0,
|
||||
|
||||
appQrcode: '',
|
||||
appShareQrcodeModal: false
|
||||
|
|
@ -406,7 +427,7 @@
|
|||
}
|
||||
if (!shareInfo) {
|
||||
shareInfo = {
|
||||
title: '家政服务就找工圈子',
|
||||
title: '养车修车,一搜全有',
|
||||
path: '/pages/index/home?distributor=' + this.curUserInfo.customerId,
|
||||
imageUrl: 'http://gqz.opsoul.com/sys/group-selfie.png'
|
||||
}
|
||||
|
|
@ -418,12 +439,13 @@
|
|||
await this.$request.refreshCurUserCache();
|
||||
this.curUserInfo = this.$request.getCurUserInfo();
|
||||
this.myInfo = await this.$api.data('myInfo');
|
||||
this.myOrderCount();
|
||||
this.myOrderCount(0);
|
||||
this.myOrderCount(1);
|
||||
},
|
||||
async myOrderCount() {
|
||||
async myOrderCount(orderType) {
|
||||
let params = {
|
||||
customerId: this.curUserInfo.customerId,
|
||||
orderType: 0
|
||||
orderType: orderType
|
||||
}
|
||||
|
||||
// 待付款服务订单数量
|
||||
|
|
@ -432,34 +454,35 @@
|
|||
payStatusList: '0,4',
|
||||
exceptOrderStatus: 6
|
||||
});
|
||||
this.waitForPayOrderCount = waitForPayOrderCountRes.data;
|
||||
this['waitForPayOrderCount'+orderType] = waitForPayOrderCountRes.data;
|
||||
|
||||
// 待服务服务订单数量
|
||||
let waitForServOrderCountRes = await this.$request.countOrderList({
|
||||
...params,
|
||||
orderStatuses: '0,1,2'
|
||||
});
|
||||
this.waitForServOrderCount = waitForServOrderCountRes.data;
|
||||
this['waitForServOrderCount'+orderType] = waitForServOrderCountRes.data;
|
||||
|
||||
// 服务中服务订单数量
|
||||
let servingOrderCountRes = await this.$request.countOrderList({
|
||||
...params,
|
||||
orderStatuses: '3,4'
|
||||
});
|
||||
this.servingOrderCount = servingOrderCountRes.data;
|
||||
this['servingOrderCount'+orderType] = servingOrderCountRes.data;
|
||||
|
||||
// 售后中服务订单数量
|
||||
let afterOrderCountRes = await this.$request.countAfterList({
|
||||
...params,
|
||||
customerId: params.customerId
|
||||
});
|
||||
this.afterOrderCount = afterOrderCountRes.data;
|
||||
this['afterOrderCount'+orderType] = afterOrderCountRes.data;
|
||||
|
||||
// 已完成服务订单数量
|
||||
let finishedOrderCountRes = await this.$request.countOrderList({
|
||||
...params,
|
||||
orderStatus: 5
|
||||
});
|
||||
this.finishedOrderCount = finishedOrderCountRes.data;
|
||||
this['finishedOrderCount'+orderType] = finishedOrderCountRes.data;
|
||||
},
|
||||
getWxUserBasicInfo() {
|
||||
uni.navigateTo({
|
||||
|
|
|
|||
|
|
@ -265,7 +265,7 @@
|
|||
}
|
||||
if (!shareInfo) {
|
||||
shareInfo = {
|
||||
title: '家政服务就找工圈子',
|
||||
title: '养车修车,一搜全有',
|
||||
path: '/pages/index/home?distributor=' + this.curUserInfo.customerId,
|
||||
imageUrl: 'http://gqz.opsoul.com/sys/group-selfie.png'
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
url: '',
|
||||
show: false,
|
||||
shareTemplate: {
|
||||
title: '家政服务就找工圈子',
|
||||
title: '养车修车,一搜全有',
|
||||
path: '/pages/index/index?customerPlace=',
|
||||
imageUrl: 'http://gqz.opsoul.com/sys/group-selfie.png'
|
||||
},
|
||||
|
|
|
|||
|
|
@ -0,0 +1,154 @@
|
|||
<template>
|
||||
<!-- popup -->
|
||||
<view>
|
||||
<uni-popup ref="reFinishPopup" type="bottom" @change="changePopup">
|
||||
<view class="text-bold text-gray text-lg text-center left-top-sm-bar" data-popup="reFinishPopup" @click="closePopup"><text
|
||||
class="cuIcon-close"></text></view>
|
||||
<view class="bg-white padding" style="padding-top: 74rpx;">
|
||||
<view class="text-xxl text-center">售后不同意</view>
|
||||
<view class="text-lg text-left">订单将提交平台,由平台介入处理纠纷!</view>
|
||||
<view>
|
||||
<div class="grid col-3 grid-square">
|
||||
<view class="bg-img" v-for="(item,index) in imgList" :key="index"
|
||||
@tap="viewImage($event, imgList)" :data-url="item">
|
||||
<image :src="item" mode="aspectFill"></image>
|
||||
<view class="cu-tag bg-red" @tap.stop="delImg($event, imgList)" :data-index="index">
|
||||
<text class='cuIcon-close'></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="solids" @tap="chooseImage" v-if="imgList.length < 6">
|
||||
<text class='cuIcon-cameraadd'></text>
|
||||
</view>
|
||||
</div>
|
||||
</view>
|
||||
<view style="margin-bottom: 10rpx;">
|
||||
<textarea style="width: 100%;box-sizing: border-box;" class="custom-input radius-input" placeholder="请输入理由或备注" cols="30" rows="10" v-model="form.redoCompleteRemark"></textarea>
|
||||
</view>
|
||||
<view class="cu-bar bg-white solid-top">
|
||||
<view class="action margin-0 flex-sub text-black" @tap="closePopup">取消</view>
|
||||
<view class="action margin-0 flex-sub text-main-color solid-left" @click="Submit">确认</view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
emits: ['confirmFeedback', 'close'],
|
||||
props: {
|
||||
show: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
orderAfterId: {
|
||||
type: String | Number,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
show: {
|
||||
handler(newVal) {
|
||||
if(newVal) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.reFinishPopup.open()
|
||||
})
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
redoCompleteRemark: '',
|
||||
redoCompleteImages: '',
|
||||
},
|
||||
imgList: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
chooseImage(e) {
|
||||
uni.chooseMedia({
|
||||
count: 1, //默认9
|
||||
mediaType: ['image'],
|
||||
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||||
sourceType: ['album'], //从相册选择
|
||||
success: (res) => {
|
||||
uni.showLoading({
|
||||
title: '上传中',
|
||||
mask: true
|
||||
});
|
||||
res.tempFiles.forEach((fileObj, index) => {
|
||||
this.$request.uploadFile(fileObj.tempFilePath).then((url) => {
|
||||
this.imgList.push(url);
|
||||
if (index === res.tempFiles.length - 1) {
|
||||
uni.hideLoading();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
viewImage(e, imgList) {
|
||||
uni.previewImage({
|
||||
urls: imgList,
|
||||
current: e.currentTarget.dataset.url
|
||||
});
|
||||
},
|
||||
delImg(e, imgList) {
|
||||
uni.showModal({
|
||||
title: '',
|
||||
content: '确定要删除这张图片吗?',
|
||||
cancelText: '取消',
|
||||
confirmText: '确定',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
imgList.splice(e.currentTarget.dataset.index, 1)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
changePopup(e) {
|
||||
console.log(e);
|
||||
if(!e.show) {
|
||||
this.closePopup()
|
||||
}
|
||||
},
|
||||
closePopup() {
|
||||
this.$emit('close')
|
||||
},
|
||||
changeRadio(e) {
|
||||
this.form.deliveryType = e.target.value
|
||||
},
|
||||
async Submit() {
|
||||
const updateOrderParams = {
|
||||
id: this.orderAfterId,
|
||||
customerDisagreeReason: this.form.redoCompleteRemark,
|
||||
customerDisagreeImages: this.imgList.length ? this.imgList.toString() : '',
|
||||
customerFinalCheck: 0
|
||||
}
|
||||
|
||||
let res = await this.$request.editAfterServiceRecord(updateOrderParams)
|
||||
|
||||
if (res.code === 0) {
|
||||
uni.showToast({
|
||||
icon: 'success',
|
||||
title: '提交成功',
|
||||
duration: 1000
|
||||
})
|
||||
this.$emit('confirmFeedback')
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '操作失败',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
|
|
@ -0,0 +1,321 @@
|
|||
<template>
|
||||
<view class="cu-modal" :class="show?'show':''">
|
||||
<view class="cu-dialog bg-white">
|
||||
<view class="cu-bar">
|
||||
<view class="content">售后申请</view>
|
||||
<view class="action" @click="hideModal">
|
||||
<text class="cuIcon-close text-red"></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="padding text-left">
|
||||
<view class="flex justify-start align-center">
|
||||
<view class="title">选择子单:</view>
|
||||
<my-uni-combox class="form-val-area inline-input" :candidates="detailList" placeholder="请选择" :showField="'remark'"
|
||||
v-model="detailObj">
|
||||
</my-uni-combox>
|
||||
</view>
|
||||
<view class="flex justify-start align-center margin-top-sm">
|
||||
<view class="title">售后类型:</view>
|
||||
<my-uni-combox class="form-val-area inline-input" :candidates="afterServiceTypeArr" placeholder="请选择" :showField="'name'"
|
||||
v-model="afterServiceType">
|
||||
</my-uni-combox>
|
||||
</view>
|
||||
<view class="flex justify-start align-center margin-top-sm">
|
||||
<view class="title">申请原因:</view>
|
||||
<my-uni-combox class="form-val-area inline-input" :candidates="customerReasonTypeArr" placeholder="请选择" :showField="'name'"
|
||||
v-model="customerReasonType">
|
||||
</my-uni-combox>
|
||||
</view>
|
||||
<view class="margin-top-sm flex justify-start align-center margin-top-sm" v-if="operType === 1">
|
||||
<text>最大退款金额:</text>
|
||||
<text class="text-price text-red">{{detailObj ? detailObj.payMoney : 0}}</text>
|
||||
</view>
|
||||
<view class="margin-top-sm flex justify-start align-center margin-top-sm" v-if="operType === 1">
|
||||
<view>退款金额:</view>
|
||||
<input type="digit" class="radius-input inline-input" v-model="refund" style="flex-basis: 70%;"></input>
|
||||
</view>
|
||||
<view class="margin-top-sm flex justify-start margin-top-sm">
|
||||
<view>具体原因:</view>
|
||||
<textarea style="height: 200rpx;" class="solid radius text-left padding-sm inline-input"
|
||||
v-model="remark" maxlength="-1"></textarea>
|
||||
</view>
|
||||
<!-- 上传图片 -->
|
||||
<view class="padding-top">
|
||||
<view class="grid col-3 grid-square flex-sub margin-top-sm">
|
||||
<view class="bg-img" v-for="(item,index) in imgList" :key="index"
|
||||
@tap="viewImage($event, imgList)" :data-url="item">
|
||||
<image :src="item" mode="aspectFill"></image>
|
||||
<view class="cu-tag bg-red" @tap.stop="delImg($event, imgList)" :data-index="index">
|
||||
<text class='cuIcon-close'></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="solids" @tap="chooseImgList(e, imgList)" v-if="imgList.length < 3">
|
||||
<text class='cuIcon-cameraadd'></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-bar solid-top">
|
||||
<view class="action margin-0 flex-sub text-black" @click="hideModal">取消</view>
|
||||
<view class="action margin-0 flex-sub text-main-color solid-left" @click="apply">确认</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import myUniCombox from '@/components/uni-combox/my-uni-combox.vue';
|
||||
|
||||
export default {
|
||||
name: 'applyAfterSale',
|
||||
components: {
|
||||
myUniCombox
|
||||
},
|
||||
props: {
|
||||
data: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
operType: 2, // 1为申请退款,2为发起售后
|
||||
afterServiceType: null,
|
||||
afterServiceTypeArr: [
|
||||
{
|
||||
code: 1,
|
||||
name: '未收到货,我要退单退款!'
|
||||
},
|
||||
{
|
||||
code: 2,
|
||||
name: '未收到货(发货在途),我要退款!'
|
||||
},
|
||||
{
|
||||
code: 3,
|
||||
name: '已收到货,我要退款退货!'
|
||||
},
|
||||
],
|
||||
customerReasonTypeArr: [],
|
||||
customerReasonType: null,
|
||||
refund: null,
|
||||
remark: null,
|
||||
imgList: [],
|
||||
detailList: [],
|
||||
detailObj: null,
|
||||
toUpdateStatus: false
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
afterServiceType() {
|
||||
if(this.afterServiceType) {
|
||||
this.customerReasonType = null
|
||||
if(this.afterServiceType.code == 3) {
|
||||
this.customerReasonTypeArr = [
|
||||
{
|
||||
code: 1,
|
||||
name: '不想要了'
|
||||
},{
|
||||
code: 2,
|
||||
name: '买错型号尺寸了'
|
||||
},{
|
||||
code: 3,
|
||||
name: '材质与商品描述不符'
|
||||
},
|
||||
{
|
||||
code: 4,
|
||||
name: '大小尺寸与商品描述不符'
|
||||
},
|
||||
{
|
||||
code: 5,
|
||||
name: '颜色、款式、型号与描述不符'
|
||||
},
|
||||
{
|
||||
code: 6,
|
||||
name: '出现质量问题'
|
||||
},
|
||||
{
|
||||
code: 7,
|
||||
name: '收到商品少件(少配件)'
|
||||
},
|
||||
{
|
||||
code: 8,
|
||||
name: '商家发错货'
|
||||
},
|
||||
{
|
||||
code: 9,
|
||||
name: '商品破损或污渍'
|
||||
}
|
||||
]
|
||||
} else {
|
||||
this.customerReasonTypeArr = [
|
||||
{
|
||||
code: 1,
|
||||
name: '不想要了'
|
||||
},{
|
||||
code: 10,
|
||||
name: '未按承诺时间发货'
|
||||
},{
|
||||
code: 11,
|
||||
name: '未见快递/物流有信息'
|
||||
},
|
||||
{
|
||||
code: 12,
|
||||
name: '其它原因'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async init(curOrder) {
|
||||
let res = await this.$request.getDetailListByMasterId({
|
||||
orderMasterId: curOrder.orderMasterId
|
||||
});
|
||||
if (res && res.code === 0) {
|
||||
this.detailList = res.data;
|
||||
}
|
||||
},
|
||||
showModal(curOrder, params) {
|
||||
this.init(curOrder);
|
||||
this.operType = params.afterServiceType
|
||||
// this.afterServiceType = params.afterServiceType;
|
||||
this.toUpdateStatus = params.toUpdateStatus;
|
||||
this.show = true;
|
||||
},
|
||||
hideModal(e) {
|
||||
this.resetData();
|
||||
this.$emit('cancel');
|
||||
this.show = false;
|
||||
},
|
||||
resetData() {
|
||||
this.operType = null
|
||||
this.afterServiceType = null;
|
||||
this.customerReasonType = null;
|
||||
this.data = null;
|
||||
this.refund = null;
|
||||
this.imgList = [];
|
||||
this.remark = null;
|
||||
},
|
||||
chooseImgList(e, imgList) {
|
||||
uni.chooseImage({
|
||||
count: 3 - imgList.length, //默认9
|
||||
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||||
sourceType: ['album'], //从相册选择
|
||||
success: (res) => {
|
||||
uni.showLoading({
|
||||
title: '上传中',
|
||||
mask: true
|
||||
});
|
||||
res.tempFilePaths.forEach((tmpUrl, index) => {
|
||||
this.$request.uploadFile(tmpUrl).then((url) => {
|
||||
imgList.push(url);
|
||||
if (index === res.tempFilePaths.length - 1) {
|
||||
uni.hideLoading();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
viewImage(e, imgList) {
|
||||
uni.previewImage({
|
||||
urls: imgList,
|
||||
current: e.currentTarget.dataset.url
|
||||
});
|
||||
},
|
||||
delImg(e, imgList) {
|
||||
uni.showModal({
|
||||
title: '',
|
||||
content: '确定要删除这张图片吗?',
|
||||
cancelText: '取消',
|
||||
confirmText: '确定',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
imgList.splice(e.currentTarget.dataset.index, 1)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
validData() {
|
||||
let errMsg = null;
|
||||
if (!this.detailObj) {
|
||||
errMsg = "请选择子单";
|
||||
}
|
||||
if(!this.afterServiceType) {
|
||||
errMsg = "请选择售后类型";
|
||||
}
|
||||
if(!this.customerReasonType) {
|
||||
errMsg = "请选择申请原因";
|
||||
}
|
||||
if (errMsg) {
|
||||
uni.showToast({
|
||||
title: errMsg,
|
||||
duration: 1500,
|
||||
icon: 'none'
|
||||
})
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
async apply() {
|
||||
if (!this.validData()) {
|
||||
return;
|
||||
}
|
||||
|
||||
let imgObjList = [];
|
||||
this.imgList.forEach(url => {
|
||||
imgObjList.push({
|
||||
imgUrl: url,
|
||||
imgUploadBy: 1
|
||||
})
|
||||
})
|
||||
let res = await this.$request.addAfterServiceRecord({
|
||||
customerReasonType: this.customerReasonType.code,
|
||||
customerReason: this.remark,
|
||||
orderDetailId: this.detailObj.orderDetailId,
|
||||
afterServiceType: this.afterServiceType.code,
|
||||
refund: this.refund,
|
||||
operType: this.operType,
|
||||
imgsList: imgObjList,
|
||||
createBy: 1,
|
||||
updateBy: 1,
|
||||
afterServiceCategory: 2
|
||||
});
|
||||
if (res && res.code === 0) {
|
||||
let updateStatusRes = {
|
||||
code: 0
|
||||
}
|
||||
if (this.toUpdateStatus) {
|
||||
updateStatusRes = await this.$request.updateOrder({
|
||||
id: this.data.orderMasterId,
|
||||
orderStatus: 3
|
||||
});
|
||||
}
|
||||
if (updateStatusRes && updateStatusRes.code === 0) {
|
||||
this.hideModal();
|
||||
this.$emit('confirmFeedback');
|
||||
uni.showToast({
|
||||
title: '已发起售后,进度可在订单详情内查看',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
return;
|
||||
}
|
||||
}
|
||||
uni.showToast({
|
||||
title: '无法对同一个订单重复发起售后或退款',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.inline-input {
|
||||
flex-basis: 74%;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,172 @@
|
|||
<template>
|
||||
<!-- popup -->
|
||||
<view>
|
||||
<uni-popup ref="deliveryOrderPopup" type="bottom" @change="changePopup">
|
||||
<view class="text-bold text-gray text-lg text-center left-top-sm-bar" data-popup="deliveryOrderPopup" @click="closePopup"><text
|
||||
class="cuIcon-close"></text></view>
|
||||
<view class="bg-white padding" style="padding-top: 74rpx; min-height: 1000rpx;">
|
||||
<view class="text-xxl text-center">发货类型</view>
|
||||
<radio-group class="flex padding-tb-sm flex-direction" style="gap: 10rpx">
|
||||
<label @click="form.deliveryType = 1">
|
||||
<radio class="main-color" :value="1" :checked="form.deliveryType === 1" /><text class="margin-left-sm">发快递/物流</text>
|
||||
</label>
|
||||
<view style="padding-left: 70rpx;">
|
||||
<input type="text" v-model="form.trackingNumber" class="custom-input radius-input" placeholder="请输入快递/物流单号">
|
||||
</view>
|
||||
<label @click="form.deliveryType = 2">
|
||||
<radio class="main-color" :value="2" :checked="form.deliveryType === 2"/><text class="margin-left-sm">送货上门</text>
|
||||
</label>
|
||||
<label @click="form.deliveryType = 3">
|
||||
<radio class="main-color" :value="3" :checked="form.deliveryType === 3"/><text class="margin-left-sm">客户自提</text>
|
||||
</label>
|
||||
</radio-group>
|
||||
<view class="text-lg text-left">出货拍照存档(非必填):</view>
|
||||
<view>
|
||||
<div class="grid col-3 grid-square">
|
||||
<view class="bg-img" v-for="(item,index) in imgList" :key="index"
|
||||
@tap="viewImage($event, imgList)" :data-url="item">
|
||||
<image :src="item" mode="aspectFill"></image>
|
||||
<view class="cu-tag bg-red" @tap.stop="delImg($event, imgList)" :data-index="index">
|
||||
<text class='cuIcon-close'></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="solids" @tap="chooseImage" v-if="imgList.length < 6">
|
||||
<text class='cuIcon-cameraadd'></text>
|
||||
</view>
|
||||
</div>
|
||||
</view>
|
||||
<view style="margin-bottom: 10rpx;">
|
||||
<textarea style="width: 100%;box-sizing: border-box;" class="custom-input radius-input" placeholder="发货备注(非必填)" cols="30" rows="10" v-model="form.deliveryRemark"></textarea>
|
||||
</view>
|
||||
<view class="cu-bar bg-white solid-top">
|
||||
<view class="action margin-0 flex-sub text-black" @tap="closePopup">取消</view>
|
||||
<view class="action margin-0 flex-sub text-main-color solid-left" @click="Submit">确认发货</view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
emits: ['confirmFeedback', 'close'],
|
||||
props: {
|
||||
show: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
data: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
show: {
|
||||
handler(newVal) {
|
||||
if(newVal) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.deliveryOrderPopup.open()
|
||||
})
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
deliveryType: 1,
|
||||
deliveryRemark: '',
|
||||
deliveryImages: '',
|
||||
trackingNumber: ''
|
||||
},
|
||||
imgList: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
chooseImage(e) {
|
||||
uni.chooseMedia({
|
||||
count: 1, //默认9
|
||||
mediaType: ['image'],
|
||||
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||||
sourceType: ['album'], //从相册选择
|
||||
success: (res) => {
|
||||
uni.showLoading({
|
||||
title: '上传中',
|
||||
mask: true
|
||||
});
|
||||
res.tempFiles.forEach((fileObj, index) => {
|
||||
this.$request.uploadFile(fileObj.tempFilePath).then((url) => {
|
||||
this.imgList.push(url);
|
||||
if (index === res.tempFiles.length - 1) {
|
||||
uni.hideLoading();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
viewImage(e, imgList) {
|
||||
uni.previewImage({
|
||||
urls: imgList,
|
||||
current: e.currentTarget.dataset.url
|
||||
});
|
||||
},
|
||||
delImg(e, imgList) {
|
||||
uni.showModal({
|
||||
title: '',
|
||||
content: '确定要删除这张图片吗?',
|
||||
cancelText: '取消',
|
||||
confirmText: '确定',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
imgList.splice(e.currentTarget.dataset.index, 1)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
changePopup(e) {
|
||||
console.log(e);
|
||||
if(!e.show) {
|
||||
this.closePopup()
|
||||
}
|
||||
},
|
||||
closePopup() {
|
||||
this.$emit('close')
|
||||
},
|
||||
changeRadio(e) {
|
||||
this.form.deliveryType = e.target.value
|
||||
},
|
||||
async Submit() {
|
||||
if(this.form.deliveryType == 1 && !this.form.trackingNumber) {
|
||||
uni.showToast({
|
||||
title: '请填写物流/快递单号',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
let res;
|
||||
const updateGoodsParams = {
|
||||
id: this.data.id,
|
||||
returnType: this.form.deliveryType, // 1-快递/物流
|
||||
returnTrackingNumber: this.form.trackingNumber, // 必填
|
||||
returnRemark: this.form.deliveryRemark,
|
||||
returnImages: this.imgList.length ? this.imgList.toString() : ''
|
||||
}
|
||||
res = await this.$request.returnGoods(updateGoodsParams);
|
||||
if (res.code === 0) {
|
||||
this.$emit('confirmFeedback')
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '操作失败',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
<template>
|
||||
<view>
|
||||
<!-- 模态框 -->
|
||||
<view class="cu-modal" :class="show?'show':''">
|
||||
<view class="cu-dialog">
|
||||
<view class="padding-xl" style="background-color: #ffffff;">
|
||||
<view class="text-bold text-lg margin-bottom-sm">物流信息</view>
|
||||
|
||||
<view class="cu-timeline" style="max-height: 600upx;overflow-y: auto;">
|
||||
<view class="cu-item text-main-color" v-for="(item, index) in flowArr" :key="index">
|
||||
<view class="content shadow-blur" style="text-align: left;padding: 15upx 20upx;">
|
||||
<view><text style="color: black;">{{item.description}}</text></view>
|
||||
<text style="color: #999999;font-size: 24upx;">{{item.time}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-bar bg-white solid-top">
|
||||
<view class="action margin-0 flex-sub text-black solid-left" data-modal="deliveryFlowDetail"
|
||||
@tap="hideModal">关闭</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'deliveryFlowDetail',
|
||||
emits: ['confirmFeedback'],
|
||||
props: {
|
||||
show: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
trackingNumber: {
|
||||
type: String
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
show: {
|
||||
handler(newVal) {
|
||||
if(newVal) {
|
||||
this.$nextTick(() => {
|
||||
this.getFLows()
|
||||
})
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
flowArr: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getFLows() {
|
||||
const res = await this.$request.getDeliveryFlow(this.trackingNumber)
|
||||
this.flowArr = res.data.traces ? res.data.traces.reverse() : [];
|
||||
},
|
||||
hideModal(e) {
|
||||
this.$emit('close', e);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
|
|
@ -0,0 +1,295 @@
|
|||
<template>
|
||||
<view class="cu-modal" :class="show?'show':''">
|
||||
<view class="cu-dialog bg-white" style="overflow: initial;">
|
||||
<view class="cu-bar">
|
||||
<view class="content">{{orderType === 1 ? '拒绝收货' : '拒绝验收'}}</view>
|
||||
<view class="action" @click="hideModal">
|
||||
<text class="cuIcon-close text-red"></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="padding text-left">
|
||||
<view class="flex justify-start align-center">
|
||||
<view class="title">选择子单:</view>
|
||||
<my-uni-combox class="form-val-area inline-input" :candidates="detailList" placeholder="请选择" :showField="'remark'"
|
||||
v-model="detailObj">
|
||||
</my-uni-combox>
|
||||
</view>
|
||||
<!-- <view class="flex justify-start align-center margin-top-sm">
|
||||
<view class="title">申请原因:</view>
|
||||
<my-uni-combox class="form-val-area inline-input" :candidates="customerReasonTypeArr" placeholder="请选择" :showField="'name'"
|
||||
v-model="customerReasonType">
|
||||
</my-uni-combox>
|
||||
</view>
|
||||
<view class="margin-top-sm flex justify-start align-center margin-top-sm" v-if="afterServiceType === 1">
|
||||
<text>最大可退款金额:</text>
|
||||
<text class="text-price text-red">{{detailObj ? detailObj.payMoney : 0}}</text>
|
||||
</view>
|
||||
<view class="margin-top-sm flex justify-start align-center margin-top-sm" v-if="afterServiceType === 1">
|
||||
<view>退款金额:</view>
|
||||
<input type="digit" class="radius-input inline-input" v-model="refund" style="flex-basis: 70%;"></input>
|
||||
</view> -->
|
||||
<!-- <view class="margin-top-sm flex justify-start margin-top-sm">
|
||||
<view>具体原因:</view>
|
||||
<textarea style="height: 200rpx;" class="solid radius text-left padding-sm inline-input"
|
||||
v-model="remark" maxlength="-1"></textarea>
|
||||
</view> -->
|
||||
<!-- 上传图片 -->
|
||||
<!-- <view class="padding-top">
|
||||
<view class="grid col-3 grid-square flex-sub margin-top-sm">
|
||||
<view class="bg-img" v-for="(item,index) in imgList" :key="index"
|
||||
@tap="viewImage($event, imgList)" :data-url="item">
|
||||
<image :src="item" mode="aspectFill"></image>
|
||||
<view class="cu-tag bg-red" @tap.stop="delImg($event, imgList)" :data-index="index">
|
||||
<text class='cuIcon-close'></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="solids" @tap="chooseImgList(e, imgList)" v-if="imgList.length < 3">
|
||||
<text class='cuIcon-cameraadd'></text>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="cu-bar solid-top">
|
||||
<view class="action margin-0 flex-sub text-black" @click="hideModal">取消</view>
|
||||
<view class="action margin-0 flex-sub text-main-color solid-left" @click="apply">确认</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import myUniCombox from '@/components/uni-combox/my-uni-combox.vue';
|
||||
|
||||
export default {
|
||||
name: 'OrderReturn',
|
||||
components: {
|
||||
myUniCombox
|
||||
},
|
||||
props: {
|
||||
data: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
afterServiceType: 2, // 1为申请退款,2为发起售后
|
||||
orderType: 0,
|
||||
customerReasonTypeArr: [
|
||||
{
|
||||
code: 1,
|
||||
name: '上门/服务不守时'
|
||||
},{
|
||||
code: 2,
|
||||
name: '态度不友好,无法继续'
|
||||
},{
|
||||
code: 3,
|
||||
name: '服务效果差,未达到合格'
|
||||
},{
|
||||
code: 4,
|
||||
name: '技能水平问题,未妥善完成'
|
||||
},{
|
||||
code: 5,
|
||||
name: '要求加费用,费用不合理'
|
||||
},{
|
||||
code: 6,
|
||||
name: '订单拖太久了'
|
||||
},{
|
||||
code: 7,
|
||||
name: '超了些服务内容,师傅不接受'
|
||||
},{
|
||||
code: 8,
|
||||
name: '客户/我时间不方便了'
|
||||
},{
|
||||
code: 9,
|
||||
name: '客户/我已让别的师傅服务了'
|
||||
}
|
||||
],
|
||||
customerReasonType: null,
|
||||
refund: null,
|
||||
remark: null,
|
||||
imgList: [],
|
||||
detailList: [],
|
||||
detailObj: null,
|
||||
toUpdateStatus: 1
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async init(curOrder) {
|
||||
let res = await this.$request.getDetailListByMasterId({
|
||||
orderMasterId: curOrder.orderMasterId
|
||||
});
|
||||
if (res && res.code === 0) {
|
||||
this.detailList = res.data;
|
||||
}
|
||||
},
|
||||
showModal(curOrder, params) {
|
||||
this.init(curOrder);
|
||||
this.orderType = params.orderType;
|
||||
this.toUpdateStatus = params.toUpdateStatus;
|
||||
this.show = true;
|
||||
},
|
||||
hideModal(e) {
|
||||
this.resetData();
|
||||
this.$emit('cancel');
|
||||
this.show = false;
|
||||
},
|
||||
resetData() {
|
||||
this.orderType = 0;
|
||||
this.customerReasonType = null;
|
||||
this.data = null;
|
||||
this.refund = null;
|
||||
this.imgList = [];
|
||||
this.remark = null;
|
||||
},
|
||||
chooseImgList(e, imgList) {
|
||||
uni.chooseImage({
|
||||
count: 3 - imgList.length, //默认9
|
||||
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||||
sourceType: ['album'], //从相册选择
|
||||
success: (res) => {
|
||||
uni.showLoading({
|
||||
title: '上传中',
|
||||
mask: true
|
||||
});
|
||||
res.tempFilePaths.forEach((tmpUrl, index) => {
|
||||
this.$request.uploadFile(tmpUrl).then((url) => {
|
||||
imgList.push(url);
|
||||
if (index === res.tempFilePaths.length - 1) {
|
||||
uni.hideLoading();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
viewImage(e, imgList) {
|
||||
uni.previewImage({
|
||||
urls: imgList,
|
||||
current: e.currentTarget.dataset.url
|
||||
});
|
||||
},
|
||||
delImg(e, imgList) {
|
||||
uni.showModal({
|
||||
title: '',
|
||||
content: '确定要删除这张图片吗?',
|
||||
cancelText: '取消',
|
||||
confirmText: '确定',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
imgList.splice(e.currentTarget.dataset.index, 1)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
validData() {
|
||||
let errMsg = null;
|
||||
if (!this.detailObj) {
|
||||
errMsg = "请选择子单";
|
||||
} else if (this.afterServiceType == 1 && this.refund == null) {
|
||||
errMsg = "退款金额不能为空";
|
||||
} else if (this.afterServiceType == 1 && this.refund > this.detailObj.payMoney) {
|
||||
errMsg = "不可超出最大退款金额";
|
||||
}
|
||||
if (errMsg) {
|
||||
uni.showToast({
|
||||
title: errMsg,
|
||||
duration: 1500,
|
||||
icon: 'none'
|
||||
})
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
async apply() {
|
||||
// if (!this.validData()) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// let imgObjList = [];
|
||||
// this.imgList.forEach(url => {
|
||||
// imgObjList.push({
|
||||
// imgUrl: url,
|
||||
// imgUploadBy: 1
|
||||
// })
|
||||
// })
|
||||
// let res = await this.$request.addAfterServiceRecord({
|
||||
// customerReasonType: this.customerReasonType.code,
|
||||
// customerReason: this.remark,
|
||||
// orderDetailId: this.detailObj.orderDetailId,
|
||||
// operType: this.afterServiceType,
|
||||
// refund: this.refund,
|
||||
// imgsList: imgObjList,
|
||||
// createBy: 1
|
||||
// });
|
||||
// if (res && res.code === 0) {
|
||||
// let updateStatusRes = {
|
||||
// code: 0
|
||||
// }
|
||||
// if (this.toUpdateStatus) {
|
||||
// updateStatusRes = await this.$request.updateOrder({
|
||||
// id: this.data.orderMasterId,
|
||||
// orderStatus: 3
|
||||
// });
|
||||
// }
|
||||
// if (updateStatusRes && updateStatusRes.code === 0) {
|
||||
// this.hideModal();
|
||||
// this.$emit('confirmFeedback');
|
||||
// uni.showToast({
|
||||
// title: '已发起售后,进度可在订单详情内查看',
|
||||
// icon: 'none',
|
||||
// duration: 2000
|
||||
// })
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
// uni.showToast({
|
||||
// title: '无法对同一个订单重复发起售后或退款',
|
||||
// icon: 'none',
|
||||
// duration: 2000
|
||||
// })
|
||||
if (!this.detailObj) {
|
||||
uni.showToast({
|
||||
title: "请选择子单",
|
||||
duration: 1500,
|
||||
icon: 'none'
|
||||
})
|
||||
return false;
|
||||
}
|
||||
|
||||
// let res = await this.$request.updateDetailOrder({
|
||||
// id: this.detailObj.orderDetailId,
|
||||
// orderStatus: this.toUpdateStatus,
|
||||
// });
|
||||
let res = await this.$request.returnOrder({
|
||||
id: this.detailObj.orderDetailId
|
||||
});
|
||||
if (res && res.code === 0) {
|
||||
this.hideModal();
|
||||
this.$emit('confirmFeedback');
|
||||
await this.$request.addOrderOperate({
|
||||
orderId: this.detailObj.orderDetailId,
|
||||
orderType: '02',
|
||||
content: this.orderType == 1 ? '拒绝收货' : '拒绝验收'
|
||||
});
|
||||
uni.showToast({
|
||||
icon: 'success'
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '操作失败',
|
||||
duration: 1000
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.inline-input {
|
||||
flex-basis: 74%;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -83,7 +83,7 @@
|
|||
<text class="cuIcon-close text-bold text-red"></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="padding-xl">
|
||||
<view class="padding">
|
||||
<view class="flex align-start margin-bottom-xl padding-lr">
|
||||
<view class="margin-right-sm">选品广场:</view>
|
||||
<view class="margin-right-sm">
|
||||
|
|
@ -94,19 +94,19 @@
|
|||
</checkbox>
|
||||
</view> -->
|
||||
<view class="margin-bottom-sm">
|
||||
<text class="margin-right-xs">正选</text>
|
||||
<text class="margin-right-xs">服务商城</text>
|
||||
<checkbox style="transform:scale(0.9)" class="main-color" :value="agreeShield" :checked="agreeShield === 1"
|
||||
@click="changeAgreeShield(1)">
|
||||
</checkbox>
|
||||
</view>
|
||||
<view>
|
||||
<text class="margin-right-xs">反选</text>
|
||||
<text class="margin-right-xs">配件商城</text>
|
||||
<checkbox style="transform:scale(0.9)" class="main-color" :value="agreeShield" :checked="agreeShield === 2"
|
||||
@click="changeAgreeShield(2)">
|
||||
</checkbox>
|
||||
</view>
|
||||
</view>
|
||||
<view class="text-left">
|
||||
<view class="text-left" :style="{marginTop: agreeShield === 2 ? '60rpx' : '0'}">
|
||||
<view>逐条选品</view>
|
||||
<view>
|
||||
<text class="text-main-color" @tap="showModal('categoryModal')">去选品</text>
|
||||
|
|
@ -193,7 +193,11 @@
|
|||
customerId: this.curUserInfo.customerId,
|
||||
isDistributor: true
|
||||
});
|
||||
this.loadCategory();
|
||||
this.loadCategory({
|
||||
customerId: this.curUserInfo.customerId,
|
||||
type: this.agreeShield,
|
||||
isSetting: 1
|
||||
});
|
||||
},
|
||||
async loadMyInfo(params) {
|
||||
let res = await this.$request.qryCustomerList(params);
|
||||
|
|
@ -208,6 +212,7 @@
|
|||
async loadCategory(params) {
|
||||
let res = await this.$request.getProductCategories(params);
|
||||
res = res[1].data.data;
|
||||
this.categoryList = []
|
||||
res.forEach(firstCategory => {
|
||||
if (firstCategory.child && firstCategory.child.length) {
|
||||
this.categoryList = this.categoryList.concat(firstCategory.child)
|
||||
|
|
@ -278,6 +283,13 @@
|
|||
changeAgreeShield(agreeShield) {
|
||||
if(agreeShield === this.agreeShield) return
|
||||
this.agreeShield = agreeShield;
|
||||
|
||||
this.loadCategory({
|
||||
customerId: this.curUserInfo.customerId,
|
||||
type: this.agreeShield,
|
||||
isSetting: 1
|
||||
});
|
||||
|
||||
// this.$refs.multiSelectNav.clearChosenItem();
|
||||
this.goChooseItem()
|
||||
// uni.showToast({
|
||||
|
|
@ -290,12 +302,15 @@
|
|||
},
|
||||
async goChooseItem() {
|
||||
const res = await this.$request.getChooseCategories({
|
||||
selectionType: this.agreeShield,
|
||||
selectionType: 1,
|
||||
type: this.agreeShield,
|
||||
customerId: this.curUserInfo.customerId
|
||||
})
|
||||
console.log(res);
|
||||
if(res[1].data.data.length) {
|
||||
this.$refs.multiSelectNav.setChooseItems([...res[1].data.data])
|
||||
} else {
|
||||
this.$refs.multiSelectNav.setChooseItems([])
|
||||
}
|
||||
// this.showModal('categoryModal')
|
||||
},
|
||||
|
|
@ -318,7 +333,8 @@
|
|||
let res = await this.$request.addCustomerSelection({
|
||||
customerId: this.curUserInfo.customerId,
|
||||
deptCategoryIds: chosenCategoryIds,
|
||||
selectionType: this.agreeShield == 3 ? 1 : this.agreeShield
|
||||
selectionType: 1,
|
||||
type: this.agreeShield
|
||||
});
|
||||
if (res && res.code === 0) {
|
||||
uni.showToast({
|
||||
|
|
|
|||
|
|
@ -50,25 +50,28 @@
|
|||
</view>
|
||||
<view class="margin-right-sm"><text>优惠</text><text class="text-price text-red">{{shopOrder.discountMoney}}</text>
|
||||
</view>
|
||||
<view class="margin-right-sm" v-if="shopOrder.payStatus == 1 && shopOrder.changeMoney"><text>已付款</text><text class="text-price text-red">{{shopOrder.payMoney}}</text>
|
||||
<view class="margin-right-sm" v-if="shopOrder.payStatus == 1 && shopOrder.paymentMoney"><text>已付款</text><text class="text-price text-red">{{shopOrder.paymentMoney}}</text>
|
||||
</view>
|
||||
<view class="text-lg" v-if="shopOrder.payStatus == 1 && shopOrder.changeMoney"><text>需付款</text><text
|
||||
class="text-price text-red text-lg text-bold">{{shopOrder.changeMoney}}</text></view>
|
||||
<view class="text-lg" v-else-if="shopOrder.payStatus == 1"><text>实付款</text><text
|
||||
class="text-price text-red text-lg text-bold">{{shopOrder.payMoney}}</text></view>
|
||||
class="text-price text-red text-lg text-bold">{{shopOrder.paymentMoney}}</text></view>
|
||||
<view class="text-lg" v-else-if="shopOrder.payStatus == 0"><text>需付款</text><text
|
||||
class="text-price text-red text-lg text-bold">{{Math.round((shopOrder.payMoney + shopOrder.changeMoney) * 100) / 100}}</text></view>
|
||||
</view>
|
||||
<view class="padding-bottom-sm flex justify-end align-end text-red text-lg" v-if="shopOrder.payStatus == 1 && shopOrder.changeMoney">您有报价/加价申请待付款中......</view>
|
||||
<view v-if="orderType === 0" class="padding-tb-sm">
|
||||
<view class="padding-bottom-sm flex justify-end align-end text-red text-lg" v-if="shopOrder.changeMoney">您有报价/加价申请待付款中......</view>
|
||||
<view class="padding-tb-sm">
|
||||
<view class="flex justify-end">
|
||||
<button v-if="[0,1].indexOf(shopOrder.orderStatus) >= 0" class="cu-btn bg-gray margin-right-sm shadow-blur" @click="showModalByRef('confirmModal', shopOrder)">取消订单</button>
|
||||
<button v-if="shopOrder.payStatus != 1 || shopOrder.changeMoney" class="cu-btn bg-main-color shadow-blur margin-right-sm" @click="wxpay(shopOrder)">付款</button>
|
||||
<button v-if="shopOrder.orderStatus == 4" class="cu-btn bg-main-color shadow-blur margin-right-sm" @click="showModalByRef('orderReturn', shopOrder, {orderType: orderType, toUpdateStatus: orderType == 1 ? 1 : 3})">{{orderType == 1 ? '拒绝收货' : '拒绝验收'}}</button>
|
||||
<button v-if="shopOrder.orderStatus == 4 && orderType == 1" class="cu-btn bg-main-color shadow-blur margin-right-sm" @click="orderDelay(shopOrder)">延期到货</button>
|
||||
|
||||
<button class="cu-btn bg-main-color shadow-blur" @click="showServDetail(shopOrder)">查看</button>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="orderType === 0 && shopOrder.orderStatus === 4"
|
||||
class="padding-tb-sm solid-top">
|
||||
<view v-if="shopOrder.orderStatus === 4"
|
||||
class="padding-tb-sm solid-top flex justify-between align-center">
|
||||
<view>师傅已提交完成,请验收。</view>
|
||||
<!-- <view>服务保障权益期:</view> -->
|
||||
<view class="flex justify-between align-end">
|
||||
|
|
@ -76,7 +79,7 @@
|
|||
<view>
|
||||
<button class="cu-btn sm bg-yellow margin-right-sm"
|
||||
@click="updateFinisheStatus(shopOrder, 5, false)">确认完单</button>
|
||||
<button class="cu-btn sm bg-yellow margin-right-sm" @click="showModalByRef('applyAfterService', shopOrder, {afterServiceType: 2, toUpdateStatus: true})">拒绝完单</button>
|
||||
<button class="cu-btn sm bg-yellow margin-right-sm" @click="showModalByRef(orderType == 1 ? 'applyAfterServiceGoods' : 'applyAfterService', shopOrder, {afterServiceType: 2, toUpdateStatus: true})">拒绝完单</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -111,6 +114,8 @@
|
|||
<load-status-bar ref="loadStatusBar" @loadMore="loadOrderPage"></load-status-bar>
|
||||
<confirm-modal ref="confirmModal" :content="'是否确定取消订单?'" @confirm="cancelOrder" @cancel="blurCurOrder"></confirm-modal>
|
||||
<apply-after-service ref="applyAfterService" :data="curOrder" @confirmFeedback="reloadOrderPage" @cancel="blurCurOrder"></apply-after-service>
|
||||
<apply-after-service-goods ref="applyAfterServiceGoods" :data="curOrder" @confirmFeedback="reloadOrderPage" @cancel="blurCurOrder"></apply-after-service-goods>
|
||||
<orderReturn ref="orderReturn" data="curOrder" @confirmFeedback="reloadOrderPage" @cancel="blurCurOrder"></orderReturn>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -118,12 +123,16 @@
|
|||
import productPicked from '@/pages/my/components/product-picked.vue';
|
||||
import loadStatusBar from '@/components/custom-bar/load-status-bar.vue';
|
||||
import applyAfterService from '@/pages/my/components/modal/apply-after-service.vue';
|
||||
import applyAfterServiceGoods from '@/pages/my/components/modal/apply-after-service-goods.vue';
|
||||
import orderReturn from '@/pages/my/components/modal/order-return.vue';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
productPicked,
|
||||
loadStatusBar,
|
||||
applyAfterService
|
||||
applyAfterService,
|
||||
orderReturn,
|
||||
applyAfterServiceGoods
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -202,6 +211,7 @@
|
|||
let res = null;
|
||||
if (this.tabCur === 3) {
|
||||
res = await this.$request.getAfterList({
|
||||
...params,
|
||||
customerId: params.customerId
|
||||
});
|
||||
} else {
|
||||
|
|
@ -211,11 +221,16 @@
|
|||
if (rowsLength > 0) {
|
||||
this.myOrders = this.myOrders.concat(res.rows);
|
||||
this.pageParams[this.tabCur].pageNum++;
|
||||
if (rowsLength === this.pageSize) {
|
||||
// if (rowsLength === this.pageSize) {
|
||||
// this.$refs.loadStatusBar.showLoadMore();
|
||||
// }
|
||||
}
|
||||
if(params.pageNum * params.pageSize < res.total) {
|
||||
this.$refs.loadStatusBar.showLoadMore();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.$refs.loadStatusBar.showLoadOver();
|
||||
}
|
||||
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
this.$refs.loadStatusBar.showLoadErr();
|
||||
|
|
@ -247,8 +262,9 @@
|
|||
return res;
|
||||
},
|
||||
showServDetail(order) {
|
||||
const copyOrder = {...order, orderType: this.orderType}
|
||||
uni.navigateTo({
|
||||
url: '/pages/my/serv-detail?order=' + encodeURIComponent(JSON.stringify(order))
|
||||
url: '/pages/my/serv-detail?order=' + encodeURIComponent(JSON.stringify(copyOrder))
|
||||
})
|
||||
},
|
||||
showModalByRef(refName, curOrder, params) {
|
||||
|
|
@ -271,7 +287,7 @@
|
|||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '取消失败',
|
||||
title: res.msg,
|
||||
icon: 'error'
|
||||
})
|
||||
}
|
||||
|
|
@ -300,6 +316,26 @@
|
|||
url: '/pages/order/pay-result?payResult=1'
|
||||
})
|
||||
}
|
||||
},
|
||||
// 到货延期
|
||||
async orderDelay(order) {
|
||||
let res = await this.$request.orderDelayThreeDay({
|
||||
id: order.orderMasterId
|
||||
});
|
||||
if (res && res.code === 0) {
|
||||
this.reloadOrderPage();
|
||||
uni.showToast({
|
||||
title: '延期成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '延期失败',
|
||||
icon: 'error'
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
<template>
|
||||
<page-meta :page-style="'overflow:'+(ifShowPageMeta?'hidden':'visible')"></page-meta>
|
||||
<view>
|
||||
<view style="overflow: hidden;">
|
||||
<!-- 顶部操作条 -->
|
||||
<cu-custom :bgColor="'bg-main-color'" :isBack="true">
|
||||
<block slot="backText">返回</block>
|
||||
<block slot="content">服务订单详情</block>
|
||||
<block slot="content">{{order.orderType === 1 ? '商品订单详情' : '服务订单详情'}}</block>
|
||||
</cu-custom>
|
||||
<!-- 任务进度跟踪 -->
|
||||
<view v-if="servDetail.orderStatus === 3" class="bg-white margin-lr-sm padding-lr padding-bottom margin-top-sm">
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
</view>
|
||||
</template>
|
||||
<view class="cu-timeline">
|
||||
<view class="cu-item text-main-color" v-for="(item, index) in servDetail.taskTraceLine">
|
||||
<view class="cu-item text-main-color" v-for="(item, index) in servDetail.taskTraceLine" :key="index">
|
||||
<view class="content shadow-blur" :class="index === 0 ? 'bg-main-color light' : 'bg-gray'">
|
||||
<text class="margin-right">{{item.time}}</text>
|
||||
<text>{{item.action}}</text>
|
||||
|
|
@ -32,9 +32,11 @@
|
|||
<view class="bg-white margin-lr-sm margin-top-sm padding">
|
||||
<view class="flex align-center">
|
||||
<text class="text-xl margin-right">{{servDetail.goodsName}}</text>
|
||||
<view class='cu-tag bg-purple radius light margin-right-sm' v-if="servDetail.orderStatus === 3">服务中
|
||||
<view class='cu-tag bg-purple radius light margin-right-sm' v-if="servDetail.orderStatus === 3">
|
||||
{{order.orderType === 1 ? '待收货' : '服务中'}}
|
||||
</view>
|
||||
<view class='cu-tag bg-purple radius light margin-right-sm' v-if="servDetail.orderStatus === 2">待上门
|
||||
<view class='cu-tag bg-purple radius light margin-right-sm' v-if="servDetail.orderStatus === 2">
|
||||
{{order.orderType === 1 ? '待发货' : '待服务'}}
|
||||
</view>
|
||||
<view class='cu-tag bg-grey radius light margin-right-sm' v-if="servDetail.orderStatus === 6">已取消</view>
|
||||
</view>
|
||||
|
|
@ -44,14 +46,20 @@
|
|||
</view> -->
|
||||
<view class="margin-top-sm">
|
||||
<text class="cuIcon-location text-main-color margin-right-xs"></text>
|
||||
<text>{{servDetail.address}}</text>
|
||||
<text>地址:{{servDetail.provinceName + servDetail.cityName + servDetail.countryName + servDetail.streetName + servDetail.address}}</text>
|
||||
<text class="margin-left-sm text-xl text-main-color" @click="showAddress2Choose"><text class="cuIcon-edit"></text></text>
|
||||
</view>
|
||||
<view class="margin-top-sm">
|
||||
<text class="cuIcon-people text-main-color margin-right-xs"></text>
|
||||
<text class="margin-right-sm">{{servDetail.workerName}}</text>
|
||||
<text>{{servDetail.workerPhone}}</text>
|
||||
<text class="margin-left-sm text-xl text-main-color" @click="makePhoneCall(servDetail.workerPhone)"><text class="cuIcon-phone"></text></text>
|
||||
<text class="margin-right-sm">客户:{{servDetail.customerName}}</text>
|
||||
<text>{{servDetail.customerPhone}}</text>
|
||||
<text class="margin-left-sm text-xl text-main-color" @click="makePhoneCall(servDetail.customerPhone)"><text class="cuIcon-phone"></text></text>
|
||||
</view>
|
||||
<view class="margin-top-sm" v-if="servDetail.orderDetailId">
|
||||
<text class="cuIcon-friendfamous text-main-color margin-right-xs"></text>
|
||||
<text class="margin-right-sm"><text class="labels">派单公司:</text>{{servDetail.masterCompanyName}}</text>
|
||||
<text class="margin-right-xs">{{servDetail.masterWorkerPhone}}</text>
|
||||
<button class="cu-btn line-main-color sm" @click="makePhoneCall(servDetail.masterWorkerPhone)">拨打</button>
|
||||
</view>
|
||||
<view class="margin-top-sm">
|
||||
<text class="cuIcon-time text-main-color margin-right-xs"></text>
|
||||
|
|
@ -75,6 +83,12 @@
|
|||
<text class="cuIcon-message text-main-color margin-right-xs"></text>
|
||||
<text>备注:{{servDetail.customerRemark}}</text>
|
||||
</view>
|
||||
<view class="grid col-3 grid-square flex-sub margin-top-sm" v-if="servDetail.orderImages">
|
||||
<view class="bg-img" v-for="(imgUrl, index) in servDetail.orderImages.split(',')" :key="index">
|
||||
<image :src="imgUrl" @tap="viewImage($event, [imgUrl])" :data-url="imgUrl" mode="aspectFill">
|
||||
</image>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="margin-top-xs text-sm text-gray"
|
||||
v-for="(item, index) in servDetail.mainServOrder.gratuityRecord">
|
||||
追加费用:<text class="text-price">{{item.price}}</text>[{{item.type}}]
|
||||
|
|
@ -92,43 +106,163 @@
|
|||
:columnTitleArr="servingColumnHeaders" :valFieldArr="servingValFields"></simple-product-picked>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="bg-white margin-lr-sm padding-lr margin-top-sm padding" v-if="servDetail.serviceShop">
|
||||
<template v-if="servDetail.serviceCancelled != 1">
|
||||
<view class="text-black text-bold flex justify-between">
|
||||
<text>安装/服务/施工门店</text>
|
||||
<!-- <text @click="goChooseShop">更多></text> -->
|
||||
</view>
|
||||
<view class="flex-sub flex margin-top-sm" @click="openShopLocation(servDetail.serviceShop)">
|
||||
<view style="width: 150rpx;height: 150rpx;margin-right:10px;">
|
||||
<image style="width: 100%;height: 100%;" :src="servDetail.serviceShop.imageUrl" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="flex-sub">
|
||||
<view class="text-bold" style="text-overflow: ellipsis;overflow: hidden;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;">
|
||||
现已选中: {{servDetail.serviceShop.shopName}}
|
||||
</view>
|
||||
<view class="padding-tb-xs" style="position: relative;">
|
||||
<view class="margin-lr-sm" style="display: inline-block;" v-if="servDetail.serviceShop.distance">
|
||||
<view class="cu-tag bg-red" style="padding: 0 2px;height: auto;">距离您</view>
|
||||
<text class="text-gray" style="vertical-align: middle;">{{servDetail.serviceShop.distance}}</text>
|
||||
</view>
|
||||
<image src="/static/navigation.png" style="width: 50rpx;height: 50rpx;display: inline-block;position: absolute;top: 5px;right: -10px;"></image>
|
||||
</view>
|
||||
<view>{{servDetail.serviceShop.provinceName + servDetail.serviceShop.cityName + servDetail.serviceShop.countryName + servDetail.serviceShop.streetName + servDetail.serviceShop.address}}</view>
|
||||
<view class="flex justify-between align-center margin-bottom-xs padding-top">
|
||||
<view>
|
||||
<text class="text-bold text-lg margin-lr-xs">店长:{{servDetail.serviceShop.phone}}</text>
|
||||
</view>
|
||||
<button class="cu-btn line-main-color" @click.stop="makePhoneCall(servDetail.serviceShop.phone)">拨打</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
<view class="bg-white margin-lr-sm padding-lr margin-top-sm padding" v-else-if="servDetail.shop">
|
||||
<view class="text-black text-bold flex justify-between">
|
||||
<text>安装/服务/施工门店</text>
|
||||
<!-- <text @click="goChooseShop">更多></text> -->
|
||||
</view>
|
||||
<view class="flex-sub flex margin-top-sm" @click="openShopLocation(servDetail.shop)">
|
||||
<view style="width: 150rpx;height: 150rpx;margin-right:10px;">
|
||||
<image style="width: 100%;height: 100%;" :src="servDetail.shop.imageUrl" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="flex-sub">
|
||||
<view class="text-bold" style="text-overflow: ellipsis;overflow: hidden;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;">
|
||||
现已选中: {{servDetail.shop.shopName}}
|
||||
</view>
|
||||
<view class="padding-tb-xs" style="position: relative;">
|
||||
<view class="margin-lr-sm" style="display: inline-block;" v-if="servDetail.shop.distance">
|
||||
<view class="cu-tag bg-red" style="padding: 0 2px;height: auto;">距离您</view>
|
||||
<text class="text-gray" style="vertical-align: middle;">{{servDetail.shop.distance}}</text>
|
||||
</view>
|
||||
<image src="/static/navigation.png" style="width: 50rpx;height: 50rpx;display: inline-block;position: absolute;top: 5px;right: -10px;"></image>
|
||||
</view>
|
||||
<view>{{servDetail.shop.provinceName + servDetail.shop.cityName + servDetail.shop.countryName + servDetail.shop.streetName + servDetail.shop.address}}</view>
|
||||
<view class="flex justify-between align-center margin-bottom-xs padding-top">
|
||||
<view>
|
||||
<text class="text-bold text-lg margin-lr-xs">店长:{{servDetail.shop.phone}}</text>
|
||||
</view>
|
||||
<button class="cu-btn line-main-color" @click.stop="makePhoneCall(servDetail.shop.phone)">拨打</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 子单完成记录 -->
|
||||
<view class="bg-white margin-lr-sm padding-lr padding-bottom margin-top-sm"
|
||||
v-for="(item, index) in servDetail.orderStandardDetailList">
|
||||
v-for="(item, index) in servDetail.orderStandardDetailList" :key="index">
|
||||
<view class="cu-bar solid-bottom">
|
||||
<view class="action bar-first-action">
|
||||
<text class="cuIcon-titles text-main-color"></text> 服务记录
|
||||
<text class="cuIcon-titles text-main-color"></text> {{ order.orderType === 1 ? '发货记录' : '服务记录'}}
|
||||
</view>
|
||||
<view class='cu-tag bg-gray radius light' v-if="item.orderStatus == 6">已取消</view>
|
||||
<view class='cu-tag bg-purple radius light margin-right-sm'>编码:{{item.orderDetailCode}}</view>
|
||||
</view>
|
||||
<view class="margin-top-sm">
|
||||
<view>师傅:{{item.workerName}}</view>
|
||||
<view>{{order.orderType == 1 ? '商家' : '师傅'}}:{{item.workerName}}</view>
|
||||
<view class="margin-top-sm">联系方式:{{item.workerPhone}}<text class="margin-left-sm text-xl text-main-color" @click="makePhoneCall(item.workerPhone)"><text class="cuIcon-phone"></text></text></view>
|
||||
<view class="margin-top-sm" v-if="item.expectTimeEndFront">预约时间:{{item.expectTimeStartFront + '~' + item.expectTimeEndFront}}</view>
|
||||
<view class="margin-top-sm" v-else>预约时间:{{item.expectTimeStartFront}}</view>
|
||||
<template v-if="order.orderType === 0">
|
||||
<view class="margin-top-sm" v-if="servDetail.orderStatus >= 3">上门时间:{{item.workBeginTime}}</view>
|
||||
<view class="margin-top-sm" v-if="servDetail.orderStatus >= 4">完成时间:{{item.workFinishTime}}</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
<view class="margin-top-sm" v-if="servDetail.orderStatus >= 3">发货时间:{{item.workBeginTime}}</view>
|
||||
</template>
|
||||
<simple-product-picked :pickedList="item.orderStandardList" :columnTitleArr="servedColumnHeaders"
|
||||
:valFieldArr="servedValFields"></simple-product-picked>
|
||||
</view>
|
||||
<view v-if="item.financialChangeRecord && item.financialChangeRecord.length > 0" class="bg-white">
|
||||
<view v-if="item.financialChangeRecord && item.financialChangeRecord.length > 0" class="bg-white" v-for="addRecord in item.financialChangeRecord" :key="addRecord.id">
|
||||
<view class="cu-bar solid-bottom">
|
||||
<view class="action bar-first-action">
|
||||
<text class="cuIcon-title text-main-color"></text> 加价记录
|
||||
</view>
|
||||
</view>
|
||||
<view class="padding-tb-sm" v-for="(changeRecord, changeRecordIndex) in item.financialChangeRecord">
|
||||
<view class="padding-tb-sm add-price">
|
||||
<view>
|
||||
<text>加价金额:</text>
|
||||
<text>{{changeRecord.changeMoney}}</text>
|
||||
<text>{{addRecord.changeMoney + (addRecord.attachmentMoney || 0)}}</text>
|
||||
</view>
|
||||
<!-- <view v-if="addRecord.reason && addRecord.reason.indexOf('含') > -1">
|
||||
<text>{{addRecord.reason.split('含')[1]}}:</text>
|
||||
<text>{{addRecord.changeMoney}}</text>
|
||||
</view> -->
|
||||
<view>
|
||||
<text>加价备注:</text>
|
||||
<text>{{changeRecord.remark}}</text>
|
||||
<text>{{addRecord.remark || ''}}</text>
|
||||
</view>
|
||||
<!-- <view v-if="addRecord.urls">
|
||||
<view class="grid col-3 grid-square flex-sub margin-top-sm">
|
||||
<view class="bg-img" v-for="imgUrl in addRecord.urls.split(',')" :key="imgUrl">
|
||||
<image :src="imgUrl" @tap="viewImage($event, [imgUrl])" :data-url="imgUrl" mode="aspectFill">
|
||||
</image>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="text-main-color" @click="changeOrderPrice(item.orderDetailId)" v-if="addRecord.payStatus === 0">清空加价</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<view class="bg-white margin-top-sm" v-if="item.deliveryType">
|
||||
<view v-if="item.deliveryType">
|
||||
发货方式:
|
||||
<text v-if="item.deliveryType == 1">发快递/物流</text>
|
||||
<text v-if="item.deliveryType == 2">送货上门</text>
|
||||
<text v-if="item.deliveryType == 3">客户自提</text>
|
||||
</view>
|
||||
<view class="margin-top-xs" v-if="item.deliveryImages">
|
||||
<view class="grid col-3 grid-square flex-sub">
|
||||
<view class="bg-img" v-for="imgUrl in item.deliveryImages.split(',')" :key="imgUrl">
|
||||
<image :src="imgUrl" @tap="viewImage($event, [imgUrl])" :data-url="imgUrl" mode="aspectFill">
|
||||
</image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="margin-top-xs" v-if="item.deliveryRemark"><text>发货备注:{{item.deliveryRemark}}</text></view>
|
||||
<view class="margin-top-xs" v-if="item.trackingNumber">
|
||||
<text>快递单号:{{item.trackingNumber}}</text>
|
||||
<text class="text-main-color margin-left-sm" @click="getDeliveryFlow(item.trackingNumber)">查询</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 交货记录 -->
|
||||
<view class="bg-white margin-top-sm" v-if="item.handoverRemark || item.handoverImages">
|
||||
<view>交货记录</view>
|
||||
<view class="margin-top-xs" v-if="item.handoverImages">
|
||||
<view class="grid col-3 grid-square flex-sub">
|
||||
<view class="bg-img" v-for="imgUrl in item.handoverImages.split(',')" :key="imgUrl">
|
||||
<image :src="imgUrl" @tap="viewImage($event, [imgUrl])" :data-url="imgUrl" mode="aspectFill">
|
||||
</image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="margin-top-xs" v-if="item.deliveryRemark"><text>交货备注:{{item.handoverRemark}}</text></view>
|
||||
</view>
|
||||
|
||||
<view v-if="servDetail.orderStatus > 3 && item.finishImgList && item.finishImgList.length" class="bg-white">
|
||||
<view class="cu-bar solid-bottom">
|
||||
<view class="action bar-first-action">
|
||||
|
|
@ -152,11 +286,12 @@
|
|||
{{item.afterServiceRecordList[0].operType === 1 ? '退款记录' : '售后记录'}}
|
||||
</view>
|
||||
</view>
|
||||
<view v-for="(afterServiceRecord, afterServiceRecordIndex) in item.afterServiceRecordList">
|
||||
<view v-for="(afterServiceRecord, afterServiceRecordIndex) in item.afterServiceRecordList" :key="afterServiceRecordIndex">
|
||||
<view v-if="afterServiceRecord.createBy == 1" class="padding-tb-sm solid-top">
|
||||
<view class='cu-tag bg-main-color radius light'>售后发起中</view>
|
||||
<view v-if="afterServiceRecord.operType === 1">
|
||||
<view class="text-gray text-sm margin-bottom-xs">退单退款已提交至商家,其最大时限24小时内需完成操作!</view>
|
||||
<view class="text-gray text-sm margin-bottom-xs" v-if="order.orderType === 1">等待商家操作,24小时未操作将自动同意!</view>
|
||||
<view class="text-gray text-sm margin-bottom-xs" v-else>待师傅操作反馈,24小时内不操作自动同意!</view>
|
||||
<view class="flex justify-start align-end">
|
||||
<text>退款申请:</text>
|
||||
<uni-countdown :show-colon="false" :backgroundColor="'#eee'"
|
||||
|
|
@ -170,8 +305,29 @@
|
|||
<text>退款金额:</text>
|
||||
<text>{{afterServiceRecord.refund}}</text>
|
||||
</view>
|
||||
<view v-if="order.orderType === 1">
|
||||
<text>售后类型:</text>
|
||||
<text v-if="afterServiceRecord.afterServiceType === 1">未收到货,我要退单退款!</text>
|
||||
<text v-else-if="afterServiceRecord.afterServiceType === 2">未收到货(发货在途),我要退款!</text>
|
||||
<text v-else-if="afterServiceRecord.afterServiceType === 3">已收到货,我要退款退货!</text>
|
||||
</view>
|
||||
<view>
|
||||
<text>退款原因:</text>
|
||||
<template v-if="order.orderType === 1">
|
||||
<text v-if="afterServiceRecord.customerReasonType === 1">不想要了</text>
|
||||
<text v-else-if="afterServiceRecord.customerReasonType === 2">买错型号尺寸了</text>
|
||||
<text v-else-if="afterServiceRecord.customerReasonType === 3">材质与商品描述不符</text>
|
||||
<text v-else-if="afterServiceRecord.customerReasonType === 4">大小尺寸与商品描述不符</text>
|
||||
<text v-else-if="afterServiceRecord.customerReasonType === 5">颜色、款式、型号与描述不符</text>
|
||||
<text v-else-if="afterServiceRecord.customerReasonType === 6">出现质量问题</text>
|
||||
<text v-else-if="afterServiceRecord.customerReasonType === 7">收到商品少件(少配件)</text>
|
||||
<text v-else-if="afterServiceRecord.customerReasonType === 8">商家发错货</text>
|
||||
<text v-else-if="afterServiceRecord.customerReasonType === 9">商品破损或污渍</text>
|
||||
<text v-else-if="afterServiceRecord.customerReasonType === 10">未按承诺时间发货</text>
|
||||
<text v-else-if="afterServiceRecord.customerReasonType === 11">未见快递/物流有信息</text>
|
||||
<text v-else-if="afterServiceRecord.customerReasonType === 12">其它原因</text>
|
||||
</template>
|
||||
<template v-else>
|
||||
<text v-if="afterServiceRecord.customerReasonType === 1">上门/服务不守时</text>
|
||||
<text v-else-if="afterServiceRecord.customerReasonType === 2">态度不友好,无法继续</text>
|
||||
<text v-else-if="afterServiceRecord.customerReasonType === 3">服务效果差,未达到合格</text>
|
||||
|
|
@ -181,6 +337,7 @@
|
|||
<text v-else-if="afterServiceRecord.customerReasonType === 7">超了些服务内容,师傅不接受</text>
|
||||
<text v-else-if="afterServiceRecord.customerReasonType === 8">客户/我时间不方便了</text>
|
||||
<text v-else-if="afterServiceRecord.customerReasonType === 9">客户/我已让别的师傅服务了</text>
|
||||
</template>
|
||||
</view>
|
||||
<view>
|
||||
<text>具体原因:</text>
|
||||
|
|
@ -205,8 +362,29 @@
|
|||
:second="$dateUtil.countDownDiff($dateUtil.addHours(afterServiceRecord.createTime, 24)).seconds">
|
||||
</uni-countdown>
|
||||
</view>
|
||||
<view v-if="order.orderType === 1">
|
||||
<text>售后类型:</text>
|
||||
<text v-if="afterServiceRecord.afterServiceType === 1">未收到货,我要退单退款!</text>
|
||||
<text v-else-if="afterServiceRecord.afterServiceType === 2">未收到货(发货在途),我要退款!</text>
|
||||
<text v-else-if="afterServiceRecord.afterServiceType === 3">已收到货,我要退款退货!</text>
|
||||
</view>
|
||||
<view>
|
||||
<text>售后原因:</text>
|
||||
<text>退款原因:</text>
|
||||
<template v-if="order.orderType === 1">
|
||||
<text v-if="afterServiceRecord.customerReasonType === 1">不想要了</text>
|
||||
<text v-else-if="afterServiceRecord.customerReasonType === 2">买错型号尺寸了</text>
|
||||
<text v-else-if="afterServiceRecord.customerReasonType === 3">材质与商品描述不符</text>
|
||||
<text v-else-if="afterServiceRecord.customerReasonType === 4">大小尺寸与商品描述不符</text>
|
||||
<text v-else-if="afterServiceRecord.customerReasonType === 5">颜色、款式、型号与描述不符</text>
|
||||
<text v-else-if="afterServiceRecord.customerReasonType === 6">出现质量问题</text>
|
||||
<text v-else-if="afterServiceRecord.customerReasonType === 7">收到商品少件(少配件)</text>
|
||||
<text v-else-if="afterServiceRecord.customerReasonType === 8">商家发错货</text>
|
||||
<text v-else-if="afterServiceRecord.customerReasonType === 9">商品破损或污渍</text>
|
||||
<text v-else-if="afterServiceRecord.customerReasonType === 10">未按承诺时间发货</text>
|
||||
<text v-else-if="afterServiceRecord.customerReasonType === 11">未见快递/物流有信息</text>
|
||||
<text v-else-if="afterServiceRecord.customerReasonType === 12">其它原因</text>
|
||||
</template>
|
||||
<template v-else>
|
||||
<text v-if="afterServiceRecord.customerReasonType === 1">上门/服务不守时</text>
|
||||
<text v-else-if="afterServiceRecord.customerReasonType === 2">态度不友好,无法继续</text>
|
||||
<text v-else-if="afterServiceRecord.customerReasonType === 3">服务效果差,未达到合格</text>
|
||||
|
|
@ -216,6 +394,7 @@
|
|||
<text v-else-if="afterServiceRecord.customerReasonType === 7">超了些服务内容,师傅不接受</text>
|
||||
<text v-else-if="afterServiceRecord.customerReasonType === 8">客户/我时间不方便了</text>
|
||||
<text v-else-if="afterServiceRecord.customerReasonType === 9">客户/我已让别的师傅服务了</text>
|
||||
</template>
|
||||
</view>
|
||||
<view>
|
||||
<text>具体原因:</text>
|
||||
|
|
@ -232,95 +411,375 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex justify-end align-end margin-tb-sm">
|
||||
<view class="flex justify-end align-end margin-tb-sm" v-if="item.afterPlatformServiceStatus === 0 || item.afterPlatformServiceStatus == 1">
|
||||
<button class="cu-btn sm bg-yellow margin-left" v-show="afterServiceRecord.customerFinalCheck !== 1"
|
||||
@click="cancelAfterService(afterServiceRecord.id)">撤销</button>
|
||||
@click="cancelAfterService(afterServiceRecord)">撤销</button>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="afterServiceRecord.updateBy == 2" class="padding-tb-sm solid-top">
|
||||
<view class='cu-tag bg-main-color radius light'>师傅反馈</view>
|
||||
<view v-if="afterServiceRecord.updateBy != 1 && afterServiceRecord.workerFeedbackResult !== null" class="padding-tb-sm solid-top">
|
||||
<view class='cu-tag bg-main-color radius light'>{{order.orderType == 1 ? '商家' : '师傅'}}反馈</view>
|
||||
<view v-if="afterServiceRecord.operType === 1">
|
||||
<view class="margin-top-xs">
|
||||
<text>师傅反馈结果:</text>
|
||||
<text>{{order.orderType == 1 ? '商家' : '师傅'}}反馈结果:</text>
|
||||
<text v-if="afterServiceRecord.workerFeedbackResult === 0">拒绝</text>
|
||||
<text v-else-if="afterServiceRecord.workerFeedbackResult === 1">同意</text>
|
||||
<text v-else-if="afterServiceRecord.workerFeedbackResult === 2">上门重做/补做</text>
|
||||
<text v-else-if="afterServiceRecord.workerFeedbackResult === 2 || afterServiceRecord.workerFeedbackResult === 3">{{order.orderType == 1 ? '重发/补发商品' : '上门重做/补做'}}</text>
|
||||
</view>
|
||||
<view v-if="afterServiceRecord.workerFeedbackResult === 1">
|
||||
<view v-if="(afterServiceRecord.workerFeedbackResult === 2 || afterServiceRecord.workerFeedbackResult === 3) && afterServiceRecord.workerResendPlan">
|
||||
<text v-if="afterServiceRecord.workerResendPlan == 1">重发/补发,您无需退货</text>
|
||||
<text v-if="afterServiceRecord.workerResendPlan == 2">重发/补发前,您需先退货</text>
|
||||
<text v-if="afterServiceRecord.workerResendPlan == 3">请您退回商品,给你换货</text>
|
||||
<text v-if="afterServiceRecord.workerResendPlan == 4">请退回商品,为您售后换货</text>
|
||||
</view>
|
||||
<view v-if="afterServiceRecord.workerFeedbackResult === 2 || afterServiceRecord.workerFeedbackResult === 3">{{order.orderType == 1 ? '客户同意则本次退款金额为0元' : '同意重做/补做,退款金额0'}}</view>
|
||||
<!-- <view v-if="afterServiceRecord.workerFeedbackResult === 1">
|
||||
<text>同意退款金额:</text>
|
||||
<text>{{afterServiceRecord.agreedRefund ? afterServiceRecord.agreedRefund : afterServiceRecord.refund}}</text>
|
||||
</view> -->
|
||||
<template v-if="afterServiceRecord.workerFeedbackResult === 1">
|
||||
<view>
|
||||
<text>同意退款金额:</text>
|
||||
<text>{{afterServiceRecord.agreedRefund ? afterServiceRecord.agreedRefund : afterServiceRecord.refund}}</text>
|
||||
</view>
|
||||
<view v-if="afterServiceRecord.workerFeedbackResult !== 2">
|
||||
<text>师傅反馈:</text>
|
||||
<view v-if="afterServiceRecord.workerReceiveStatus">
|
||||
<text>收货状态:</text>
|
||||
<text v-if="afterServiceRecord.workerReceiveStatus == 1">未发货</text>
|
||||
<text v-else-if="afterServiceRecord.workerReceiveStatus == 2">已发货在途</text>
|
||||
<text v-else-if="afterServiceRecord.workerReceiveStatus == 3">已收货</text>
|
||||
<text v-else-if="afterServiceRecord.workerReceiveStatus == 4">售后保障期</text>
|
||||
</view>
|
||||
<view v-if="afterServiceRecord.workerAgreeType">
|
||||
<text>同意选项:</text>
|
||||
<text v-if="afterServiceRecord.workerAgreeType == 1">同意即时退单退款</text>
|
||||
<text v-else-if="afterServiceRecord.workerAgreeType == 2">同意货物拦截后退单退款</text>
|
||||
<text v-else-if="afterServiceRecord.workerAgreeType == 3">同意快递返回货物后退单退款</text>
|
||||
<text v-else-if="afterServiceRecord.workerAgreeType == 4">同意您退回货物后退单退款</text>
|
||||
</view>
|
||||
</template>
|
||||
<view v-if="afterServiceRecord.workerFeedbackResult !== 2 && afterServiceRecord.workerFeedbackResult !== 3">
|
||||
<text>{{order.orderType == 1 ? '商家' : '师傅'}}反馈:</text>
|
||||
<text v-if="afterServiceRecord.workerFeedbackReasonType === 1">客户原因</text>
|
||||
<text v-else-if="afterServiceRecord.workerFeedbackReasonType === 2">师傅原因</text>
|
||||
<text v-else>其他</text>
|
||||
<text
|
||||
v-if="afterServiceRecord.workerFeedbackReason">{{"," + afterServiceRecord.workerFeedbackReason}}</text>
|
||||
<text v-if="afterServiceRecord.workerFeedbackReason">{{"," + afterServiceRecord.workerFeedbackReason}}</text>
|
||||
</view>
|
||||
<view class="grid col-3 grid-square flex-sub margin-top-sm">
|
||||
<view class="bg-img" v-for="(imgObj, imgIndex) in afterServiceRecord.imgsList"
|
||||
:key="imgIndex" v-if="imgObj.imgUploadBy === 2">
|
||||
<image :src="imgObj.imgUrl" @tap="viewImage($event, [imgObj.imgUrl])"
|
||||
:data-url="imgObj.imgUrl" mode="aspectFill"></image>
|
||||
<view class="grid col-3 grid-square flex-sub margin-top-sm" v-if="afterServiceRecord.workerFeedbackImages">
|
||||
<view class="bg-img" v-for="(imgUrl, imgIndex) in afterServiceRecord.workerFeedbackImages.split(',')" :key="imgIndex">
|
||||
<image :src="imgUrl" @tap="viewImage($event, [imgUrl])" :data-url="imgUrl" mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else-if="afterServiceRecord.operType === 2">
|
||||
<view class="margin-top-xs">
|
||||
<text>师傅反馈结果:</text>
|
||||
<text>{{order.orderType == 1 ? '商家' : '师傅'}}反馈结果:</text>
|
||||
<text v-if="afterServiceRecord.workerFeedbackResult === 0">拒绝</text>
|
||||
<text v-else-if="afterServiceRecord.workerFeedbackResult === 1">同意</text>
|
||||
<text v-else-if="afterServiceRecord.workerFeedbackResult === 2">上门重做/补做</text>
|
||||
<text v-else-if="afterServiceRecord.workerFeedbackResult === 2 || afterServiceRecord.workerFeedbackResult === 3">{{order.orderType == 1 ? '重发/补发商品' : '上门重做/补做'}}</text>
|
||||
</view>
|
||||
<view v-if="afterServiceRecord.workerFeedbackResult !== 2">
|
||||
<text>师傅反馈:</text>
|
||||
<view v-if="(afterServiceRecord.workerFeedbackResult === 2 || afterServiceRecord.workerFeedbackResult === 3) && afterServiceRecord.workerResendPlan">
|
||||
<text v-if="afterServiceRecord.workerResendPlan == 1">重发/补发,您无需退货</text>
|
||||
<text v-if="afterServiceRecord.workerResendPlan == 2">重发/补发前,您需先退货</text>
|
||||
<text v-if="afterServiceRecord.workerResendPlan == 3">请您退回商品,给你换货</text>
|
||||
<text v-if="afterServiceRecord.workerResendPlan == 4">请退回商品,为您售后换货</text>
|
||||
</view>
|
||||
<view style="padding-left: 196upx;" v-if="afterServiceRecord.workerFeedbackResult === 2 || afterServiceRecord.workerFeedbackResult === 3">{{order.orderType == 1 ? '客户同意则本次退款金额为0元' : '同意重做/补做,退款金额0'}}</view>
|
||||
<view v-if="afterServiceRecord.workerFeedbackResult !== 2 && afterServiceRecord.workerFeedbackResult !== 3">
|
||||
<text>{{order.orderType == 1 ? '商家' : '师傅'}}反馈:</text>
|
||||
<text v-if="afterServiceRecord.workerFeedbackReasonType === 1">客户原因</text>
|
||||
<text v-else-if="afterServiceRecord.workerFeedbackReasonType === 2">师傅原因</text>
|
||||
<text v-else>其他</text>
|
||||
<text
|
||||
v-if="afterServiceRecord.workerFeedbackReason">{{"," + afterServiceRecord.workerFeedbackReason}}</text>
|
||||
</view>
|
||||
<view class="grid col-3 grid-square flex-sub margin-top-sm">
|
||||
<view class="bg-img" v-for="(imgObj, imgIndex) in afterServiceRecord.imgsList"
|
||||
:key="imgIndex" v-if="imgObj.imgUploadBy === 2">
|
||||
<image :src="imgObj.imgUrl" @tap="viewImage($event, [imgObj.imgUrl])"
|
||||
:data-url="imgObj.imgUrl" mode="aspectFill"></image>
|
||||
<view class="grid col-3 grid-square flex-sub margin-top-sm" v-if="afterServiceRecord.workerFeedbackImages">
|
||||
<view class="bg-img" v-for="(imgUrl, imgIndex) in afterServiceRecord.workerFeedbackImages.split(',')" :key="imgIndex">
|
||||
<image :src="imgUrl" @tap="viewImage($event, [imgUrl])" :data-url="imgUrl" mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex justify-end align-end margin-tb-sm">
|
||||
<button class="cu-btn sm bg-yellow margin-right-sm" v-if="afterServiceRecord.customerFinalCheck != 1"
|
||||
@click="showNotice(item)">同意</button>
|
||||
<view class="text-right margin-top-sm margin-bottom-sm">
|
||||
<view class='cu-tag bg-yellow radius light' v-if="afterServiceRecord.customerAgreeRedo === 1">
|
||||
<text v-if="(afterServiceRecord.workerFeedbackResult === 1 && (afterServiceRecord.workerAgreeType == 2 || afterServiceRecord.workerAgreeType == 3 || afterServiceRecord.workerAgreeType == 4)) || ((afterServiceRecord.workerFeedbackResult === 2 || afterServiceRecord.workerFeedbackResult === 3) && (afterServiceRecord.workerResendPlan === 2 || afterServiceRecord.workerResendPlan === 3 || afterServiceRecord.workerResendPlan === 4))">等待商家收货/验货</text>
|
||||
<text v-else>已同意方案</text>
|
||||
</view>
|
||||
<template v-if="afterServiceRecord.returnStatus > 3 && order.orderType == 1">
|
||||
<view class='cu-tag bg-yellow radius light' v-if="afterServiceRecord.returnStatus == 3">等待商家收货</view>
|
||||
<view class='cu-tag bg-yellow radius light' v-if="afterServiceRecord.returnStatus == 4">商家已收货</view>
|
||||
</template>
|
||||
</view>
|
||||
<template v-if="afterServiceRecord.returnType">
|
||||
<view class="margin-top-xs">
|
||||
<text>客户已退货:</text>
|
||||
</view>
|
||||
<view class="flex justify-between align-center">
|
||||
<text>发货方式:{{afterServiceRecord.returnType == 1 ? '发快递/物流': (afterServiceRecord.returnType == 2 ? '送货上门' : '客户自提')}}</text>
|
||||
<text v-if="afterServiceRecord.returnType == 1" @click="copyData(afterServiceRecord.returnTrackingNumber)">{{afterServiceRecord.returnTrackingNumber}}<text class="cuIcon-copy"></text></text>
|
||||
</view>
|
||||
<view class="grid col-3 grid-square flex-sub margin-top-sm" v-if="afterServiceRecord.returnImages">
|
||||
<view class="bg-img" v-for="(imgUrl, imgIndex) in afterServiceRecord.returnImages.split(',')" :key="imgIndex">
|
||||
<image :src="imgUrl" @tap="viewImage($event, [imgUrl])" :data-url="imgUrl" mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="margin-bottom-xs" v-if="afterServiceRecord.returnRemark">
|
||||
<text>发货备注:{{afterServiceRecord.returnRemark}}</text>
|
||||
</view>
|
||||
</template>
|
||||
<template v-if="afterServiceRecord.workerFeedbackResult === 3">
|
||||
<template v-if="order.orderType == 1">
|
||||
<template v-if="afterServiceRecord.workerResendType">
|
||||
<view class="margin-top-xs">
|
||||
<text>商家重发/补发提交:</text>
|
||||
</view>
|
||||
<view class="flex justify-between align-center">
|
||||
<text>发货方式:{{afterServiceRecord.workerResendType == 1 ? '发快递/物流': (afterServiceRecord.workerResendType == 2 ? '送货上门' : '客户自提')}}</text>
|
||||
<text v-if="afterServiceRecord.workerResendType == 1" @click="copyData(afterServiceRecord.workerResendTrackingNumber)">{{afterServiceRecord.workerResendTrackingNumber}}<text class="cuIcon-copy"></text><text class="text-main-color margin-left-sm" @click.stop="getDeliveryFlow(afterServiceRecord.workerResendTrackingNumber)">查询</text></text>
|
||||
</view>
|
||||
<view class="grid col-3 grid-square flex-sub margin-top-sm" v-if="afterServiceRecord.workerResendImages">
|
||||
<view class="bg-img" v-for="(imgUrl, imgIndex) in afterServiceRecord.workerResendImages.split(',')" :key="imgIndex">
|
||||
<image :src="imgUrl" @tap="viewImage($event, [imgUrl])" :data-url="imgUrl" mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="margin-bottom-xs" v-if="afterServiceRecord.workerResendRemark">
|
||||
<text>发货备注:{{afterServiceRecord.workerResendRemark}}</text>
|
||||
</view>
|
||||
<view style="border-top: 1px solid gainsboro;padding-top: 10upx;" v-if="afterServiceRecord.customerFinalCheck == null && afterServiceRecord.workerResendType">
|
||||
<view v-if="afterServiceRecord.workerResendType == 1">
|
||||
<text class="text-gray" style="font-size: 20upx;">您需验收或审核,4天内未操作将自动完成本次售后!</text>
|
||||
<view class="flex align-center margin-top-sm">
|
||||
<text>操作时限:</text>
|
||||
<uni-countdown :show-colon="false" :backgroundColor="'#eee'"
|
||||
:day="$dateUtil.countDownDiff($dateUtil.addDays(afterServiceRecord.workerResendTime, 4)).day"
|
||||
:hour="$dateUtil.countDownDiff($dateUtil.addDays(afterServiceRecord.workerResendTime, 4)).hour"
|
||||
:minute="$dateUtil.countDownDiff($dateUtil.addDays(afterServiceRecord.workerResendTime, 4)).min"
|
||||
:second="$dateUtil.countDownDiff($dateUtil.addDays(afterServiceRecord.workerResendTime, 4)).seconds">
|
||||
</uni-countdown>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else>
|
||||
<text class="text-gray" style="font-size: 20upx;">您需验收或审核,24小时未操作将自动完成本售后!</text>
|
||||
<view class="flex align-center margin-top-sm">
|
||||
<text>操作时限:</text>
|
||||
<uni-countdown :show-colon="false" :backgroundColor="'#eee'"
|
||||
:day="$dateUtil.countDownDiff($dateUtil.addHours(afterServiceRecord.workerResendTime, 24)).day"
|
||||
:hour="$dateUtil.countDownDiff($dateUtil.addHours(afterServiceRecord.workerResendTime, 24)).hour"
|
||||
:minute="$dateUtil.countDownDiff($dateUtil.addHours(afterServiceRecord.workerResendTime, 24)).min"
|
||||
:second="$dateUtil.countDownDiff($dateUtil.addHours(afterServiceRecord.workerResendTime, 24)).seconds">
|
||||
</uni-countdown>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</template>
|
||||
<template v-else>
|
||||
<view class="margin-top-xs">
|
||||
<text>师傅重做/补做提交:</text>
|
||||
</view>
|
||||
<view class="grid col-3 grid-square flex-sub margin-top-sm" v-if="afterServiceRecord.redoCompleteImages">
|
||||
<view class="bg-img" v-for="(imgUrl, imgIndex) in afterServiceRecord.redoCompleteImages.split(',')" :key="imgIndex">
|
||||
<image :src="imgUrl" @tap="viewImage($event, [imgUrl])" :data-url="imgUrl" mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="margin-bottom-xs">
|
||||
<text>{{afterServiceRecord.redoCompleteRemark}}</text>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
</template>
|
||||
<!-- <view v-if="afterServiceRecord.workerFeedbackResult === 3 && order.orderType === 1">
|
||||
<text class="text-gray" style="font-size: 20upx;">您需验收或审核,4天内未操作将自动完成本次售后!</text>
|
||||
<view class="flex align-center margin-top-sm">
|
||||
<text>工单时限:</text>
|
||||
<uni-countdown :show-colon="false" :backgroundColor="'#eee'"
|
||||
:day="$dateUtil.countDownDiff($dateUtil.addDays(afterServiceRecord.customerOperationTime, 6)).day"
|
||||
:hour="$dateUtil.countDownDiff($dateUtil.addDays(afterServiceRecord.customerOperationTime, 6)).hour"
|
||||
:minute="$dateUtil.countDownDiff($dateUtil.addDays(afterServiceRecord.customerOperationTime, 6)).min"
|
||||
:second="$dateUtil.countDownDiff($dateUtil.addDays(afterServiceRecord.customerOperationTime, 6)).seconds">
|
||||
</uni-countdown>
|
||||
</view>
|
||||
</view> -->
|
||||
<view style="border-top: 1px solid gainsboro;padding-top: 10upx;" v-if="afterServiceRecord.customerFinalCheck == null && (afterServiceRecord.workerFeedbackResult === 0 || afterServiceRecord.workerFeedbackResult === 1 || afterServiceRecord.workerFeedbackResult === 3 || (afterServiceRecord.workerFeedbackResult === 2 && (afterServiceRecord.workerResendPlan === 2 || afterServiceRecord.workerResendPlan === 3)))">
|
||||
<template v-if="afterServiceRecord.workerFeedbackResult === 1 && afterServiceRecord.customerOperationTime">
|
||||
<text class="text-gray" style="font-size: 20upx;">商家收货验货后退款,未操作的6天内自动完成!</text>
|
||||
<view class="flex align-center margin-top-sm">
|
||||
<text>工单时限:</text>
|
||||
<uni-countdown :show-colon="false" :backgroundColor="'#eee'"
|
||||
:day="$dateUtil.countDownDiff($dateUtil.addDays(afterServiceRecord.customerOperationTime, 6)).day"
|
||||
:hour="$dateUtil.countDownDiff($dateUtil.addDays(afterServiceRecord.customerOperationTime, 6)).hour"
|
||||
:minute="$dateUtil.countDownDiff($dateUtil.addDays(afterServiceRecord.customerOperationTime, 6)).min"
|
||||
:second="$dateUtil.countDownDiff($dateUtil.addDays(afterServiceRecord.customerOperationTime, 6)).seconds">
|
||||
</uni-countdown>
|
||||
</view>
|
||||
</template>
|
||||
<template v-if="afterServiceRecord.workerFeedbackResult === 2 && afterServiceRecord.workerResendPlanTime">
|
||||
<text class="text-gray" style="font-size: 20upx;">请按下方按键操作,36小时未操作将自动取消本售后!</text>
|
||||
<view class="flex align-center margin-top-sm">
|
||||
<text>工单时限:</text>
|
||||
<uni-countdown :show-colon="false" :backgroundColor="'#eee'"
|
||||
:day="$dateUtil.countDownDiff($dateUtil.addHours(afterServiceRecord.workerResendPlanTime, 36)).day"
|
||||
:hour="$dateUtil.countDownDiff($dateUtil.addHours(afterServiceRecord.workerResendPlanTime, 36)).hour"
|
||||
:minute="$dateUtil.countDownDiff($dateUtil.addHours(afterServiceRecord.workerResendPlanTime, 36)).min"
|
||||
:second="$dateUtil.countDownDiff($dateUtil.addHours(afterServiceRecord.workerResendPlanTime, 36)).seconds">
|
||||
</uni-countdown>
|
||||
</view>
|
||||
</template>
|
||||
<template v-else-if="afterServiceRecord.redoCompleteTime">
|
||||
<text class="text-gray" style="font-size: 20upx;">{{afterServiceRecord.workerFeedbackResult === 3 ? '您需验收或审核,36小时未操作自动完成' : '请按下方按键操作,36小时未操作将自动取消本售后!'}}</text>
|
||||
<view class="flex align-center margin-top-sm">
|
||||
<text>工单时限:</text>
|
||||
<uni-countdown :show-colon="false" :backgroundColor="'#eee'"
|
||||
:day="$dateUtil.countDownDiff($dateUtil.addHours(afterServiceRecord.redoCompleteTime, 36)).day"
|
||||
:hour="$dateUtil.countDownDiff($dateUtil.addHours(afterServiceRecord.redoCompleteTime, 36)).hour"
|
||||
:minute="$dateUtil.countDownDiff($dateUtil.addHours(afterServiceRecord.redoCompleteTime, 36)).min"
|
||||
:second="$dateUtil.countDownDiff($dateUtil.addHours(afterServiceRecord.redoCompleteTime, 36)).seconds">
|
||||
</uni-countdown>
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
<view class="flex justify-end align-end margin-tb-sm" v-if="order.orderType === 1">
|
||||
<template v-if="afterServiceRecord.customerFinalCheck == null && afterServiceRecord.returnStatus <= 3">
|
||||
<template v-if="afterServiceRecord.customerFinalCheck != 1">
|
||||
<template v-if="afterServiceRecord.returnStatus < 3">
|
||||
<button v-if="(afterServiceRecord.workerResendPlan != null && afterServiceRecord.workerResendPlan != 1) || (afterServiceRecord.workerAgreeType == 2 || afterServiceRecord.workerAgreeType == 3 || afterServiceRecord.workerAgreeType == 4)" class="cu-btn sm bg-yellow margin-right-sm" @click="showDeliverGoods = true;currentChooseAfterService = afterServiceRecord;">去退货</button>
|
||||
</template>
|
||||
<template v-if="(afterServiceRecord.workerFeedbackResult === 2 || (afterServiceRecord.workerFeedbackResult === 1 && afterServiceRecord.workerAgreeType !== 1))">
|
||||
<button class="cu-btn sm bg-yellow margin-right-sm" v-if="(afterServiceRecord.customerAgreeRedo === 0 || afterServiceRecord.customerAgreeRedo === null )" @click="afterServiceAgreeRedo(afterServiceRecord.id, 1)">{{(afterServiceRecord.workerFeedbackResult === 1 && (afterServiceRecord.workerAgreeType == 2 || afterServiceRecord.workerAgreeType == 3 || afterServiceRecord.workerAgreeType == 4)) || ((afterServiceRecord.workerFeedbackResult === 2 || afterServiceRecord.workerFeedbackResult === 3) && (afterServiceRecord.workerResendPlan != null && afterServiceRecord.workerResendPlan != 1)) ? '未收货,货在途' : '同意方案'}}</button>
|
||||
<button class="cu-btn sm bg-yellow margin-right-sm" v-if="afterServiceRecord.customerFinalCheck == null"
|
||||
@click="afterServiceFinalCheck(afterServiceRecord.id, 0)">不同意</button>
|
||||
<button class="cu-btn sm bg-yellow margin-right-sm" v-else-if="afterServiceRecord.customerFinalCheck == 0" disabled type="">已申请平台介入</button>
|
||||
@click="tapToShowRejectPlan(afterServiceRecord.id)">不同意</button>
|
||||
</template>
|
||||
<template v-else-if="afterServiceRecord.workerFeedbackResult !== 2 || (afterServiceRecord.workerFeedbackResult === 1 && afterServiceRecord.workerAgreeType === 1)">
|
||||
<button class="cu-btn sm bg-yellow margin-right-sm" @click="showNotice(item, afterServiceRecord)">同意</button>
|
||||
<button class="cu-btn sm bg-yellow margin-right-sm" v-if="afterServiceRecord.customerFinalCheck == null"
|
||||
@click="tapToShowRejectPlan(afterServiceRecord.id)">不同意</button>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
</template>
|
||||
|
||||
<template v-if="afterServiceRecord.returnStatus == 4">
|
||||
<button class="cu-btn sm bg-yellow margin-right-sm" @click="finishAfterService(afterServiceRecord.id)">货已收到,结单</button>
|
||||
</template>
|
||||
<template v-else-if="(afterServiceRecord.customerFinalCheck == 0) && (item.afterPlatformServiceStatus === 0 || item.afterPlatformServiceStatus == 1)">
|
||||
<template v-if="afterServiceRecord.customerFinalCheck === 0">
|
||||
<button class="cu-btn sm bg-yellow margin-right-sm" @click="showNotice(item, afterServiceRecord)" v-if="(afterServiceRecord.workerFeedbackResult === 3 || afterServiceRecord.workerFeedbackResult === 0) && afterServiceRecord.workerResendPlan !== 1 && afterServiceRecord.returnShipTime">同意</button>
|
||||
<button v-if="(afterServiceRecord.workerResendPlan != null && afterServiceRecord.workerResendPlan != 1) || (afterServiceRecord.workerAgreeType == 2 || afterServiceRecord.workerAgreeType == 3 || afterServiceRecord.workerAgreeType == 4)" class="cu-btn sm bg-yellow margin-right-sm" @click="showDeliverGoods = true;currentChooseAfterService = afterServiceRecord;">去退货</button>
|
||||
<button v-else-if="afterServiceRecord.workerFeedbackResult !== 2" class="cu-btn sm bg-yellow margin-right-sm" @click="showNotice(item, afterServiceRecord)">同意</button>
|
||||
<template v-if="(afterServiceRecord.workerFeedbackResult === 1 && (afterServiceRecord.workerAgreeType == 2 || afterServiceRecord.workerAgreeType == 3 || afterServiceRecord.workerAgreeType == 4)) || ((afterServiceRecord.workerFeedbackResult === 2 || afterServiceRecord.workerFeedbackResult === 3) && (afterServiceRecord.workerResendPlan != null)) && (afterServiceRecord.customerAgreeRedo === null || afterServiceRecord.customerAgreeRedo === 0)">
|
||||
<button class="cu-btn sm bg-yellow margin-right-sm" @click="afterServiceAgreeRedo(afterServiceRecord.id, 1)">{{afterServiceRecord.workerResendPlan != 1 ? '未收货,货在途' : '同意方案'}}</button>
|
||||
</template>
|
||||
<button class="cu-btn sm bg-yellow margin-right-sm text-white">已申请平台介入</button>
|
||||
</template>
|
||||
</template>
|
||||
</view>
|
||||
|
||||
<view class="flex justify-end align-end margin-tb-sm" v-else>
|
||||
<template v-if="afterServiceRecord.customerFinalCheck == null">
|
||||
<template v-if="afterServiceRecord.customerFinalCheck != 1">
|
||||
<template v-if="afterServiceRecord.workerFeedbackResult === 2">
|
||||
<button class="cu-btn sm bg-yellow margin-right-sm" @click="afterServiceAgreeRedo(afterServiceRecord.id, 1)" v-if="afterServiceRecord.customerAgreeRedo === 0 || afterServiceRecord.customerAgreeRedo === null">同意方案</button>
|
||||
<button class="cu-btn sm bg-yellow margin-right-sm" v-if="afterServiceRecord.customerFinalCheck == null"
|
||||
@click="tapToShowRejectPlan(afterServiceRecord.id)">不同意</button>
|
||||
</template>
|
||||
<template v-else-if="afterServiceRecord.workerFeedbackResult !== 2">
|
||||
<button class="cu-btn sm bg-yellow margin-right-sm" @click="showNotice(item, afterServiceRecord)">同意</button>
|
||||
<button class="cu-btn sm bg-yellow margin-right-sm" v-if="afterServiceRecord.customerFinalCheck == null"
|
||||
@click="tapToShowRejectPlan(afterServiceRecord.id)">不同意</button>
|
||||
</template>
|
||||
</template>
|
||||
</template>
|
||||
<template v-else-if="afterServiceRecord.customerFinalCheck == 0 && (item.afterPlatformServiceStatus === 0 || item.afterPlatformServiceStatus == 1)">
|
||||
<template v-if="(afterServiceRecord.workerFeedbackResult === 2 || afterServiceRecord.workerFeedbackResult === 3) && (afterServiceRecord.customerAgreeRedo === null || afterServiceRecord.customerAgreeRedo === 0)">
|
||||
<button class="cu-btn sm bg-yellow margin-right-sm" @click="afterServiceAgreeRedo(afterServiceRecord.id, 1)">同意方案</button>
|
||||
</template>
|
||||
<button class="cu-btn sm bg-yellow margin-right-sm" @click="showNotice(item, afterServiceRecord)" v-if="afterServiceRecord.workerFeedbackResult !== 2">同意</button>
|
||||
<button class="cu-btn sm bg-yellow margin-right-sm text-white" v-if="afterServiceRecord.customerFinalCheck === 0">已申请平台介入</button>
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="afterServiceRecord.customerFinalCheck != null" class="padding-tb-sm solid-top">
|
||||
<view class='cu-tag bg-main-color radius light'>客户最终确认</view>
|
||||
<view class="margin-top-xs">{{afterServiceRecord.customerFinalCheck === 1 ? '同意' : '不同意'}}
|
||||
<template v-if="item.afterPlatformServiceStatus === 0 || item.afterPlatformServiceStatus == 1">
|
||||
<view class='cu-tag bg-main-color radius light'>{{afterServiceRecord.workerReceiveConfirm === 1 ? '商家确认' : '客户最终确认'}}</view>
|
||||
<view class="margin-top-xs" v-if="afterServiceRecord.workerReceiveConfirm === 1">
|
||||
<view>已收货,结单</view>
|
||||
<view>本单已退货并结束售后!</view>
|
||||
</view>
|
||||
<template v-else>
|
||||
<view class="margin-top-xs" v-if="afterServiceRecord.customerFinalCheck === 2">
|
||||
取消
|
||||
<text v-if="afterServiceRecord.isAutoProcessed == 1">(超时系统自动取消)</text>
|
||||
</view>
|
||||
<view class="margin-top-xs" v-else>
|
||||
{{afterServiceRecord.customerFinalCheck === 1 ? '同意' : '不同意'}}
|
||||
<text v-if="afterServiceRecord.isAutoProcessed == 1 && afterServiceRecord.customerFinalCheck === 1">(超时系统自动同意)</text>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<view v-if="afterServiceRecord.customerFinalCheck === 0">
|
||||
<view class="grid col-3 grid-square flex-sub margin-top-sm" v-if="afterServiceRecord.customerDisagreeImages">
|
||||
<view class="bg-img" v-for="imgUrl in afterServiceRecord.customerDisagreeImages.split(',')" :key="imgUrl">
|
||||
<image :src="imgUrl" @tap="viewImage($event, [imgUrl])" :data-url="imgUrl" mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="margin-bottom-xs" v-if="afterServiceRecord.customerDisagreeReason">
|
||||
<text>不同意理由:{{afterServiceRecord.customerDisagreeReason}}</text>
|
||||
</view>
|
||||
<view class="text-red" v-if="afterServiceRecord.customerFinalCheck === 0">订单交由平台协商处理</view>
|
||||
</view>
|
||||
<view class="text-red" v-if="afterServiceRecord.customerFinalCheck === 0">订单已申请平台介入</view>
|
||||
<view v-else-if="afterServiceRecord.customerFinalCheck === 1">
|
||||
<view v-if="afterServiceRecord.originalRefund > 0">
|
||||
<template v-if="afterServiceRecord.workerFeedbackResult !== 0">
|
||||
<view v-if="(afterServiceRecord.agreedRefund > 0 || afterServiceRecord.originalRefund > 0) && order.refundPayStatus == 1">
|
||||
<view>
|
||||
<text>本单退款,系统已发起原路退回</text>
|
||||
<text class="text-red">{{afterServiceRecord.originalRefund}}</text>
|
||||
<text class="text-red">{{afterServiceRecord.originalRefund || afterServiceRecord.agreedRefund}}</text>
|
||||
<text>元,有其余部分的以双方沟通操作为准(注:银行按工作日到帐,节假日顺延到账)。</text>
|
||||
</view>
|
||||
<view>支付时间:{{afterServiceRecord.refundApplyTime}}</view>
|
||||
</view>
|
||||
<view v-else-if="afterServiceRecord.originalRefund == 0 && servDetail.payStatus == 0">
|
||||
<text>本单未支付,实际退回0.00元</text>
|
||||
<view v-else-if="order.refundPayStatus == 0">
|
||||
<text v-if="afterServiceRecord.workerFeedbackResult === 3">本次售后已重新补做并验收完成(退款额为0)。</text>
|
||||
<text v-else>本单已退款<text class="text-red">{{afterServiceRecord.originalRefund || afterServiceRecord.agreedRefund || 0}}</text>元,因未实际支付,实退为0元。未退部分继续完成订单及正常支付!</text>
|
||||
</view>
|
||||
</template>
|
||||
<view v-else>
|
||||
<text>本次售后已操作完毕,售后申请已结束!</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<template v-else-if="item.afterPlatformServiceStatus === 2 || item.afterPlatformServiceStatus === 3">
|
||||
<view class='cu-tag bg-main-color radius light'>客户最终确认</view>
|
||||
<view class="margin-top-xs">
|
||||
{{item.afterPlatformServiceStatus === 2 ? '同意' : '取消售后'}}
|
||||
(平台操作)
|
||||
</view>
|
||||
<view v-if="afterServiceRecord.platformHandleReason">
|
||||
<text>平台意见:{{afterServiceRecord.platformHandleReason}}</text>
|
||||
</view>
|
||||
<view v-if="item.afterPlatformServiceStatus === 3">
|
||||
<text>本次售后已操作完毕,售后申请已结束!</text>
|
||||
</view>
|
||||
<template v-else>
|
||||
<view v-if="(afterServiceRecord.platformRefund || afterServiceRecord.agreedRefund) && order.refundPayStatus == 1">
|
||||
<view>
|
||||
<text>本单退款,系统已发起原路退回</text>
|
||||
<text class="text-red">{{afterServiceRecord.platformRefund || afterServiceRecord.agreedRefund}}</text>
|
||||
<text>元,有其余部分的以双方沟通操作为准(注:银行按工作日到帐,节假日顺延到账)。</text>
|
||||
</view>
|
||||
<view>支付时间:{{afterServiceRecord.refundApplyTime}}</view>
|
||||
</view>
|
||||
<view v-else-if="order.refundPayStatus == 0">
|
||||
<text>本单已退款<text class="text-red">{{afterServiceRecord.platformRefund || afterServiceRecord.agreedRefund || 0}}</text>元,因未实际支付,实退为0元。未退部分继续完成订单及正常支付!</text>
|
||||
</view>
|
||||
</template>
|
||||
</template>
|
||||
</view>
|
||||
<!-- <view v-if="afterServiceRecord.afterServiceStatus == 2">
|
||||
<view>售后已撤销</view>
|
||||
<view style="color: red;font-size: 20upx;">由于您最终未做出同意与不同意的操作,系统默认撤消此单,如您需要可另行申请!</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 订单编码和时间 -->
|
||||
<view class="bg-white margin-top-sm padding margin-lr-sm margin-bottom-with-bar padding-bottom-xl">
|
||||
<view class="bg-white margin-top-sm padding margin-lr-sm margin-bottom-with-bar">
|
||||
<view>订单编码:{{servDetail.orderMasterCode}}</view>
|
||||
<view class="margin-top-xs">订单时间:{{servDetail.createTime}}</view>
|
||||
</view>
|
||||
|
|
@ -364,7 +823,13 @@
|
|||
<confirm-modal ref="confirmModal" :content="'是否确定取消订单?'" @confirm="cancelOrder"></confirm-modal>
|
||||
<apply-after-service ref="applyAfterService" :data="servDetail"
|
||||
@confirmFeedback="loadData(servDetail.orderMasterId)" @cancel="blurCurOrder"></apply-after-service>
|
||||
<apply-after-service-goods ref="applyAfterServiceGoods" :data="servDetail" @confirmFeedback="loadData(servDetail.orderMasterId)" @cancel="blurCurOrder"></apply-after-service-goods>
|
||||
<confirm-modal ref="notice" :content="'银联实时动态:本单已划款,师傅/服务人员已到帐或即将到帐。双方达成退款的,请对方线下支付后点“对方已退款”。'" :confirmMsg="'对方已退款'" @confirm="afterServiceFinalCheck(curDetailOrder.afterServiceRecordList[0].id, 1)" @cancel="noticeCancel"></confirm-modal>
|
||||
|
||||
<afterserviceDisagree v-if="showAfterserviceDisagree" :show="showAfterserviceDisagree" :orderAfterId="orderAfterId" @close="showAfterserviceDisagree = false" @confirmFeedback="showAfterserviceDisagree = false;loadData(servDetail.orderMasterId);"></afterserviceDisagree>
|
||||
<deliverGoods v-if="showDeliverGoods" :show="showDeliverGoods" :data="currentChooseAfterService" @close="showDeliverGoods = false;currentChooseAfterService = null;" @confirmFeedback="showDeliverGoods = false;currentChooseAfterService = null;loadData(servDetail.orderMasterId)"></deliverGoods>
|
||||
|
||||
<deliveryFlowDetail :show="showDeliveryFlow" :trackingNumber="showDeliveryFlowTrackingNumber" @close="showDeliveryFlow = false"></deliveryFlowDetail>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -373,13 +838,21 @@
|
|||
import urgentMsg from '@/pages/my/components/modal/urgent-msg.vue';
|
||||
import urgeOrder from '@/pages/my/components/modal/urge_order.vue';
|
||||
import applyAfterService from '@/pages/my/components/modal/apply-after-service.vue';
|
||||
import applyAfterServiceGoods from '@/pages/my/components/modal/apply-after-service-goods.vue';
|
||||
import afterserviceDisagree from '@/pages/my/components/modal/afterservice-disagree.vue';
|
||||
import deliverGoods from '@/pages/my/components/modal/deliver-goods.vue';
|
||||
import deliveryFlowDetail from '@/pages/my/components/modal/delivery_flow_detail.vue';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
simpleProductPicked,
|
||||
urgentMsg,
|
||||
applyAfterService,
|
||||
urgeOrder
|
||||
urgeOrder,
|
||||
afterserviceDisagree,
|
||||
applyAfterServiceGoods,
|
||||
deliverGoods,
|
||||
deliveryFlowDetail
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -395,7 +868,13 @@
|
|||
ifShowPageMeta: false,
|
||||
sendUrgentMsgModal: false,
|
||||
sendUrgeOrderModal: false,
|
||||
curDetailOrder: null
|
||||
curDetailOrder: null,
|
||||
showAfterserviceDisagree: false,
|
||||
orderAfterId: null,
|
||||
showDeliverGoods: false,
|
||||
showDeliveryFlow: false,
|
||||
showDeliveryFlowTrackingNumber: '',
|
||||
currentChooseAfterService: null
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
|
|
@ -404,11 +883,28 @@
|
|||
}
|
||||
this.loadData(this.order.orderMasterId);
|
||||
this.bindEvent();
|
||||
if(this.order.orderType === 1) {
|
||||
this.servingColumnHeaders = ['购买型号', '购买量', '待发货']
|
||||
this.servedColumnHeaders = ['购买型号', '购买量', '已发货']
|
||||
}
|
||||
},
|
||||
onUnload() {
|
||||
this.offBindEvent();
|
||||
},
|
||||
methods: {
|
||||
openShopLocation(item) {
|
||||
// const gcj02Coord = wgs84ToGcj02(item.shop.longitude, item.shop.latitude)
|
||||
// const gcj02Coord = wgs84ToGcj02(102.80154676649306, 24.969456922743056)
|
||||
// const gcj02Coord = [102.82868680950929, 24.864792838337802]
|
||||
const gcj02Coord = [item.longitude, item.latitude]
|
||||
wx.openLocation({
|
||||
latitude: gcj02Coord[1],
|
||||
longitude: gcj02Coord[0],
|
||||
scale: 18,
|
||||
name: item.shopName,
|
||||
address: `${item.provinceName}${item.cityName}${item.countryName}${item.streetName}${item.address}`
|
||||
})
|
||||
},
|
||||
bindEvent() {
|
||||
uni.$on(this.$globalFun.CHOOSE_ADDRESS, this.editAddress);
|
||||
},
|
||||
|
|
@ -428,8 +924,19 @@
|
|||
let servDetailRes = await this.$request.getOrderMasterDetail({
|
||||
id: orderMasterId
|
||||
});
|
||||
servDetailRes.data.orderType = this.order.orderType
|
||||
this.servDetail = servDetailRes.data;
|
||||
},
|
||||
copyData(data) {
|
||||
uni.setClipboardData({
|
||||
data: data,
|
||||
success() {
|
||||
uni.showToast({
|
||||
title: '复制成功'
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
changePopupState(e) {
|
||||
this.ifShowPageMeta = e.show;
|
||||
},
|
||||
|
|
@ -525,14 +1032,43 @@
|
|||
})
|
||||
}
|
||||
},
|
||||
async afterServiceAgreeRedo(id, customerAgreeRedo) {
|
||||
let res
|
||||
if(this.order.orderType === 1) {
|
||||
res = await this.$request.editAfterServiceGoodsRecord({
|
||||
id: id,
|
||||
customerAgreeRedo
|
||||
});
|
||||
} else {
|
||||
res = await this.$request.editAfterServiceRecord({
|
||||
id: id,
|
||||
customerAgreeRedo
|
||||
});
|
||||
}
|
||||
|
||||
if (res && res.code === 0) {
|
||||
this.loadData(this.servDetail.orderMasterId);
|
||||
}
|
||||
if (res && res.msg){
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
duration: 3000,
|
||||
title: res.msg
|
||||
})
|
||||
}
|
||||
},
|
||||
tapToShowRejectPlan(id) {
|
||||
this.orderAfterId = id;
|
||||
this.showAfterserviceDisagree = true;
|
||||
},
|
||||
applyAfterService() {
|
||||
this.showModalByRef('applyAfterService', this.servDetail, {
|
||||
this.showModalByRef(this.order.orderType === 1 ? 'applyAfterServiceGoods' : 'applyAfterService', this.servDetail, {
|
||||
afterServiceType: 2,
|
||||
toUpdateStatus: false
|
||||
})
|
||||
},
|
||||
applyForRefund() {
|
||||
this.showModalByRef('applyAfterService', this.servDetail, {
|
||||
this.showModalByRef(this.order.orderType === 1 ? 'applyAfterServiceGoods' : 'applyAfterService', this.servDetail, {
|
||||
afterServiceType: 1,
|
||||
toUpdateStatus: false
|
||||
})
|
||||
|
|
@ -540,8 +1076,16 @@
|
|||
showModalByRef(refName, curOrder, params) {
|
||||
this.$refs[refName].showModal(curOrder, params);
|
||||
},
|
||||
async cancelAfterService(id) {
|
||||
let res = await this.$request.delAfterServiceRecord(id);
|
||||
async cancelAfterService(afterServiceRecord) {
|
||||
if(afterServiceRecord.workerFeedbackResult == 3 && this.order.orderType == 1) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '重发/补发中,不能撤消售后单!',
|
||||
duration: 1000
|
||||
})
|
||||
return
|
||||
}
|
||||
let res = await this.$request.delAfterServiceRecord(afterServiceRecord.id);
|
||||
if (res && res.code === 0) {
|
||||
this.loadData(this.servDetail.orderMasterId);
|
||||
uni.showToast({
|
||||
|
|
@ -621,17 +1165,76 @@
|
|||
phoneNumber: phoneNum
|
||||
})
|
||||
},
|
||||
showNotice(detailOrder) {
|
||||
showNotice(detailOrder, afterServiceRecord) {
|
||||
if (detailOrder.drawCashStatus != null && detailOrder.drawCashStatus >= 1) {
|
||||
this.curDetailOrder = detailOrder;
|
||||
this.$refs.notice.showModal();
|
||||
} else {
|
||||
this.afterServiceFinalCheck(detailOrder.afterServiceRecordList[0].id, 1)
|
||||
if(this.order.orderType === 1 && afterServiceRecord.workerFeedbackResult != 0) {
|
||||
let notificationContent = '建议收到货后再确认同意!';
|
||||
if(afterServiceRecord.workerFeedbackResult === 1 && afterServiceRecord.operType === 1) {
|
||||
notificationContent = '同意后结束售后,商家同意退款的将发起退款!'
|
||||
}
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: notificationContent,
|
||||
confirmText: '仍然同意',
|
||||
success: (res) => {
|
||||
if(res.confirm) {
|
||||
this.afterServiceFinalCheck(afterServiceRecord.id, 1)
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.afterServiceFinalCheck(afterServiceRecord.id, 1)
|
||||
}
|
||||
}
|
||||
},
|
||||
noticeCancel() {
|
||||
this.curDetailOrder = null;
|
||||
},
|
||||
async changeOrderPrice(orderDetailId) {
|
||||
await this.$request.deleteAttachPrice({
|
||||
orderDetailId: orderDetailId
|
||||
})
|
||||
let res = await this.$request.changeOrderPrice({
|
||||
orderDetailId: orderDetailId,
|
||||
changeMoney: 0,
|
||||
type: 1,
|
||||
remark: '客户清空加价'
|
||||
});
|
||||
if (res && res.code === 0) {
|
||||
uni.showToast({
|
||||
icon: 'success',
|
||||
title: '操作成功'
|
||||
})
|
||||
setTimeout(() => {
|
||||
this.loadData(this.servDetail.orderMasterId);
|
||||
}, 1500);
|
||||
}
|
||||
},
|
||||
async finishAfterService(id) {
|
||||
let res = await this.$request.workerConfirmReceive({
|
||||
id: id
|
||||
});
|
||||
if (res && res.code === 0) {
|
||||
uni.showToast({
|
||||
icon: 'success',
|
||||
title: '操作成功'
|
||||
})
|
||||
setTimeout(() => {
|
||||
this.loadData(this.servDetail.orderMasterId);
|
||||
}, 1500);
|
||||
}
|
||||
},
|
||||
// 获取物流信息
|
||||
getDeliveryFlow(numerStr) {
|
||||
this.showDeliveryFlowTrackingNumber = numerStr;
|
||||
this.$nextTick(() => {
|
||||
this.showDeliveryFlow = true;
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -657,5 +1260,15 @@
|
|||
z-index: 99;
|
||||
}
|
||||
|
||||
.add-price {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.add-price .text-main-color {
|
||||
position: absolute;
|
||||
top: 20rpx;
|
||||
right: 10rpx;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,162 @@
|
|||
<template>
|
||||
<view>
|
||||
<!-- 顶部操作条 -->
|
||||
<cu-custom :bgColor="'bg-main-color'" :isBack="true" :isBackHome="true" :homePageUrl="'/pages/index/index'">
|
||||
<block slot="content">选择门店</block>
|
||||
</cu-custom>
|
||||
<!-- 产品列表 -->
|
||||
<view class="padding-lr padding-top bg-white solid-top">
|
||||
<view class="solid-bottom margin-bottom-sm padding-bottom-sm"
|
||||
v-for="(item, index) in productList" :key="item.id">
|
||||
<view class="flex-sub flex margin-top-sm">
|
||||
<view style="height: 150rpx;line-height: 150rpx;margin-right: 10px;">
|
||||
<radio class="main-color" :checked="chooseShopInfo && chooseShopInfo.shopId === item.shopId" @click="chooseShopInfo = item" />
|
||||
</view>
|
||||
<!-- <checkbox style="transform:scale(0.8);" class="main-color" :checked="chooseShopId === item.shopId" @click.stop="chooseShopId = item.shopId"></checkbox> -->
|
||||
<view style="width: 150rpx;height: 150rpx;margin-right:10px;display: flex;flex-direction: row;justify-content: center;">
|
||||
<image style="width: 100%;height: 100%;" :src="item.imageUrl" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="flex-sub">
|
||||
<view class="text-bold" style="text-overflow: ellipsis;overflow: hidden;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;">{{item.shopName}}</view>
|
||||
<view>
|
||||
<view style="text-overflow: ellipsis;overflow: hidden;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;">{{item.provinceName + item.cityName + item.countryName + item.streetName + item.address}}</view>
|
||||
<view class="margin-lr-sm" style="display: inline-block;" v-if="item.distance">
|
||||
<view class="cu-tag bg-red" style="padding: 0 2px;height: auto;">距离您</view>
|
||||
<text class="text-gray" style="vertical-align: middle;">{{item.distance}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="index == 0">
|
||||
<text style="font-size: 24rpx;color: #0081ff;">您购买的商品的店铺所属服务点(距离近可优先选择)</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 底部新增地址按钮 -->
|
||||
<view class="cu-bar tabbar border shop fixed-bottom-bar bg-back">
|
||||
<button class="cu-btn bg-main-color long-btn margin-lr-sm shadow-blur" @click="selectShop">确定</button>
|
||||
</view>
|
||||
<!-- <view class="margin-bottom-lg">
|
||||
<view v-if="hasMoreData" class="text-center bg-main-color padding-tb text-lg" @click="loadProductData">
|
||||
<text class="margin-right-xs">查看更多</text>
|
||||
<text class="text-bold cuIcon-unfold"></text>
|
||||
</view>
|
||||
<view class="cu-load" :class="loadMoreStatus"></view>
|
||||
</view> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
productList: [],
|
||||
loadMoreStatus: '',
|
||||
hasMoreData: false,
|
||||
pageNum: this.$globalData.initPageNum,
|
||||
pageSize: this.$globalData.initPageSize,
|
||||
inputGoodsName: null,
|
||||
goodsId: null,
|
||||
shopId: null,
|
||||
chooseShopInfo: null,
|
||||
addressFull: null,
|
||||
}
|
||||
},
|
||||
async onLoad(options) {
|
||||
this.goodsId = options.goodsId;
|
||||
this.shopId = options.shopId;
|
||||
this.addressFullObj = JSON.parse(options.addressFullObj)
|
||||
|
||||
this.loadData();
|
||||
},
|
||||
methods: {
|
||||
async loadData() {
|
||||
this.pageNum = this.$globalData.initPageNum;
|
||||
this.pageSize = this.$globalData.initPageSize;
|
||||
this.loadProductData();
|
||||
},
|
||||
loadCategoryList(type = 1) {},
|
||||
async loadProductData(params = {}) {
|
||||
params.pageNum = this.pageNum;
|
||||
params.pageSize = this.pageSize;
|
||||
// if(this.addressLatitude && this.addressLongitude) {
|
||||
// params.latitude = this.addressLatitude
|
||||
// params.longitude = this.addressLongitude
|
||||
// }
|
||||
params.provinceName = this.addressFullObj.provinceName,
|
||||
params.cityName = this.addressFullObj.cityName,
|
||||
params.countryName = this.addressFullObj.countryName,
|
||||
params.streetName = this.addressFullObj.streetName,
|
||||
params.address = this.addressFullObj.address
|
||||
params.goodsId = this.goodsId
|
||||
// params.goodsId = 2089
|
||||
|
||||
this.loadMoreStatus = 'loading bg-main-color padding-tb text-lg';
|
||||
this.hasMoreData = false;
|
||||
try {
|
||||
await this.loadShopPage(params);
|
||||
this.loadMoreStatus = this.hasMoreData ? '' : 'over bg-grey padding-tb text-lg';
|
||||
} catch (e) {
|
||||
this.loadMoreStatus = 'erro bg-red padding-tb text-lg'
|
||||
}
|
||||
},
|
||||
reloadShopPage() {
|
||||
this.pageNum = this.$globalData.initPageNum;
|
||||
this.pageSize = this.$globalData.initPageSize;
|
||||
this.pageNumOfOtherCityPage = this.$globalData.initPageNum;
|
||||
this.productList = [];
|
||||
this.loadProductData();
|
||||
},
|
||||
async loadShopPage(params) {
|
||||
let res = await this.$request.getShopsByGoodsId(params);
|
||||
// let rowsLength = res[1].data.rows.length;
|
||||
// if (rowsLength === this.pageSize) {
|
||||
// this.hasMoreData = true;
|
||||
// }
|
||||
// if (this.pageNum === this.$globalData.initPageNum) {
|
||||
// this.productList = res[1].data.rows;
|
||||
// } else {
|
||||
// this.productList = this.productList.concat(res[1].data.rows);
|
||||
// }
|
||||
// this.pageNum++;
|
||||
|
||||
this.productList = res.data.serviceShops
|
||||
this.chooseShopInfo = res.data.serviceShops.find(i => i.shopId == this.shopId)
|
||||
},
|
||||
searchGoods() {
|
||||
this.reloadShopPage();
|
||||
},
|
||||
selectShop() {
|
||||
uni.$emit('chooseShop', this.chooseShopInfo);
|
||||
uni.navigateBack({
|
||||
delta: -1
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.search-nav-item-text {
|
||||
width: 100rpx;
|
||||
}
|
||||
|
||||
.nav .cu-item {
|
||||
height: 90rpx;
|
||||
display: inline-block;
|
||||
line-height: 90rpx;
|
||||
margin: 0;
|
||||
padding: 0 10rpx;
|
||||
width: 180rpx;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.cu-load {
|
||||
display: block;
|
||||
line-height: unset;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<!-- 预约时间 -->
|
||||
<view class="margin-lr-sm margin-top-sm bg-white padding">
|
||||
<view class="margin-lr-sm margin-top-sm bg-white padding" v-if="pickedProductList && pickedProductList[0].product[0].type == 1">
|
||||
<view class="flex justify-between">
|
||||
<text class="text-black">预约时间</text>
|
||||
<view class="flex justify-end align-center">
|
||||
|
|
@ -91,13 +91,93 @@
|
|||
<radio class="main-color" value="0" :checked="formInfo.payWay=='0'" />
|
||||
<text class="margin-left-xs">在线支付</text>
|
||||
</label>
|
||||
<template v-if="pickedProductList && pickedProductList[0].product[0].type == 1">
|
||||
<label class="radio margin-left">
|
||||
<radio class="main-color" value="1" :checked="formInfo.payWay=='1'" />
|
||||
<text class="margin-left-xs">上门到付</text>
|
||||
</label>
|
||||
</template>
|
||||
<template v-else>
|
||||
<label class="radio margin-left" v-if="pickedProductList && pickedProductList[0].product[0].expectDuration.indexOf('同城') > -1">
|
||||
<radio class="main-color" value="1" :checked="formInfo.payWay=='1'" />
|
||||
<text class="margin-left-xs">上门到付</text>
|
||||
</label>
|
||||
</template>
|
||||
</radio-group>
|
||||
</view>
|
||||
</view>
|
||||
<view class="margin-lr-sm margin-top-sm bg-white padding" v-if="pickedProductList && (pickedProductList[0].product[0].storeService || pickedProductList[0].product[0].installService) && formInfo.defaultAddress && serviceShop">
|
||||
<view class="text-black text-bold flex justify-between">
|
||||
<text>安装/服务/施工门店</text>
|
||||
<text @click="goChooseShop" v-if="orderType == 2 && hasDefaultServiceShop">更多></text>
|
||||
</view>
|
||||
<view class="flex-sub flex margin-top-sm" @click="openShopLocation(serviceShop)">
|
||||
<view style="width: 150rpx;height: 150rpx;margin-right:10px;">
|
||||
<image style="width: 100%;height: 100%;" :src="serviceShop.imageUrl" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="flex-sub">
|
||||
<view class="text-bold" style="text-overflow: ellipsis;overflow: hidden;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;">{{serviceShop.shopName}}</view>
|
||||
<view class="padding-tb-xs" style="position: relative;">
|
||||
<view class='cu-tag round bg-orange light'>
|
||||
<text class="text-black" v-if="pickedProductList[0].product[0].storeService == 1">到店服务</text>
|
||||
<text class="text-black" v-if="pickedProductList[0].product[0].storeService == 2">到店+配送(服务)</text>
|
||||
<text class="text-black" v-if="pickedProductList[0].product[0].storeService == 3">到店+上门(服务)</text>
|
||||
</view>
|
||||
<view class="margin-lr-sm" style="display: inline-block;" v-if="serviceShop.distance">
|
||||
<view class="cu-tag bg-red" style="padding: 0 2px;height: auto;">距离您</view>
|
||||
<text class="text-gray" style="vertical-align: middle;">{{serviceShop.distance}}</text>
|
||||
</view>
|
||||
<image src="/static/navigation.png" style="width: 50rpx;height: 50rpx;display: inline-block;position: absolute;top: 5px;right: -10px;"></image>
|
||||
</view>
|
||||
<view style="text-overflow: ellipsis;overflow: hidden;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;">{{serviceShop.provinceName + serviceShop.cityName + serviceShop.countryName + serviceShop.streetName + serviceShop.address}}</view>
|
||||
<view v-if="orderType == 2">
|
||||
<checkbox style="transform:scale(0.8);" class="main-color" :checked="formInfo.isDeliveryToStore === '1'" @click.stop="formInfo.isDeliveryToStore = formInfo.isDeliveryToStore == 1 ? '0' : '1';formInfo.payWay='0';"></checkbox>
|
||||
<text style="font-size: 24rpx;color: #0081ff;">发货到服务店<text style="font-size: 20rpx;color: gray;">(支付须选在线支付)</text></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="text-orange" style="margin-top: 10px;" v-if="pickedProductList[0].product[0].installService != 2 && orderType == 2">
|
||||
注:如包安装商品与安装服务点距离太远,下单后与商家协商处理方式!
|
||||
未包安装商品可能需您另出服务费。请留意[商品信息]处标注是否包安装!
|
||||
</view>
|
||||
<view class="text-orange" style="margin-top: 10px;" v-else>
|
||||
注:你可点击更多查看或选择附近安装服务点,并可导航前往,安装服务费自行与服务点沟通。或在服务商城内相应店铺下单。
|
||||
</view>
|
||||
</view>
|
||||
<view class="margin-lr-sm margin-top-sm bg-white padding" v-if="!serviceShop && goodShop">
|
||||
<view class="text-black text-bold flex justify-between">
|
||||
<text>安装/服务/施工门店</text>
|
||||
</view>
|
||||
<view class="flex-sub flex margin-top-sm" @click="openShopLocation(goodShop)">
|
||||
<view style="width: 150rpx;height: 150rpx;margin-right:10px;">
|
||||
<image style="width: 100%;height: 100%;" :src="goodShop.imageUrl" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="flex-sub">
|
||||
<view class="text-bold" style="text-overflow: ellipsis;overflow: hidden;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;">{{goodShop.shopName}}</view>
|
||||
<view class="padding-tb-xs" style="position: relative;">
|
||||
<view class='cu-tag round bg-orange light'>
|
||||
<text class="text-black" v-if="pickedProductList[0].product[0].storeService == 1">到店服务</text>
|
||||
<text class="text-black" v-if="pickedProductList[0].product[0].storeService == 2">到店+配送(服务)</text>
|
||||
<text class="text-black" v-if="pickedProductList[0].product[0].storeService == 3">到店+上门(服务)</text>
|
||||
</view>
|
||||
<view class="margin-lr-sm" style="display: inline-block;" v-if="goodShop.distance">
|
||||
<view class="cu-tag bg-red" style="padding: 0 2px;height: auto;">距离您</view>
|
||||
<text class="text-gray" style="vertical-align: middle;">{{goodShop.distance}}</text>
|
||||
</view>
|
||||
<image src="/static/navigation.png" style="width: 50rpx;height: 50rpx;display: inline-block;position: absolute;top: 5px;right: -10px;"></image>
|
||||
</view>
|
||||
<view style="text-overflow: ellipsis;overflow: hidden;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;">{{goodShop.provinceName + goodShop.cityName + goodShop.countryName + goodShop.streetName + goodShop.address}}</view>
|
||||
<view v-if="orderType == 2">
|
||||
<checkbox style="transform:scale(0.8);" class="main-color" :checked="formInfo.isDeliveryToStore === '1'" @click.stop="formInfo.isDeliveryToStore = formInfo.isDeliveryToStore == 1 ? '0' : '1';formInfo.payWay='0';"></checkbox>
|
||||
<text style="font-size: 24rpx;color: #0081ff;">发货到服务店<text style="font-size: 20rpx;color: gray;">(支付须选在线支付)</text></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="text-orange" style="margin-top: 10px;" v-if="pickedProductList[0].product[0].installService != 2 && orderType == 2">
|
||||
注:如包安装商品与安装服务点距离太远,下单后与商家协商处理方式!
|
||||
未包安装商品可能需您另出服务费。请留意[商品信息]处标注是否包安装!
|
||||
</view>
|
||||
</view>
|
||||
<template v-if="InsuranceList.length">
|
||||
<view class="margin-lr-sm margin-top-sm bg-white padding">
|
||||
<view class="text-black">
|
||||
|
|
@ -141,6 +221,21 @@
|
|||
</radio-group>
|
||||
</view>
|
||||
</view>
|
||||
<view class="margin-lr-sm margin-top-sm bg-white padding">
|
||||
<text class="text-black">订单下单图片说明 (选填)</text>
|
||||
<view class="grid col-3 grid-square flex-sub margin-top-sm">
|
||||
<view class="bg-img" v-for="(item,index) in imgList" :key="index"
|
||||
@tap="viewImage($event, imgList)" :data-url="item">
|
||||
<image :src="item" mode="aspectFill"></image>
|
||||
<view class="cu-tag bg-red" @tap.stop="delImg($event, imgList)" :data-index="index">
|
||||
<text class='cuIcon-close'></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="solids" @tap="chooseImgList(e, imgList)" v-if="imgList.length < 3">
|
||||
<text class='cuIcon-cameraadd'></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 备注留言 -->
|
||||
<view class="margin-lr-sm margin-top-sm bg-white padding">
|
||||
<text class="text-black">备注留言</text>
|
||||
|
|
@ -166,6 +261,7 @@
|
|||
|
||||
<script>
|
||||
import productPicked from '@/components/goods-card/product-picked.vue';
|
||||
import { wgs84ToGcj02 } from '@/common/js/locationUtils.js'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
|
@ -183,13 +279,21 @@
|
|||
defaultAddress: null,
|
||||
expectTimeStart: '',
|
||||
expectTimeEnd: '',
|
||||
orderImages: '',
|
||||
isDeliveryToStore: '0'
|
||||
},
|
||||
totalPrice: 0,
|
||||
timeRangeIndex: 0,
|
||||
timeRange: '',
|
||||
timeRangeList: [],
|
||||
InsuranceList: [],
|
||||
chooseInsurance: {id: null, insuranceAmount: 0}
|
||||
chooseInsurance: {id: null, insuranceAmount: 0},
|
||||
imgList: [],
|
||||
hasDefaultServiceShop: false,
|
||||
serviceShop: null,
|
||||
// 商品上架维护的店铺
|
||||
goodShop: null,
|
||||
orderType: null
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
|
|
@ -212,6 +316,8 @@
|
|||
this.chooseInsurance.insuranceAmount = this.InsuranceList[0].insuranceAmount;
|
||||
}
|
||||
|
||||
this.orderType = params.pickedProductList[0].product[0].type
|
||||
|
||||
this.loadTotalPrice();
|
||||
this.timeRangeList = this.$globalData.timeRangeList;
|
||||
this.timeRange = this.timeRangeList[0];
|
||||
|
|
@ -227,6 +333,7 @@
|
|||
if (res && res.data &&res.data.length) {
|
||||
const defaultAdd = res.data.filter(i => i.isDefault === 1)
|
||||
this.formInfo.defaultAddress = defaultAdd.length ? defaultAdd[0] : res.data[0];
|
||||
this.getDefaultShop(this.formInfo.defaultAddress)
|
||||
}
|
||||
},
|
||||
loadTotalPrice() {
|
||||
|
|
@ -237,12 +344,20 @@
|
|||
},
|
||||
bindEvent() {
|
||||
uni.$on(this.$globalFun.CHOOSE_ADDRESS, this.chooseAddress);
|
||||
uni.$on('chooseShop', this.chooseShop)
|
||||
},
|
||||
offBindEvent() {
|
||||
uni.$off(this.$globalFun.CHOOSE_ADDRESS);
|
||||
uni.$off('chooseShop');
|
||||
},
|
||||
chooseShop(shopInfo) {
|
||||
this.serviceShop = shopInfo;
|
||||
},
|
||||
changePayWay(e) {
|
||||
this.formInfo.payWay = e.detail.value;
|
||||
if(this.formInfo.payWay === '1') {
|
||||
this.formInfo.isDeliveryToStore = '0'
|
||||
}
|
||||
},
|
||||
changeIsNeedBill(e) {
|
||||
this.formInfo.isNeedBill = e.detail.value;
|
||||
|
|
@ -257,6 +372,19 @@
|
|||
this.chooseInsurance.insuranceAmount = 0;
|
||||
}
|
||||
},
|
||||
openShopLocation(item) {
|
||||
// const gcj02Coord = wgs84ToGcj02(item.shop.longitude, item.shop.latitude)
|
||||
// const gcj02Coord = wgs84ToGcj02(102.80154676649306, 24.969456922743056)
|
||||
// const gcj02Coord = [102.82868680950929, 24.864792838337802]
|
||||
const gcj02Coord = [item.longitude, item.latitude]
|
||||
wx.openLocation({
|
||||
latitude: gcj02Coord[1],
|
||||
longitude: gcj02Coord[0],
|
||||
scale: 18,
|
||||
name: item.shopName,
|
||||
address: `${item.provinceName}${item.cityName}${item.countryName}${item.streetName}${item.address}`
|
||||
})
|
||||
},
|
||||
inputComments(e) {
|
||||
this.formInfo.comments = e.detail.value
|
||||
},
|
||||
|
|
@ -265,8 +393,50 @@
|
|||
url: '/pages/my/my-address?chooseMode=true'
|
||||
})
|
||||
},
|
||||
async goChooseShop() {
|
||||
const addressDetail = await this.$request.getByCustomerAddressId(
|
||||
this.formInfo.defaultAddress.customerAddressId
|
||||
);
|
||||
const addressFullObj = {
|
||||
provinceName: addressDetail.data.provinceName,
|
||||
cityName: addressDetail.data.cityName,
|
||||
countryName: addressDetail.data.countryName,
|
||||
streetName: addressDetail.data.streetName,
|
||||
address: addressDetail.data.address
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: '/pages/order/choose-shop?goodsId='+this.pickedProductList[0].product[0].goodsId+'&addressFullObj='+JSON.stringify(addressFullObj)+'&shopId='+this.serviceShop.shopId
|
||||
})
|
||||
},
|
||||
chooseAddress(addressInfo) {
|
||||
this.formInfo.defaultAddress = addressInfo;
|
||||
this.getDefaultShop(addressInfo)
|
||||
},
|
||||
async getDefaultShop(addressInfo) {
|
||||
const params = {
|
||||
goodsId: this.pickedProductList[0].product[0].goodsId,
|
||||
}
|
||||
if(addressInfo.latitude && addressInfo.longitude) {
|
||||
params.latitude = addressInfo.latitude
|
||||
params.longitude = addressInfo.longitude
|
||||
} else {
|
||||
params.provinceName = addressInfo.provinceName
|
||||
params.cityName = addressInfo.cityName
|
||||
params.countryName = addressInfo.countryName
|
||||
params.streetName = addressInfo.streetName
|
||||
params.address = addressInfo.address
|
||||
}
|
||||
const productDetail = await this.$request.getGoodsDetail(params);
|
||||
console.log(productDetail);
|
||||
if(productDetail.storeService || productDetail.installService) {
|
||||
this.serviceShop = productDetail.serviceShop;
|
||||
}
|
||||
if(productDetail.serviceShop) {
|
||||
this.hasDefaultServiceShop = true
|
||||
}
|
||||
if(productDetail.shop) {
|
||||
this.goodShop = productDetail.shop
|
||||
}
|
||||
},
|
||||
changeDoorTime(value) {
|
||||
this.formInfo.doorTime = value;
|
||||
|
|
@ -297,6 +467,46 @@
|
|||
})
|
||||
return goodsList;
|
||||
},
|
||||
chooseImgList(e, imgList) {
|
||||
uni.chooseImage({
|
||||
count: 3 - imgList.length, //默认9
|
||||
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||||
sourceType: ['album'], //从相册选择
|
||||
success: (res) => {
|
||||
uni.showLoading({
|
||||
title: '上传中',
|
||||
mask: true
|
||||
});
|
||||
res.tempFilePaths.forEach((tmpUrl, index) => {
|
||||
this.$request.uploadFile(tmpUrl).then((url) => {
|
||||
imgList.push(url);
|
||||
if (index === res.tempFilePaths.length - 1) {
|
||||
uni.hideLoading();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
viewImage(e, imgList) {
|
||||
uni.previewImage({
|
||||
urls: imgList,
|
||||
current: e.currentTarget.dataset.url
|
||||
});
|
||||
},
|
||||
delImg(e, imgList) {
|
||||
uni.showModal({
|
||||
title: '',
|
||||
content: '确定要删除这张图片吗?',
|
||||
cancelText: '取消',
|
||||
confirmText: '确定',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
imgList.splice(e.currentTarget.dataset.index, 1)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
validForm() {
|
||||
if (!this.formInfo.defaultAddress) {
|
||||
uni.showToast({
|
||||
|
|
@ -305,6 +515,7 @@
|
|||
})
|
||||
return false;
|
||||
}
|
||||
if (this.pickedProductList[0].product[0].type === 1) {
|
||||
if (!this.formInfo.doorTime || !this.formInfo.expectTimeEnd || !this.formInfo.expectTimeStart) {
|
||||
uni.showToast({
|
||||
title: '请选择上门时间',
|
||||
|
|
@ -312,6 +523,12 @@
|
|||
})
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
const toDay = new Date().toISOString().split('T')[0]
|
||||
this.formInfo.doorTime = toDay
|
||||
this.formInfo.expectTimeStart = toDay + ' 09:00:00'
|
||||
this.formInfo.expectTimeEnd = toDay + ' 09:30:00'
|
||||
}
|
||||
return true;
|
||||
},
|
||||
// 检测当前默认地址是否在服务区域之间
|
||||
|
|
@ -362,12 +579,12 @@
|
|||
goodsList: this.parseGoodsList(),
|
||||
goodsId: this.pickedProductList[0].product[0].goodsId,
|
||||
// 保险id
|
||||
insuranceId: this.chooseInsurance.id
|
||||
// goodsList: [{
|
||||
// goodsId: 2,
|
||||
// num: 1
|
||||
// }]
|
||||
insuranceId: this.chooseInsurance.id,
|
||||
orderImages: this.imgList.length ? this.imgList.join(',') : '',
|
||||
isDeliveryToStore: this.formInfo.isDeliveryToStore,
|
||||
serviceShopId: this.serviceShop ? this.serviceShop.shopId : null
|
||||
}
|
||||
console.log(params);
|
||||
// 调用下单接口
|
||||
let res = await this.$request.placeOrder(params);
|
||||
if (res.code != 0) {
|
||||
|
|
|
|||
|
|
@ -12,6 +12,9 @@
|
|||
<input @confirm="searchGoods" v-model="inputGoodsName" :adjust-position="true" type="text" placeholder="输入搜索内容"
|
||||
confirm-type="search"></input>
|
||||
</view>
|
||||
<ms-dropdown-menu>
|
||||
<ms-dropdown-item v-model="filterType" :list="filterList"></ms-dropdown-item>
|
||||
</ms-dropdown-menu>
|
||||
</view>
|
||||
<!-- 条件筛选栏 -->
|
||||
<scroll-view scroll-x class="bg-white nav text-center" :scroll-with-animation="true"
|
||||
|
|
@ -29,12 +32,12 @@
|
|||
</view>
|
||||
</picker>
|
||||
<!-- 品类筛选picker -->
|
||||
<picker v-else-if="item.code === 'deptGoodsCategoryId'" :mode="'multiSelector'" @change="categoryChange"
|
||||
<picker v-else-if="item.code === 'deptGoodsCategoryIds'" :mode="'multiSelector'" @change="categoryChange"
|
||||
@columnchange="categoryColChange" :value="categoryMultiIndex" :range-key="'goodsCategoryName'"
|
||||
:range="categoryList">
|
||||
<view class="flex justify-start">
|
||||
<view class="text-cut search-nav-item-text">
|
||||
{{chosenCategory && chosenCategory.length ? chosenCategory[2].goodsCategoryName : item.title}}
|
||||
{{currentCategory ? currentCategory.goodsCategoryName : item.title}}
|
||||
</view>
|
||||
<text class="text-lg"><text class="cuIcon-triangledownfill"></text></text>
|
||||
</view>
|
||||
|
|
@ -90,10 +93,14 @@
|
|||
|
||||
<script>
|
||||
import horizontalGoodsCard from '@/components/goods-card/horizontal-goods-card.vue';
|
||||
import msDropdownMenu from '@/components/ms-dropdown/dropdown-menu.vue'
|
||||
import msDropdownItem from '@/components/ms-dropdown/dropdown-item.vue'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
horizontalGoodsCard
|
||||
horizontalGoodsCard,
|
||||
msDropdownMenu,
|
||||
msDropdownItem
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -115,7 +122,7 @@
|
|||
title: '区域',
|
||||
type: 2
|
||||
}, {
|
||||
code: 'deptGoodsCategoryId',
|
||||
code: 'deptGoodsCategoryIds',
|
||||
title: '品类',
|
||||
type: 2
|
||||
},
|
||||
|
|
@ -141,7 +148,7 @@
|
|||
title: '区域',
|
||||
type: 2
|
||||
}, {
|
||||
code: 'deptGoodsCategoryId',
|
||||
code: 'deptGoodsCategoryIds',
|
||||
title: '品类',
|
||||
type: 2
|
||||
},
|
||||
|
|
@ -169,10 +176,26 @@
|
|||
categoryList: [],
|
||||
categoryMultiIndex: [0, 0, 0],
|
||||
chosenCategory: [],
|
||||
isLoadLocalData: true
|
||||
currentCategory: null,
|
||||
isLoadLocalData: true,
|
||||
deptGoodsCategoryIds: [],
|
||||
curUserInfo: null,
|
||||
type: 1,
|
||||
curLocation: null,
|
||||
filterList: [
|
||||
{
|
||||
text: '综合搜索',
|
||||
value: 0
|
||||
},
|
||||
{
|
||||
text: '规格搜索',
|
||||
value: 1
|
||||
}
|
||||
],
|
||||
filterType: 0
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
async onLoad(options) {
|
||||
let params = JSON.parse(decodeURIComponent(options.params));
|
||||
// if (typeof params.pageNum === 'number' && typeof params.pageSize === 'number') {
|
||||
// this.pageNum = params.pageNum;
|
||||
|
|
@ -180,6 +203,7 @@
|
|||
// }
|
||||
if (params.category) {
|
||||
this.chosenCategory[2] = params.category;
|
||||
this.currentCategory = params.category;
|
||||
this.taskConditions[1].value = this.chosenCategory[2].goodsCategoryId;
|
||||
}
|
||||
if (params.area) {
|
||||
|
|
@ -189,8 +213,14 @@
|
|||
if (params.inputGoodsName) {
|
||||
this.inputGoodsName = params.inputGoodsName;
|
||||
}
|
||||
if (params.type) {
|
||||
this.type = params.type
|
||||
}
|
||||
if(params.filterType !== null || params.filterType !== undefined) {
|
||||
this.filterType = params.filterType == 1 ? 1 : 0;
|
||||
}
|
||||
|
||||
this.isLoadLocalData = params.showData;
|
||||
this.curLocation = uni.getStorageSync('userLocation') || {};
|
||||
|
||||
this.loadData();
|
||||
},
|
||||
|
|
@ -198,15 +228,49 @@
|
|||
async loadData() {
|
||||
this.pageNum = this.$globalData.initPageNum;
|
||||
this.pageSize = this.$globalData.initPageSize;
|
||||
let type;
|
||||
console.log(this.chosenCategory);
|
||||
let currentCategory;
|
||||
if (this.chosenCategory[2]) {
|
||||
type = this.chosenCategory[2].type;
|
||||
currentCategory = this.chosenCategory[2];
|
||||
}
|
||||
this.loadCategoryList(type);
|
||||
this.loadCategoryList(this.type);
|
||||
// 获取当前定位
|
||||
await this.getCurAreaArr();
|
||||
await this.loadRegionList();
|
||||
|
||||
this.curUserInfo = this.$request.getCurUserInfo();
|
||||
|
||||
const deptGoodsCategoryIds = []
|
||||
if(this.curUserInfo) {
|
||||
const res = await this.$request.getChooseCategories({
|
||||
selectionType: 1,
|
||||
customerId: this.curUserInfo.customerId
|
||||
})
|
||||
deptGoodsCategoryIds.push(...res[1].data.data)
|
||||
}
|
||||
this.deptGoodsCategoryIds = deptGoodsCategoryIds
|
||||
|
||||
console.log(this.deptGoodsCategoryIds);
|
||||
|
||||
let chooseTypes = []
|
||||
if(currentCategory && currentCategory.level === 2) {
|
||||
let typeList = await this.$request.listByStepWithAllNode({
|
||||
goodsCategoryId: currentCategory.goodsCategoryId,
|
||||
type: this.type
|
||||
});
|
||||
chooseTypes = typeList.data.filter(i => this.deptGoodsCategoryIds.includes(i.goodsCategoryId)).map(i => i.goodsCategoryId)
|
||||
console.log(chooseTypes);
|
||||
this.taskConditions[1].value = chooseTypes
|
||||
} else if(currentCategory && currentCategory.level === 3) {
|
||||
if(this.deptGoodsCategoryIds.includes(currentCategory.goodsCategoryId)) {
|
||||
this.taskConditions[1].value = [currentCategory.goodsCategoryId]
|
||||
} else {
|
||||
this.taskConditions[1].value = []
|
||||
}
|
||||
} else {
|
||||
this.taskConditions[1].value = deptGoodsCategoryIds
|
||||
}
|
||||
|
||||
this.loadProductData();
|
||||
this.loadOtherCityProductData();
|
||||
},
|
||||
|
|
@ -218,15 +282,6 @@
|
|||
}
|
||||
},
|
||||
async loadProductData(params = {}) {
|
||||
if(!this.isLoadLocalData) {
|
||||
this.loadMoreStatus = 'over bg-grey padding-tb text-lg'
|
||||
this.hasMoreData = false;
|
||||
return;
|
||||
}
|
||||
params.pageNum = this.pageNum;
|
||||
params.pageSize = this.pageSize;
|
||||
params.goodsName = this.inputGoodsName;
|
||||
params.status = 0;
|
||||
this.taskConditions.forEach((condition) => {
|
||||
if (condition.type === 2) {
|
||||
params[condition.code] = condition.value;
|
||||
|
|
@ -235,6 +290,30 @@
|
|||
params.params[condition.code] = condition.value === 1 ? 'desc' : 'asc';
|
||||
}
|
||||
})
|
||||
// if(!this.deptGoodsCategoryIds.includes(params.deptGoodsCategoryId)) {
|
||||
// this.loadMoreStatus = 'over bg-grey padding-tb text-lg'
|
||||
// this.hasMoreData = false;
|
||||
// return;
|
||||
// }
|
||||
if(params.deptGoodsCategoryIds.length === 0) {
|
||||
this.loadMoreStatus = 'over bg-grey padding-tb text-lg'
|
||||
this.hasMoreData = false;
|
||||
return;
|
||||
}
|
||||
params.pageNum = this.pageNum;
|
||||
params.pageSize = this.pageSize;
|
||||
if (this.filterType === 0) {
|
||||
params.goodsName = this.inputGoodsName;
|
||||
} else {
|
||||
params.goodsStandard = this.inputGoodsName;
|
||||
}
|
||||
|
||||
params.status = 0;
|
||||
params.type = this.type;
|
||||
if(this.curLocation) {
|
||||
params.latitude = this.curLocation.latitude
|
||||
params.longitude = this.curLocation.longitude
|
||||
}
|
||||
// params.areaId = null;
|
||||
if (this.chosenArea[this.chosenArea.length - 1].isAll) {
|
||||
params.areaId = null;
|
||||
|
|
@ -264,6 +343,7 @@
|
|||
})
|
||||
params.areaId = null;
|
||||
params.exceptParentAreaId = this.chosenArea[this.chosenArea.length - 1].areaId;
|
||||
params.type = this.type;
|
||||
|
||||
this.loadMoreStatusOfOtherCityPage = 'loading bg-main-color padding-tb text-lg';
|
||||
this.hasMoreOtherCityData = false;
|
||||
|
|
@ -450,35 +530,57 @@
|
|||
// }
|
||||
},
|
||||
async categoryChange(e) {
|
||||
console.log(e.detail.value);
|
||||
this.categoryMultiIndex = e.detail.value;
|
||||
let chosenCategory = [];
|
||||
let chosenCategory = [], lastCategory, level = 2;
|
||||
for (let i = 0; i < this.categoryList.length; i++) {
|
||||
chosenCategory.push(this.categoryList[i][this.categoryMultiIndex[i]]);
|
||||
}
|
||||
let lastCategory = null;
|
||||
for (let i = chosenCategory.length - 1; i >= 0; i--) {
|
||||
if (i === 0) {
|
||||
lastCategory = chosenCategory[i];
|
||||
if (lastCategory && lastCategory.isAllNode) {
|
||||
let res = await this.$request.listByStep({
|
||||
type: 1
|
||||
});
|
||||
lastCategory = res.data[0];
|
||||
if(chosenCategory[2] === undefined) {
|
||||
lastCategory = chosenCategory[1]
|
||||
} else {
|
||||
lastCategory = chosenCategory[2]
|
||||
level = 3
|
||||
}
|
||||
break;
|
||||
}
|
||||
lastCategory = chosenCategory[i];
|
||||
if (!lastCategory || lastCategory.isAllNode) {
|
||||
lastCategory = chosenCategory[i - 1];
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
chosenCategory[chosenCategory.length - 1] = lastCategory;
|
||||
this.currentCategory = lastCategory;
|
||||
console.log(chosenCategory);
|
||||
console.log(lastCategory);
|
||||
this.chosenCategory = chosenCategory;
|
||||
this.taskConditions[this.tabCur].value = chosenCategory[chosenCategory.length - 1].goodsCategoryId;
|
||||
if(level === 3) {
|
||||
if(lastCategory.isAllNode) {
|
||||
this.taskConditions[this.tabCur].value = this.categoryList[2].filter(i => this.deptGoodsCategoryIds.includes(i.goodsCategoryId)).map(i => i.goodsCategoryId)
|
||||
} else {
|
||||
this.taskConditions[this.tabCur].value = [chosenCategory[chosenCategory.length - 1].goodsCategoryId]
|
||||
}
|
||||
} else if(level === 2){
|
||||
if(lastCategory.isAllNode) {
|
||||
let res = await this.$request.getProductCategories({
|
||||
type: 1,
|
||||
customerId: this.curUserInfo.customerId,
|
||||
isSetting: 1
|
||||
});
|
||||
const allServiceCategory = res[1].data.data[0];
|
||||
const allIds = this.getAllIds(allServiceCategory.child[this.categoryMultiIndex[0]].child)
|
||||
console.log(allIds);
|
||||
this.taskConditions[this.tabCur].value = allIds
|
||||
}
|
||||
}
|
||||
this.searchGoods();
|
||||
},
|
||||
getAllIds(treeArray) {
|
||||
let ids = [];
|
||||
let stack = [...treeArray];
|
||||
|
||||
while (stack.length > 0) {
|
||||
const node = stack.pop();
|
||||
ids.push(node.goodsCategoryId);
|
||||
if (node.child && node.child.length > 0) {
|
||||
stack.push(...node.child.reverse());
|
||||
}
|
||||
}
|
||||
|
||||
return ids;
|
||||
},
|
||||
async categoryColChange(e) {
|
||||
let subTypeList = [];
|
||||
let subSubTypeList = [];
|
||||
|
|
@ -509,7 +611,7 @@
|
|||
goodsCategoryId: this.categoryList[1][colObj.value].goodsCategoryId,
|
||||
isAllNode: this.categoryList[1][colObj.value].isAllNode
|
||||
});
|
||||
subSubTypeList = subSubTypeList.data;
|
||||
subSubTypeList = [subSubTypeList.data[0], ...subSubTypeList.data.filter(i => this.deptGoodsCategoryIds.includes(i.goodsCategoryId))];
|
||||
this.categoryList.pop();
|
||||
this.categoryList.push(subSubTypeList ? subSubTypeList : []);
|
||||
this.categoryMultiIndex = [this.categoryMultiIndex[0], colObj.value, 0];
|
||||
|
|
@ -531,6 +633,7 @@
|
|||
margin: 0;
|
||||
padding: 0 10rpx;
|
||||
width: 180rpx;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.cu-load {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<block slot="backText">返回</block>
|
||||
<block slot="content">产品分类</block>
|
||||
</cu-custom>
|
||||
<vertical-nav v-if="categoryList" :containerHeight="containerHeight" :navList="level0CategoryList" :list="categoryList" :isClick2ShowProducts="true"></vertical-nav>
|
||||
<vertical-nav v-if="categoryList.length" :containerHeight="containerHeight" :navList="level0CategoryList" :list="categoryList" :isClick2ShowProducts="true"></vertical-nav>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -21,11 +21,15 @@
|
|||
containerHeight: '100vh - ' + this.CustomBar + 'px - 46px',
|
||||
level0CategoryList: [],
|
||||
categoryList: [],
|
||||
deptGoodsCategoryIds: []
|
||||
deptGoodsCategoryIds: [],
|
||||
type: 1
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.loadData();
|
||||
onLoad(options) {
|
||||
if(options && options.type) {
|
||||
this.type = options.type
|
||||
}
|
||||
this.loadData({}, this.type);
|
||||
this.bindEvent();
|
||||
},
|
||||
onUnload() {
|
||||
|
|
@ -34,7 +38,8 @@
|
|||
methods: {
|
||||
async loadData(params = {}, type = 1) {
|
||||
let res0 = await this.$request.listByStep({
|
||||
level: 0
|
||||
level: 0,
|
||||
type: this.type
|
||||
});
|
||||
this.level0CategoryList = res0.data;
|
||||
this.curUserInfo = this.$request.getCurUserInfo();
|
||||
|
|
@ -54,10 +59,12 @@
|
|||
// this.categoryList = await this.$api.data('categoryList');
|
||||
let res = await this.$request.getProductCategories({
|
||||
...params,
|
||||
type: type
|
||||
type: type,
|
||||
customerId: this.curUserInfo.customerId,
|
||||
isSetting: 1
|
||||
});
|
||||
res = res[1].data.data;
|
||||
res.forEach(firstCategory => {
|
||||
const firstCategory = res[0]
|
||||
if (firstCategory.child && firstCategory.child.length) {
|
||||
if(this.deptGoodsCategoryIds.length === 0) {
|
||||
this.categoryList = this.categoryList.concat(firstCategory.child)
|
||||
|
|
@ -66,7 +73,6 @@
|
|||
console.log(this.categoryList);
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
filterDataInSelect(data) {
|
||||
const newData = []
|
||||
|
|
@ -99,7 +105,8 @@
|
|||
},
|
||||
chooseSubType(item) {
|
||||
let params = {
|
||||
category: item
|
||||
category: item,
|
||||
type: this.type
|
||||
};
|
||||
uni.navigateTo({
|
||||
url: '/pages/product/filtered-products?params=' + encodeURIComponent(JSON.stringify(params))
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<page-meta :page-style="'overflow:'+(ifShowPageMeta?'hidden':'visible')"></page-meta>
|
||||
<view>
|
||||
<view class="padding-bottom-lg margin-bottom-lg">
|
||||
<!-- 顶部操作条 -->
|
||||
<cu-custom :bgColor="'bg-white'" :isBack="true" :isBackHome="false" :homePageUrl="'/pages/index/index'">
|
||||
<block slot="backText">返回</block>
|
||||
|
|
@ -66,6 +66,12 @@
|
|||
<view class='cu-tag round bg-orange light' v-if="productDetail.servActivity">
|
||||
<text>{{productDetail.servActivity}}</text>
|
||||
</view>
|
||||
<view class='cu-tag round bg-orange light' v-if="productDetail.installService">
|
||||
<text class="text-black">{{getInstallServiceName()}}</text>
|
||||
</view>
|
||||
<view class='cu-tag round bg-orange light' v-if="productDetail.deliveryService">
|
||||
<text class="text-black">{{getDeliveryName()}}</text>
|
||||
</view>
|
||||
<view class='cu-tag round light bg-blue padding-lr-sm' v-if="productDetail.deptGoodsCategoryName">
|
||||
<text v-if="productDetail.parGoodsCategoryName">
|
||||
{{productDetail.parGoodsCategoryName}}
|
||||
|
|
@ -84,6 +90,29 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="margin-lr-sm padding-sm margin-top-sm bg-white flex" v-if="productDetail.serviceShop">
|
||||
<view>门店</view>
|
||||
<view class="flex-sub flex" @click="openShopImages">
|
||||
<view style="width: 150rpx;height: 150rpx;margin: 0 10px;">
|
||||
<image style="width: 100%;height: 100%;" :src="productDetail.serviceShop.imageUrl.split(',')[0]" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="flex-sub">
|
||||
<view class="text-bold" style="text-overflow: ellipsis;overflow: hidden;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;">{{productDetail.serviceShop.shopName}}</view>
|
||||
<view class="padding-tb-xs" style="display: flex;flex-direction: row;flex-wrap: wrap;align-items: center;">
|
||||
<view class='cu-tag round bg-orange light' v-if="productDetail.storeService">
|
||||
<text class="text-black" v-if="productDetail.storeService == 1">到店服务</text>
|
||||
<text class="text-black" v-if="productDetail.storeService == 2">到店+配送(服务)</text>
|
||||
<text class="text-black" v-if="productDetail.storeService == 3">到店+上门(服务)</text>
|
||||
</view>
|
||||
<view style="display: inline-block;margin-left: 10rpx;" v-if="productDetail.serviceShop.distance">
|
||||
<view class="cu-tag bg-red" style="padding: 0 2px;height: auto;">距离您</view>
|
||||
<text class="text-gray" style="vertical-align: middle;">{{productDetail.serviceShop.distance}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view style="text-overflow: ellipsis;overflow: hidden;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;">{{productDetail.serviceShop.provinceName + productDetail.serviceShop.cityName + productDetail.serviceShop.countryName + productDetail.serviceShop.streetName + productDetail.serviceShop.address}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 服务保障和规格 -->
|
||||
<view class="margin-lr-sm padding margin-top-sm bg-white">
|
||||
<view v-if="productDetail.expectDuration">
|
||||
|
|
@ -92,7 +121,7 @@
|
|||
<text class="cuIcon-repairfill"></text>
|
||||
</view>
|
||||
<view class="cu-tag line-main-color">
|
||||
服务时效
|
||||
{{productDetail.type === 2 ? '发货时效' : '服务时效 '}}
|
||||
</view>
|
||||
</view>
|
||||
<text class="margin-lr-xs text-sm">{{productDetail.expectDuration}}</text>
|
||||
|
|
@ -108,13 +137,13 @@
|
|||
</view>
|
||||
<text class="margin-lr-xs text-sm">质保期{{productDetail.warrantyPeriod}}  不满意重新服务  快速退赔</text>
|
||||
</view>
|
||||
<view>
|
||||
<view v-if="productDetail.goodsAreaList">
|
||||
<view class="cu-capsule margin-tb-xs">
|
||||
<view class='cu-tag bg-main-color'>
|
||||
<text class="cuIcon-deliver_fill"></text>
|
||||
</view>
|
||||
<view class="cu-tag line-main-color">
|
||||
服务区域
|
||||
{{productDetail.type === 2 ? '发货区域' : '服务区域'}}
|
||||
</view>
|
||||
</view>
|
||||
<text v-for="(item,index) in productDetail.goodsAreaList">
|
||||
|
|
@ -138,7 +167,7 @@
|
|||
<text class="cuIcon-noticefill"></text>
|
||||
</view>
|
||||
<view class="cu-tag line-red">
|
||||
请核对下单地址与服务区域相匹配
|
||||
请核对下单地址与{{productDetail.type === 2 ? '发货区域' : '服务区域'}}相匹配
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -197,7 +226,7 @@
|
|||
</view>
|
||||
<!-- 服务详情 -->
|
||||
<view id="pageAnchor2" class="margin-lr-sm margin-top-sm bg-white margin-bottom-with-bar">
|
||||
<view class="text-center padding-xl">{{productDetail.remark}}</view>
|
||||
<view class="text-center padding-xl" v-if="productDetail.remark">{{productDetail.remark}}</view>
|
||||
<view class="image">
|
||||
<image v-for="(item,index) in detailPicList" :key="index" :src="item.imgUrl" mode="widthFix" style="width: 100%;"></image>
|
||||
</view>
|
||||
|
|
@ -228,7 +257,7 @@
|
|||
购物车
|
||||
</view> -->
|
||||
<!-- <view class="bg-main-color light submit" @click="toggleProductPickModal">加入购物车</view> -->
|
||||
<view class="bg-main-color submit" @tap="checkLogin" @click="beforeCheckStatusThenOpen">立即订购</view>
|
||||
<view class="bg-main-color submit" @tap="checkLogin" @click="beforeCheckStatusThenOpen">{{productDetail.type === 2 ? '立即订购' : '立即预约'}}</view>
|
||||
</view>
|
||||
<!-- 底部弹窗 -->
|
||||
<uni-popup ref="productPickPopup" type="bottom" @change="changePopupState">
|
||||
|
|
@ -279,6 +308,9 @@
|
|||
onLoad(options) {
|
||||
let params = JSON.parse(decodeURIComponent(options.params));
|
||||
this.inParam = params;
|
||||
// this.inParam = {
|
||||
// goodsId: 2089
|
||||
// };
|
||||
this.loadData();
|
||||
this.bindEvent();
|
||||
this.loadDefaultAddress()
|
||||
|
|
@ -320,10 +352,17 @@
|
|||
await this.$request.refreshCurUserCache();
|
||||
this.curUserInfo = this.$request.getCurUserInfo();
|
||||
if(this.curUserInfo) {
|
||||
const curLocation = uni.getStorageSync('userLocation') || {latitude: '',longitude: ''};
|
||||
let productDetailMock = await this.$api.data('productDetail');
|
||||
this.productDetail = await this.$request.getGoodsDetail({
|
||||
goodsId: this.inParam.goodsId
|
||||
const getProInfo = await this.$request.getGoodsDetail({
|
||||
goodsId: this.inParam.goodsId,
|
||||
latitude: curLocation.latitude,
|
||||
longitude: curLocation.longitude
|
||||
});
|
||||
if(getProInfo.type !== 1) {
|
||||
getProInfo.serviceShop = getProInfo.shop
|
||||
}
|
||||
this.productDetail = getProInfo
|
||||
// 默认规格
|
||||
this.curProductSpecs = this.productDetail.goodsStandardList[0];
|
||||
// 轮播图
|
||||
|
|
@ -432,6 +471,24 @@
|
|||
selector: '#pageAnchor' + index
|
||||
})
|
||||
},
|
||||
getDeliveryName() {
|
||||
if(this.productDetail.deliveryService === 1) {
|
||||
return '包邮'
|
||||
} else if(this.productDetail.deliveryService === 2) {
|
||||
return '同城包送'
|
||||
} else if(this.productDetail.deliveryService === 3) {
|
||||
return '邮费自付/自提'
|
||||
}
|
||||
},
|
||||
getInstallServiceName() {
|
||||
if(this.productDetail.installService === 1) {
|
||||
return '包安装'
|
||||
} else if(this.productDetail.installService === 2) {
|
||||
return '不包安装'
|
||||
} else if(this.productDetail.installService === 3) {
|
||||
return '自费安装'
|
||||
}
|
||||
},
|
||||
async loadDefaultAddress() {
|
||||
let res = await this.$request.getAddressList({
|
||||
customerId: this.$request.getCurUserInfo().customerId,
|
||||
|
|
@ -442,6 +499,22 @@
|
|||
this.defaultAddress = defaultAdd.length ? defaultAdd[0] : res.data[0];
|
||||
}
|
||||
},
|
||||
// openShopLocation() {
|
||||
// wx.openLocation({
|
||||
// latitude: this.productDetail.serviceShop.longitude,
|
||||
// longitude: this.productDetail.serviceShop.latitude,
|
||||
// scale: 18,
|
||||
// name: this.productDetail.serviceShop.shopName,
|
||||
// address: `${this.productDetail.serviceShop.provinceName}${this.productDetail.serviceShop.cityName}${this.productDetail.serviceShop.countryName}${this.productDetail.serviceShop.streetName}${this.productDetail.serviceShop.address}`
|
||||
// })
|
||||
// },
|
||||
openShopImages() {
|
||||
const imgList = this.productDetail.serviceShop.imageUrl.split(',')
|
||||
uni.previewImage({
|
||||
urls: imgList,
|
||||
current: imgList[0]
|
||||
});
|
||||
},
|
||||
// 检测当前默认地址是否在服务区域之间
|
||||
checkDefaultAddressIfInclude() {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
|
@ -451,7 +524,7 @@
|
|||
if(!status) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '产品页面的【服务区域】与您默认的地址不匹配,如未选错产品,请提交后改新地址!',
|
||||
content: `产品页面的【${this.productDetail.type === 2 ? '发货区域' : '服务区域'}】与您默认的地址不匹配,如未选错产品,请提交后改新地址!`,
|
||||
cancelText: '返回查看',
|
||||
confirmText: '继续下单',
|
||||
success: res => {
|
||||
|
|
@ -478,7 +551,7 @@
|
|||
if(!allAreaId.includes(curAreaId)) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '所选产品与您目前所在位置定位不是同一个区/县,请查看产品页面的【服务区域】与【区域备注】!',
|
||||
content: `所选产品与您目前所在位置定位不是同一个区/县,请查看产品页面的【${this.productDetail.type === 2 ? '发货区域' : '服务区域'}】与【区域备注】!`,
|
||||
cancelText: '返回查看',
|
||||
confirmText: '继续下单',
|
||||
success: res => {
|
||||
|
|
|
|||
|
|
@ -2,10 +2,11 @@
|
|||
<view>
|
||||
<view class="padding-lr bg-white main-container">
|
||||
<view class="cu-list menu-avatar margin-bottom-sm">
|
||||
<view class="cu-item padding-bottom-sm">
|
||||
<view class="cu-avatar xl" :style="'background-image:url(' + productInfo.goodsImgUrl + ');'">
|
||||
<view class="cu-item padding-bottom-sm" style="height: 156rpx;">
|
||||
<view class="cu-avatar xxl">
|
||||
<image :src="curSpec.imageUrl || productInfo.goodsImgUrl" mode="aspectFill" style="width: 100%;height: 100%;" @click="previewImg"></image>
|
||||
</view>
|
||||
<view class="content margin-left">
|
||||
<view class="content margin-left" style="left: 180rpx;">
|
||||
<view>
|
||||
<text class="text-price text-red text-xxl">{{curSpec.goodsPrice}}</text>
|
||||
<text class="margin-left-xs">/{{curSpec.goodsUnit}}</text>
|
||||
|
|
@ -88,7 +89,8 @@
|
|||
totalPrice: 0,
|
||||
pickList: [],
|
||||
totalPickCount: 0,
|
||||
defaultAddress: null
|
||||
defaultAddress: null,
|
||||
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
|
@ -193,6 +195,13 @@
|
|||
uni.navigateTo({
|
||||
url: '../order/order-detail?params=' + encodeURIComponent(JSON.stringify(params))
|
||||
})
|
||||
},
|
||||
previewImg() {
|
||||
const imgUrl = this.curSpec.imageUrl || this.productInfo.goodsImgUrl
|
||||
wx.previewImage({
|
||||
urls: [imgUrl],
|
||||
current: imgUrl
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -134,7 +134,8 @@
|
|||
areaMultiIndex: [0, 0],
|
||||
categoryList: [],
|
||||
stickyTop: this.CustomBar,
|
||||
isShowAllAreaCurCity: false
|
||||
isShowAllAreaCurCity: false,
|
||||
deptGoodsCategoryIds: []
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
|
|
@ -154,6 +155,16 @@
|
|||
// 获取当前定位
|
||||
await this.getCurAreaArr();
|
||||
await this.loadRegionList();
|
||||
|
||||
this.curUserInfo = this.$request.getCurUserInfo();
|
||||
if(this.curUserInfo) {
|
||||
const res = await this.$request.getChooseCategories({
|
||||
selectionType: 1,
|
||||
customerId: this.curUserInfo.customerId
|
||||
})
|
||||
this.deptGoodsCategoryIds = res[1].data.data
|
||||
}
|
||||
|
||||
this.searchGoods();
|
||||
},
|
||||
async getCurAreaArr() {
|
||||
|
|
@ -165,7 +176,8 @@
|
|||
async loadProductData(params = {}) {
|
||||
params = {
|
||||
status: 0,
|
||||
...params
|
||||
...params,
|
||||
deptGoodsCategoryIds: this.deptGoodsCategoryIds
|
||||
}
|
||||
if (this.searchInfo.area[this.searchInfo.area.length - 1].isAll) {
|
||||
params.areaId = null;
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 581 B |
Loading…
Reference in New Issue