|
@@ -7,11 +7,10 @@
|
|
|
<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage">
|
|
|
<view class="list-scroll-view">
|
|
|
<view class="one_1">
|
|
|
- <input type="text" v-model="searchInfo.name" @blur="toInput" placeholder="搜索商品名称">
|
|
|
+ <button size="mini" @tap="toDislog">查询条件</button>
|
|
|
</view>
|
|
|
<view class="one_2">
|
|
|
- <view class="list" v-for="(item, index) in list" :key="index"
|
|
|
- @click="toShare(item)">
|
|
|
+ <view class="list" v-for="(item, index) in list" :key="index">
|
|
|
<view class="list_1" v-if="tabs.active=='0'">
|
|
|
<view class="list_1_1">
|
|
|
<view class="shopname">
|
|
@@ -23,55 +22,56 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="list_1_2">
|
|
|
- <view class="goods" v-for="(tag,indexs) in item.goods" :key="indexs">
|
|
|
+ <view class="goods">
|
|
|
<view class="goods_1">
|
|
|
- <image class="image" :src="tag.url" mode=""></image>
|
|
|
+ <image class="image"
|
|
|
+ v-if="item.spec.file&&item.spec.file.length>0"
|
|
|
+ :src="item.spec.file&&item.spec.file.length>0?item.spec.file[0].url:''"
|
|
|
+ mode=""></image>
|
|
|
+ <image class="image" v-else
|
|
|
+ :src="item.goods.file&&item.goods.file.length>0?item.goods.file[0].url:''"
|
|
|
+ mode=""></image>
|
|
|
</view>
|
|
|
<view class="goods_2">
|
|
|
<view class="goodsname textOver">
|
|
|
- {{tag.goods.name}}
|
|
|
+ {{item.goods.name}}
|
|
|
</view>
|
|
|
<view class="specs">
|
|
|
- {{tag.name}}
|
|
|
+ {{item.spec.name}}
|
|
|
</view>
|
|
|
- <text v-if="tag.gift.length>0" class="gift">赠品</text>
|
|
|
- <text v-if="tag.sp_price" class="act">特价</text>
|
|
|
</view>
|
|
|
<view class="goods_3">
|
|
|
- <view v-if="item.type=='0'" class="price">
|
|
|
- ¥{{tag.price||tag.sell_money}}
|
|
|
- </view>
|
|
|
- <view v-else class="price">
|
|
|
- ¥{{tag.group_config.money}}
|
|
|
+ <view class="price">
|
|
|
+ ¥{{item.spec.price||0}}
|
|
|
</view>
|
|
|
<view class="num">
|
|
|
- ×{{tag.buy_num}}
|
|
|
+ ×{{item.num||0}}
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="other">
|
|
|
- <text>共{{item.buy_num_total||0}}件商品</text>
|
|
|
- <text>实付款¥{{item.real_pay}}</text>
|
|
|
+ <text>共{{item.num||0}}件商品</text>
|
|
|
+ <text>实付款¥{{item.pay}}</text>
|
|
|
</view>
|
|
|
<view class="btn">
|
|
|
- <button v-if="item.status=='0'" size="mini"
|
|
|
+ <button type="default" size="mini"
|
|
|
+ @tap.stop="toView(item,'order')">详细信息</button>
|
|
|
+ <button v-if="item.status=='0'||item.status=='1'" size="mini"
|
|
|
@tap.stop="toCancel(item)">取消订单</button>
|
|
|
<button v-if="item.status=='0'" size="mini"
|
|
|
@tap.stop="toPay(item)">支付</button>
|
|
|
- <button v-if="item.status=='1'&&item.is_afterSale!=true" size="mini"
|
|
|
- @tap.stop="toCancels(item)">取消订单</button>
|
|
|
<button v-if="item.status=='2'||item.status=='3'||item.status=='2-'"
|
|
|
- size="mini" @tap.stop="toLogi(item)">查看物流</button>
|
|
|
+ size="mini" @tap.stop="toLogi(item,'order')">查看物流</button>
|
|
|
<button v-if="item.status=='2'&&item.is_afterSale!=true" size="mini"
|
|
|
- @tap.stop="toConfirm(item)">确认收货</button>
|
|
|
+ @tap.stop="toConfirm(item,'order')">确认收货</button>
|
|
|
<button
|
|
|
v-if="item.status=='2'||item.status=='2-'&&item.is_afterSale!=true"
|
|
|
size="mini" @tap.stop="toReject(item)">拒收</button>
|
|
|
<button v-if="item.status=='3'" size="mini"
|
|
|
@tap.stop="toAfter(item)">申请售后</button>
|
|
|
- <button v-if="item.status=='3'" type="default" size="mini"
|
|
|
- @tap.stop="toAppraise(item)">{{item.rate?'追加评价':'立即评价'}}</button>
|
|
|
+ <!-- <button v-if="item.status=='3'" type="default" size="mini"
|
|
|
+ @tap.stop="toAppraise(item)">{{item.rate?'追加评价':'立即评价'}}</button> -->
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="list_2" v-else-if="tabs.active=='-1'">
|
|
@@ -85,15 +85,18 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="list_2_2">
|
|
|
- <image class="image"
|
|
|
- :src="item.url&&item.url.length>0?item.url[0].url:''" mode="">
|
|
|
- </image>
|
|
|
+ <image class="image" v-if="item.spec.file&&item.spec.file.length>0"
|
|
|
+ :src="item.spec.file&&item.spec.file.length>0?item.spec.file[0].url:''"
|
|
|
+ mode=""></image>
|
|
|
+ <image class="image" v-else
|
|
|
+ :src="item.goods.file&&item.goods.file.length>0?item.goods.file[0].url:''"
|
|
|
+ mode=""></image>
|
|
|
<view class="other">
|
|
|
<view class="name textOver">
|
|
|
- {{item.goods.goods.name||'暂无'}}
|
|
|
+ {{item.goods.name||'暂无'}}
|
|
|
</view>
|
|
|
<view class="other_1">
|
|
|
- 商品规格:<text>{{item.goods.name||'暂无'}}</text>
|
|
|
+ 商品规格:<text>{{item.goodsSpec.name||'暂无'}}</text>
|
|
|
</view>
|
|
|
<view class="other_1" v-if="item.type!='3'">
|
|
|
退款:<text>¥{{item.money||0}}</text>
|
|
@@ -108,50 +111,58 @@
|
|
|
</view>
|
|
|
<view class="btn">
|
|
|
<button type="default" size="mini"
|
|
|
- @tap.stop="toView(item)">详细信息</button>
|
|
|
+ @tap.stop="toView(item,'after')">详细信息</button>
|
|
|
<button v-if="item.status=='0'" type="default" size="mini"
|
|
|
- @tap.stop="toCancel(item)">取消售后</button>
|
|
|
+ @tap.stop="toCancels(item)">取消售后</button>
|
|
|
<button
|
|
|
v-if="item.type!='1'&&item.status=='2'||item.status=='3'&&!item.transport.shop_receive"
|
|
|
type="default" size="mini"
|
|
|
@tap.stop="toMaintain(item)">维护单号</button>
|
|
|
<button
|
|
|
- v-if="item.type=='3'&&item.status=='3'&&item.transport.shop_receive==true"
|
|
|
- type="default" size="mini" @tap.stop="toLogi(item)">查看物流</button>
|
|
|
+ v-if="item.type=='3'&&item.status=='3'||item.status=='-3'&&item.transport.customer_receive==true"
|
|
|
+ type="default" size="mini"
|
|
|
+ @tap.stop="toLogi(item,'after')">查看物流</button>
|
|
|
<button
|
|
|
- v-if="item.type=='3'&&item.status=='3'&&item.transport.shop_receive==true&&!item.transport.customer_receive"
|
|
|
- type="default" size="mini" @tap.stop="toConfirm(item)">确认收货</button>
|
|
|
+ v-if="item.type=='3'&&item.status=='3'&&item.transport.customer_receive==true"
|
|
|
+ type="default" size="mini"
|
|
|
+ @tap.stop="toConfirm(item,'after')">确认收货</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="list_2" v-else>
|
|
|
<view class="list_2_1">
|
|
|
<view class="shopname">
|
|
|
<text class="iconfont icon-shangdian"></text>
|
|
|
- <text>{{item.shop_name||'暂无'}}</text>
|
|
|
+ <text>{{item.shop.name||'暂无'}}</text>
|
|
|
</view>
|
|
|
<view class="type">
|
|
|
{{item.zhStatus||'暂无'}}
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="list_2_2">
|
|
|
+ <image class="image"
|
|
|
+ :src="item.goods.file&&item.goods.file.length>0?item.goods.file[0].url:''"
|
|
|
+ mode="">
|
|
|
+ </image>
|
|
|
<view class="other">
|
|
|
<view class="name textOver">
|
|
|
- {{item.goods_name||'暂无'}}
|
|
|
+ {{item.goods.name||'暂无'}}
|
|
|
</view>
|
|
|
<view class="other_1">
|
|
|
开始时间:<text>{{item.start_time||'暂无'}}</text>
|
|
|
</view>
|
|
|
<view class="other_1">
|
|
|
- 结束时间:<text>¥{{item.end_time||'暂无'}}</text>
|
|
|
+ 结束时间:<text>{{item.end_time||'暂无'}}</text>
|
|
|
</view>
|
|
|
<view class="other_1">
|
|
|
- 人数限制:<text>{{item.person_limit||'暂无'}}</text>
|
|
|
+ 人数限制:<text>{{item.person_limit||'暂无'}}人</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="btn">
|
|
|
- <button type="default" size="mini"
|
|
|
- @tap.stop="toView(item)">详细信息</button>
|
|
|
+ <button type="default" v-if="item.status=='0'" size="mini"
|
|
|
+ @tap.stop="toShare(item)">分享</button>
|
|
|
+ <button type="default" v-if="item.status=='0'||item.status=='1'"
|
|
|
+ size="mini" @tap.stop="toHandle(item)">团处理</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -161,6 +172,33 @@
|
|
|
</view>
|
|
|
</tabs>
|
|
|
</view>
|
|
|
+ <view class="dialog" v-if="dialog.show==true">
|
|
|
+ <view class="dialog_1" v-if="dialog.type=='1'">
|
|
|
+ <uni-forms ref="form" :modelValue="searchInfo" :rules="rules" label-width="auto">
|
|
|
+ <uni-forms-item v-if="tabs.active!='-1'" label="商品名称查询" name="goods">
|
|
|
+ <uni-easyinput type="text" v-model="searchInfo.goods" placeholder="请输入商品名称" />
|
|
|
+ </uni-forms-item>
|
|
|
+ <uni-forms-item label="状态" name="status">
|
|
|
+ <picker v-if="tabs.active=='0'" class="picker" mode="selector" :range="ostatusList"
|
|
|
+ @change="statusChange" range-key="label">
|
|
|
+ <view>{{status_name||'请选择状态'}}</view>
|
|
|
+ </picker>
|
|
|
+ <picker v-else-if="tabs.active=='-1'" class="picker" mode="selector" :range="astatusList"
|
|
|
+ @change="statusChange" range-key="label">
|
|
|
+ <view>{{status_name||'请选择状态'}}</view>
|
|
|
+ </picker>
|
|
|
+ <picker v-else-if="tabs.active=='1'" class="picker" mode="selector" :range="gstatusList"
|
|
|
+ @change="statusChange" range-key="label">
|
|
|
+ <view>{{status_name||'请选择状态'}}</view>
|
|
|
+ </picker>
|
|
|
+ </uni-forms-item>
|
|
|
+ </uni-forms>
|
|
|
+ <view class="btn">
|
|
|
+ <button type="primary" @click="onSubmit" size="mini">确定</button>
|
|
|
+ <button type="primary" @click="dialogClose" size="mini">取消</button>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</mobile-frame>
|
|
|
</template>
|
|
@@ -174,6 +212,8 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ // 设备平台信息
|
|
|
+ system: {},
|
|
|
user: {},
|
|
|
searchInfo: {},
|
|
|
list: [],
|
|
@@ -202,6 +242,13 @@
|
|
|
gstatusList: [],
|
|
|
// 售后类型
|
|
|
typeList: [],
|
|
|
+ // 条件弹出框
|
|
|
+ dialog: {
|
|
|
+ show: false,
|
|
|
+ type: '1'
|
|
|
+ },
|
|
|
+ // 状态名称
|
|
|
+ status_name: '',
|
|
|
};
|
|
|
},
|
|
|
onShow: async function() {
|
|
@@ -212,7 +259,7 @@
|
|
|
onPullDownRefresh: async function() {
|
|
|
const that = this;
|
|
|
that.clearPage();
|
|
|
- await that.search(that.tabs.active)
|
|
|
+ await that.search()
|
|
|
uni.stopPullDownRefresh();
|
|
|
},
|
|
|
methods: {
|
|
@@ -230,7 +277,10 @@
|
|
|
active: '1'
|
|
|
})
|
|
|
}
|
|
|
- that.search(that.tabs.active)
|
|
|
+ // 设备平台信息
|
|
|
+ let config = that.$config;
|
|
|
+ that.$set(that, `system`, config.system);
|
|
|
+ that.search()
|
|
|
},
|
|
|
fail: function(err) {
|
|
|
uni.navigateTo({
|
|
@@ -240,7 +290,7 @@
|
|
|
})
|
|
|
},
|
|
|
// 查询列表
|
|
|
- async search(active) {
|
|
|
+ async search() {
|
|
|
const that = this;
|
|
|
let user = that.user;
|
|
|
if (user._id) {
|
|
@@ -249,12 +299,12 @@
|
|
|
limit: that.limit,
|
|
|
}
|
|
|
let res;
|
|
|
- if (active == '0') {
|
|
|
+ if (that.tabs.active == '0') {
|
|
|
info.customer = user._id;
|
|
|
- res = await that.$api(`/orderDetail`, 'GET', {
|
|
|
+ res = await that.$api(`/groupOrder/userView`, 'GET', {
|
|
|
...info,
|
|
|
...that.searchInfo
|
|
|
- })
|
|
|
+ }, 'group')
|
|
|
if (res.errcode == '0') {
|
|
|
let list = [...that.list, ...res.data];
|
|
|
for (let val of list) {
|
|
@@ -264,12 +314,12 @@
|
|
|
that.$set(that, `list`, list);
|
|
|
that.$set(that, `total`, res.total)
|
|
|
}
|
|
|
- } else if (active == '-1') {
|
|
|
+ } else if (that.tabs.active == '-1') {
|
|
|
info.customer = user._id;
|
|
|
- res = await that.$api(`/afterSale`, 'GET', {
|
|
|
+ res = await that.$api(`/groupAfterSale/userView`, 'GET', {
|
|
|
...info,
|
|
|
...that.searchInfo
|
|
|
- })
|
|
|
+ }, 'group')
|
|
|
if (res.errcode == '0') {
|
|
|
let list = [...that.list, ...res.data];
|
|
|
for (let val of list) {
|
|
@@ -277,14 +327,13 @@
|
|
|
if (type) val.zhType = type.label;
|
|
|
let status = that.astatusList.find(i => i.value == val.status)
|
|
|
if (status) val.zhStatus = status.label;
|
|
|
- val.url = val?.goods?.goods?.file;
|
|
|
}
|
|
|
that.$set(that, `list`, list);
|
|
|
that.$set(that, `total`, res.total)
|
|
|
}
|
|
|
} else {
|
|
|
info.leader = user._id;
|
|
|
- res = await that.$api(`/group`, 'GET', {
|
|
|
+ res = await that.$api(`/group/userView`, 'GET', {
|
|
|
...info,
|
|
|
...that.searchInfo
|
|
|
}, 'group')
|
|
@@ -300,6 +349,314 @@
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ // 查询条件
|
|
|
+ toDislog() {
|
|
|
+ const that = this;
|
|
|
+ that.$set(that, `searchInfo`, {})
|
|
|
+ that.$set(that, `status_name`, '')
|
|
|
+ that.$set(that, `dialog`, {
|
|
|
+ show: true,
|
|
|
+ type: '1'
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 状态选择
|
|
|
+ statusChange(e) {
|
|
|
+ const that = this;
|
|
|
+ let data;
|
|
|
+ if (that.tabs.active == '0') data = that.ostatusList[e.detail.value];
|
|
|
+ if (that.tabs.active == '-1') data = that.astatusList[e.detail.value];
|
|
|
+ if (that.tabs.active == '1') data = that.gstatusList[e.detail.value];
|
|
|
+ if (data) {
|
|
|
+ that.$set(that.searchInfo, `status`, data.value);
|
|
|
+ that.$set(that, `status_name`, data.label);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 关闭弹框
|
|
|
+ dialogClose() {
|
|
|
+ const that = this;
|
|
|
+ that.$set(that, `dialog`, {
|
|
|
+ show: false,
|
|
|
+ type: '1'
|
|
|
+ })
|
|
|
+ },
|
|
|
+ onSubmit() {
|
|
|
+ const that = this;
|
|
|
+ that.clearPage();
|
|
|
+ that.search();
|
|
|
+ that.$set(that, `dialog`, {
|
|
|
+ show: false,
|
|
|
+ type: '1'
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 订单详细信息
|
|
|
+ toView(item, type) {
|
|
|
+ const that = this;
|
|
|
+ that.clearPage();
|
|
|
+ if (type == 'order') {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pagesMy/dough/info?id=${item._id}`
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pagesMy/order/afterInfo?id=${item._id}&status=${'1'}`
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 取消订单-未支付||取消订单-已支付
|
|
|
+ toCancel(e) {
|
|
|
+ const that = this;
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '确定取消订单吗?',
|
|
|
+ success: async function(res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ if (e.status == '0') {
|
|
|
+ const arr = await that.$api(`/orderDeal/cancel`, 'POST', {
|
|
|
+ order_id: e._id
|
|
|
+ }, 'group');
|
|
|
+ if (arr.errcode == '0') {
|
|
|
+ uni.showToast({
|
|
|
+ title: '申请取消订单完成',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ that.clearPage();
|
|
|
+ that.search();
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: arr.errmsg,
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (e.is_afterSale != true) {
|
|
|
+ let arr = await that.$api(`/groupAfterSale`, 'POST', {
|
|
|
+ order: e._id,
|
|
|
+ type: '4'
|
|
|
+ }, 'group')
|
|
|
+ if (arr.errcode == '0') {
|
|
|
+ uni.showToast({
|
|
|
+ title: '申请取消订单完成',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ that.clearPage();
|
|
|
+ that.search();
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: arr.errmsg,
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: `该订单有售后处理中`,
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 支付
|
|
|
+ async toPay(e) {
|
|
|
+ const that = this;
|
|
|
+ let system = that.system;
|
|
|
+ if (system.uniPlatform == "mp-weixin") {
|
|
|
+ uni.showLoading({
|
|
|
+ title: '加载中'
|
|
|
+ })
|
|
|
+ // 支付信息
|
|
|
+ let p2 = await that.$api('/orderDeal/pay', 'POST', {
|
|
|
+ order_id: e._id,
|
|
|
+ }, 'group')
|
|
|
+ if (p2.errcode == '0' && p2.data.paySign) {
|
|
|
+ uni.requestPayment({
|
|
|
+ "provider": "wxpay",
|
|
|
+ ...p2.data,
|
|
|
+ success: function(res) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '支付成功',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ },
|
|
|
+ fail: function(err) {
|
|
|
+ uni.showToast({
|
|
|
+ title: `支付失败`,
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ },
|
|
|
+ complete: function() {
|
|
|
+ uni.hideLoading();
|
|
|
+ that.clearPage();
|
|
|
+ that.search()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: p2.errmsg || '错误信息',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ } else if (res.data.uniPlatform == "app") {
|
|
|
+ // app支付
|
|
|
+ uni.requestPayment({
|
|
|
+ provider: 'alipay',
|
|
|
+ orderInfo: 'orderInfo',
|
|
|
+ success: function(res) {
|
|
|
+ console.log('success:' + JSON.stringify(res));
|
|
|
+ },
|
|
|
+ fail: function(err) {
|
|
|
+ console.log('fail:' + JSON.stringify(err));
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: `平台不支持支付`,
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 查看物流
|
|
|
+ toLogi(e, type) {
|
|
|
+ const that = this;
|
|
|
+ that.clearPage();
|
|
|
+ if (type == 'order') {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pagesMy/logistics/index?id=${e._id}&type=${'groupOrder'}`
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pagesMy/logistics/index?id=${e._id}&type=${'groupAfterSale'}`
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 确认收货
|
|
|
+ async toConfirm(e, type) {
|
|
|
+ const that = this;
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '确定确认收货吗?',
|
|
|
+ success: async function(res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ let arr;
|
|
|
+ if (type == 'order') {
|
|
|
+ arr = await that.$api(`/groupOrder/${e._id}`, 'POST', {
|
|
|
+ status: '3'
|
|
|
+ }, 'group');
|
|
|
+ } else {
|
|
|
+ e.transport.customer_receive = true;
|
|
|
+ arr = await that.$api(`/groupAfterSale/${e._id}`, 'POST', {
|
|
|
+ transport: e.transport
|
|
|
+ }, 'group');
|
|
|
+ }
|
|
|
+ if (arr.errcode == '0') {
|
|
|
+ uni.showToast({
|
|
|
+ title: '确认收货成功',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ that.clearPage();
|
|
|
+ that.search();
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: arr.errmsg,
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 拒收
|
|
|
+ async toReject(e) {
|
|
|
+ const that = this;
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '确定拒收快递吗?',
|
|
|
+ success: async function(res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ let arr = await that.$api(`/groupAfterSale`, 'POST', {
|
|
|
+ order: e._id,
|
|
|
+ type: '5'
|
|
|
+ }, 'group')
|
|
|
+ if (arr.errcode == '0') {
|
|
|
+ uni.showToast({
|
|
|
+ title: '拒收申请完成',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ that.clearPage();
|
|
|
+ that.search();
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: arr.errmsg,
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 立即评价
|
|
|
+ toAppraise(e) {
|
|
|
+ const that = this;
|
|
|
+ that.clearPage();
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pagesMy/order/appraise?id=${e._id}`
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 申请售后
|
|
|
+ toAfter(e) {
|
|
|
+ const that = this;
|
|
|
+ if (e.is_afterSale != true) {
|
|
|
+ that.clearPage();
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pagesMy/order/service?id=${e._id}&status=${'-3'}`
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: `该订单有售后处理中`,
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 维护单号
|
|
|
+ toMaintain(e) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pagesMy/order/detail?id=${e._id}&status=${'1'}`
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 取消售后
|
|
|
+ toCancels(e) {
|
|
|
+ const that = this;
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '确定取消售后申请吗?',
|
|
|
+ success: async function(res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ const arr = await that.$api(`/groupAfterSale/${e._id}`, 'DELETE', {}, 'group');
|
|
|
+ if (arr.errcode == '0') {
|
|
|
+ uni.showToast({
|
|
|
+ title: '取消售后成功',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ that.clearPage();
|
|
|
+ that.search();
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: arr.errmsg,
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ toHandle(e) {
|
|
|
+ const that = this;
|
|
|
+ that.clearPage();
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pagesMy/dough/handle?id=${e._id}`
|
|
|
+ })
|
|
|
+ },
|
|
|
// 分页
|
|
|
toPage(e) {
|
|
|
const that = this;
|
|
@@ -318,19 +675,14 @@
|
|
|
uni.hideLoading();
|
|
|
} else {}
|
|
|
},
|
|
|
- // 输入框
|
|
|
- toInput(e) {
|
|
|
- const that = this;
|
|
|
- if (e.detail.value) that.$set(that.searchInfo, `name`, e.detail.value);
|
|
|
- that.clearPage();
|
|
|
- that.search();
|
|
|
- },
|
|
|
// 选择选项卡
|
|
|
tabsChange(e) {
|
|
|
const that = this;
|
|
|
that.$set(that.tabs, `active`, e.active)
|
|
|
+ that.$set(that, `searchInfo`, {})
|
|
|
+ that.$set(that, `status_name`, '')
|
|
|
that.clearPage();
|
|
|
- that.search(e.active)
|
|
|
+ that.search()
|
|
|
},
|
|
|
// 查询其他信息
|
|
|
async searchOther() {
|
|
@@ -358,12 +710,10 @@
|
|
|
// 分享
|
|
|
toShare(e) {
|
|
|
const that = this;
|
|
|
- if (that.tabs.active == '1') {
|
|
|
- uni.navigateTo({
|
|
|
- url: `/pagesHome/group/share?id=${e.goods}`
|
|
|
- })
|
|
|
- that.clearPage();
|
|
|
- }
|
|
|
+ that.clearPage();
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pagesHome/group/share?id=${e.goods._id}&group=${e._id}`
|
|
|
+ })
|
|
|
},
|
|
|
// 清空列表
|
|
|
clearPage() {
|
|
@@ -396,12 +746,11 @@
|
|
|
|
|
|
.one_1 {
|
|
|
padding: 2vw;
|
|
|
+ text-align: center;
|
|
|
|
|
|
- input {
|
|
|
- padding: 2vw;
|
|
|
- background-color: var(--f1Color);
|
|
|
- font-size: var(--font14Size);
|
|
|
- border-radius: 5px;
|
|
|
+ button {
|
|
|
+ background-color: #23B67A;
|
|
|
+ color: #ffffff;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -490,7 +839,7 @@
|
|
|
text-align: right;
|
|
|
|
|
|
button {
|
|
|
- margin: 0 2vw 0 0;
|
|
|
+ margin: 0 1vw 0 0;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -530,6 +879,7 @@
|
|
|
|
|
|
.name {
|
|
|
font-size: var(--font16Size);
|
|
|
+ margin: 0 0 1vw 0;
|
|
|
}
|
|
|
|
|
|
.other_1 {
|
|
@@ -556,6 +906,44 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ .dialog {
|
|
|
+ position: fixed;
|
|
|
+ width: 96vw;
|
|
|
+ height: 100vh;
|
|
|
+ background-color: #ffffff;
|
|
|
+ z-index: 99999;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ padding: 2vw;
|
|
|
+
|
|
|
+ .uni-input {
|
|
|
+ border: #f1f1ff 1px solid;
|
|
|
+ padding: 2vw 2vw;
|
|
|
+ border-radius: 1vw;
|
|
|
+ }
|
|
|
+
|
|
|
+ .picker {
|
|
|
+ border: 1px solid #3333;
|
|
|
+ border-radius: 5px;
|
|
|
+ padding: 2vw;
|
|
|
+ }
|
|
|
+
|
|
|
+ .btn {
|
|
|
+ text-align: center;
|
|
|
+
|
|
|
+ button {
|
|
|
+ margin: 0 2vw 2vw 2vw;
|
|
|
+ background-color: #23B67A;
|
|
|
+ color: #ffffff;
|
|
|
+ }
|
|
|
+
|
|
|
+ .name {
|
|
|
+ color: var(--f85Color);
|
|
|
+ font-size: var(--font14Size);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
.scroll-view {
|
|
|
position: absolute;
|
|
|
top: 0;
|