|
@@ -7,21 +7,21 @@
|
|
|
<view slot="icon" style="width: 10rpx;height: 35rpx;background-color: #fd4b09;"></view>
|
|
|
</u-cell>
|
|
|
</u-cell-group>
|
|
|
- <view class="textBox">
|
|
|
+ <!-- <view class="textBox">
|
|
|
<view>快递公司:</view>
|
|
|
<view>{{form.logisticsCorpName || ''}}</view>
|
|
|
</view>
|
|
|
<view class="textBox">
|
|
|
<view>快递单号:</view>
|
|
|
<view>{{form.expressNo || ''}}</view>
|
|
|
- </view>
|
|
|
+ </view> -->
|
|
|
<view class="textBox">
|
|
|
<view>收货人:</view>
|
|
|
<view>{{form.contacts}}</view>
|
|
|
</view>
|
|
|
<view class="textBox">
|
|
|
<view>收货地址:</view>
|
|
|
- <view>{{form.address || ''}}</view>
|
|
|
+ <view>{{form.recAddress || ''}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -52,16 +52,19 @@
|
|
|
<view slot="icon" style="width: 10rpx;height: 35rpx;background-color: #fd4b09;"></view>
|
|
|
</u-cell>
|
|
|
</u-cell-group>
|
|
|
- <u-cell v-for="(item,index) in form.orderItemsList" :key="index" :border="form.orderItemsList.length == Number(index+1)?false:true">
|
|
|
+ <u-cell v-for="(item,index) in form.orderItemsList" :key="index"
|
|
|
+ :border="form.orderItemsList.length == Number(index+1)?false:true">
|
|
|
<view slot="label">
|
|
|
<u-row>
|
|
|
<u-col span="2.9">
|
|
|
- <u--image :showLoading="true" :src="item.url?item.url:'https://td.echepei.com/file/applets/resources/parts/images/404.png'"
|
|
|
+ <u--image :showLoading="true"
|
|
|
+ :src="item.url?item.url:'https://td.echepei.com/file/applets/resources/parts/images/404.png'"
|
|
|
width="150rpx" height="150rpx" radius="10">
|
|
|
</u--image>
|
|
|
</u-col>
|
|
|
<u-col span="9.1">
|
|
|
- <view style="font-size: 36rpx;width: 500rpx;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
|
|
|
+ <view
|
|
|
+ style="font-size: 36rpx;width: 500rpx;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
|
|
|
{{item.goodsName}}
|
|
|
</view>
|
|
|
<view style="display: flex;justify-content: space-between;">
|
|
@@ -76,42 +79,43 @@
|
|
|
</u-row>
|
|
|
</view>
|
|
|
</u-cell>
|
|
|
- </view>
|
|
|
- <view class="contentBox">
|
|
|
- <view style="width: 100%;margin: 0 auto;">
|
|
|
- <u-cell-group :border="false">
|
|
|
- <u-cell :border="false" center title="付款信息" arrow-direction="down">
|
|
|
- <view slot="icon" style="width: 10rpx;height: 35rpx;background-color: #fd4b09;"></view>
|
|
|
- </u-cell>
|
|
|
- </u-cell-group>
|
|
|
- <view class="textBox">
|
|
|
- <view>已付金额:</view>
|
|
|
- <view>0.00</view>
|
|
|
- </view>
|
|
|
- <view class="textBox">
|
|
|
- <view>本次付款:</view>
|
|
|
- <view>0.00</view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
+ </view>
|
|
|
+ <view class="contentBox">
|
|
|
+ <view style="width: 100%;margin: 0 auto;">
|
|
|
+ <u-cell-group :border="false">
|
|
|
+ <u-cell :border="false" center title="付款信息" arrow-direction="down">
|
|
|
+ <view slot="icon" style="width: 10rpx;height: 35rpx;background-color: #fd4b09;"></view>
|
|
|
+ </u-cell>
|
|
|
+ </u-cell-group>
|
|
|
+ <!-- <view class="textBox">
|
|
|
+ <view>已付金额:</view>
|
|
|
+ <view>0.00</view>
|
|
|
+ </view> -->
|
|
|
+ <view class="textBox">
|
|
|
+ <view>本次付款:</view>
|
|
|
+ <view>{{form.salesAmount}}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
<view style="height: 160rpx;"></view>
|
|
|
- <view style="width: 100%;position: fixed;bottom: 0;background-color: #fff;border-top: 1rpx solid #ccc;padding-bottom: env(safe-area-inset-bottom);z-index: 10;">
|
|
|
+ <view v-if="isDisabled"
|
|
|
+ style="width: 100%;position: fixed;bottom: 0;background-color: #fff;border-top: 1rpx solid #ccc;padding-bottom: env(safe-area-inset-bottom);z-index: 10;">
|
|
|
<view style="width: 100%;display: flex;font-size: 24rpx;height: 80rpx;">
|
|
|
+ <view @click="requestRefund" v-if="!form.status == '已收货'"
|
|
|
+ style="width: 50%;display: grid;background-color: #b3b3b3;justify-items: center;height: 100%;align-items: center;">
|
|
|
+ <!-- <u-icon name="close" color="#fff"></u-icon> -->
|
|
|
+ <view style="color: #fff;">申请退款</view>
|
|
|
+ </view>
|
|
|
<view @click="orderClosing"
|
|
|
- style="width: 50%;background-color: #b3b3b3;display: grid;justify-items: center;height: 100%;">
|
|
|
- <u-icon name="close" color="#fff"></u-icon>
|
|
|
- <view style="color: #fff;">取消订单</view>
|
|
|
+ style="width: 100%;background-color: #FD4B09;display: grid;justify-items: center;height: 100%;align-items: center;">
|
|
|
+ <!-- <u-icon name="close" color="#fff"></u-icon> -->
|
|
|
+ <view style="color: #fff;">{{order}}</view>
|
|
|
</view>
|
|
|
- <!-- <view @click="confirmReceipt"
|
|
|
- style="width: 50%;background-color: #FD4B09;display: grid;justify-items: center;height: 100%;">
|
|
|
- <u-icon name="checkmark" color="#fff"></u-icon>
|
|
|
- <view style="color: #fff;">立即支付</view>
|
|
|
- </view> -->
|
|
|
- <view @click="confirmReceipt"
|
|
|
+ <!-- <view @click="confirmReceipt"
|
|
|
style="width: 50%;background-color: #FD4B09;display: grid;justify-items: center;height: 100%;">
|
|
|
<u-icon name="checkmark" color="#fff"></u-icon>
|
|
|
<view style="color: #fff;">确认收货</view>
|
|
|
- </view>
|
|
|
+ </view> -->
|
|
|
<!-- <view v-if="form.status == 2 || form.status == 3" @click="returnGoods"
|
|
|
style="width: 100%;background-color: #FD4B09;display: grid;justify-items: center;height: 100%;">
|
|
|
<u-icon name="close" color="#fff"></u-icon>
|
|
@@ -139,11 +143,15 @@
|
|
|
|
|
|
<script>
|
|
|
import {
|
|
|
- appDetail
|
|
|
+ appDetail,
|
|
|
+ checkOrder,
|
|
|
+ appUpdate
|
|
|
} from '@/api/views/salesSlip/index.js'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ order: "",
|
|
|
+ isDisabled: true,
|
|
|
form: {
|
|
|
orderItemsList: []
|
|
|
}
|
|
@@ -154,19 +162,153 @@
|
|
|
title: '加载中',
|
|
|
mask: true
|
|
|
});
|
|
|
+ let _this = this
|
|
|
appDetail({
|
|
|
id: onLoad.id
|
|
|
}).then(res => {
|
|
|
+ console.log(234324324);
|
|
|
this.form = res.data
|
|
|
console.log(this.form);
|
|
|
+ if (this.form.status == '已发货' ) {
|
|
|
+ _this.isDisabled = true;
|
|
|
+ _this.order = "确认收货";
|
|
|
+ } else if (this.form.status == '录入' || this.form.status == '退款中' || this.form.status == '已取消' ||
|
|
|
+ this.form.status == '退款请核' || this.form.status == '已收货' || this.form.status == '待发货' || this.form.status == '待确认') {
|
|
|
+ _this.order = "申请退款";
|
|
|
+ _this.isDisabled = true;
|
|
|
+ } else {
|
|
|
+ _this.isDisabled = false;
|
|
|
+ }
|
|
|
+
|
|
|
uni.hideLoading();
|
|
|
}).catch(err => {
|
|
|
uni.hideLoading();
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
|
- confirmReceipt(){
|
|
|
+ confirmReceipt() {
|
|
|
console.log(1);
|
|
|
+ },
|
|
|
+ //申请退款按钮
|
|
|
+ requestRefund() {
|
|
|
+ let _this = this
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: "确认退款?",
|
|
|
+ success: function(rest) {
|
|
|
+ if (rest.confirm) {
|
|
|
+ uni.showLoading({
|
|
|
+ title: '退款中',
|
|
|
+ mask: true
|
|
|
+ });
|
|
|
+
|
|
|
+ checkOrder({
|
|
|
+ id: _this.form.id,
|
|
|
+ pageLabel: "销售订单",
|
|
|
+ pageStatus: "this.$store.getters.domSaleStatus",
|
|
|
+ url: "/tirePartsMall/salesManagement/saleOrder/index",
|
|
|
+ }).then(res => {
|
|
|
+ uni.showToast({
|
|
|
+ icon: "none",
|
|
|
+ title: '提交申请成功',
|
|
|
+ mask: true
|
|
|
+ });
|
|
|
+ setTimeout(function() {
|
|
|
+ // appDetail({
|
|
|
+ // id: res.data.id
|
|
|
+ // }).then(res => {
|
|
|
+ // this.form = res.data
|
|
|
+ // console.log(this.form);
|
|
|
+ // }).catch(err => {
|
|
|
+ // uni.hideLoading();
|
|
|
+ // })
|
|
|
+ if (res.code == 200) {
|
|
|
+ _this.isDisabled = false
|
|
|
+ }
|
|
|
+ uni.hideLoading();
|
|
|
+ }, 1000);
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ orderClosing() {
|
|
|
+ console.log(123);
|
|
|
+ this.requestRefund()
|
|
|
+ return
|
|
|
+ if (this.order == "申请退款") {
|
|
|
+ uni.showLoading({
|
|
|
+ title: '退款中',
|
|
|
+ mask: true
|
|
|
+ });
|
|
|
+ checkOrder({
|
|
|
+ id: this.form.id,
|
|
|
+ pageLabel: "销售订单",
|
|
|
+ pageStatus: "this.$store.getters.domSaleStatus",
|
|
|
+ url: "/tirePartsMall/salesManagement/saleOrder/index",
|
|
|
+ }).then(res => {
|
|
|
+ uni.showToast({
|
|
|
+ icon: "none",
|
|
|
+ title: '提交申请成功',
|
|
|
+ mask: true
|
|
|
+ });
|
|
|
+ let _this = this
|
|
|
+ setTimeout(function() {
|
|
|
+ // appDetail({
|
|
|
+ // id: res.data.id
|
|
|
+ // }).then(res => {
|
|
|
+ // this.form = res.data
|
|
|
+ // console.log(this.form);
|
|
|
+ // }).catch(err => {
|
|
|
+ // uni.hideLoading();
|
|
|
+ // })
|
|
|
+ if (res.code == 200) {
|
|
|
+ _this.isDisabled = false
|
|
|
+ }
|
|
|
+ uni.hideLoading();
|
|
|
+ }, 1000);
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ //确认收货
|
|
|
+ let this_ = this
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: "是否确认收货",
|
|
|
+ success: function(rest) {
|
|
|
+ if (rest.confirm) {
|
|
|
+ // 用户点击了确认按钮
|
|
|
+ uni.showLoading({
|
|
|
+ title: '加载中',
|
|
|
+ mask: true
|
|
|
+ });
|
|
|
+ appUpdate({
|
|
|
+ id: this_.form.id,
|
|
|
+ }).then(res => {
|
|
|
+ uni.showToast({
|
|
|
+ icon: "none",
|
|
|
+ title: '确认收货成功',
|
|
|
+ mask: true
|
|
|
+ });
|
|
|
+ let _this = this
|
|
|
+ setTimeout(function() {
|
|
|
+ // appDetail({
|
|
|
+ // id: res.data.id
|
|
|
+ // }).then(res => {
|
|
|
+ // this.form = res.data
|
|
|
+ // console.log(this.form);
|
|
|
+ // }).catch(err => {
|
|
|
+ // uni.hideLoading();
|
|
|
+ // })
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.isDisabled = false
|
|
|
+ }
|
|
|
+ uni.hideLoading();
|
|
|
+ }, 1000);
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|