|
|
@@ -8,24 +8,24 @@
|
|
|
</view>退货并退款</view>
|
|
|
<view style="margin-left: 30upx" class="flex" @tap="refundType=2">
|
|
|
<view class="flex-center radioBtn" :class="refundType==1?'':'active'">
|
|
|
- </view>货损仅退款</view>
|
|
|
+ </view>仅退款(货损)</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="refund-item-list" v-if="refundType==1">
|
|
|
<view class="refund-label"><text></text>选择商品:</view>
|
|
|
<view>
|
|
|
<view class="list" v-for="(res,i) in product" :key="i">
|
|
|
- <view class="flex list-title" >
|
|
|
- <text class="product-name">{{res.name}}</text>
|
|
|
- <text class="product-num">{{ `${parseFloat(res.xhNum)}` }}{{res.xhUnitName}}</text>
|
|
|
- <text class="product-price">{{`${parseFloat(res.xhUnitPrice)}`}}元/{{res.xhUnitName}}</text>
|
|
|
+ <view class="flex list-title" >
|
|
|
+ <text class="product-name">{{res.name}}</text>
|
|
|
+ <text class="product-num">{{ `${parseFloat(res.xhNum)}` }}{{res.xhUnitName}}</text>
|
|
|
+ <text class="product-price">{{`${parseFloat(res.xhUnitPrice)}`}}元/{{res.xhUnitName}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="flex list-val" style="font-size:26upx;font-weight:bold;">
|
|
|
+ <input type="number" placeholder="填退货数" v-model="res.refundCount" placeholder-style="color:#CCCCCC" />
|
|
|
+ <text style="margin-left:10upx;">{{res.xhUnitName}}</text>
|
|
|
+ <text style="color:green;margin-left:20upx;">可退{{Number(res.xhNum)-Number(res.refundNum)}}{{res.xhUnitName}}</text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- <view class="flex list-val" style="font-size:26upx;font-weight:bold;">
|
|
|
- <input type="number" placeholder="退货数" v-model="res.refundCount" placeholder-style="color:#CCCCCC" />
|
|
|
- <text style="margin-left:10upx;">{{res.xhUnitName}}</text>
|
|
|
- <text style="color:green;margin-left:20upx;">可退{{Number(res.xhNum)-Number(res.refundNum)}}{{res.xhUnitName}}</text>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="flex refund-item">
|
|
|
@@ -47,36 +47,26 @@
|
|
|
<view class="refund-label"><text></text>实际退款:</view>
|
|
|
<input type="digit" v-model="refundMoney">
|
|
|
</view>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
<view class="refund-item">
|
|
|
<view class="refund-label">备注:</view>
|
|
|
<textarea v-model="remark" />
|
|
|
</view>
|
|
|
- <view style="padding:20upx 0 20upx 0;font-size:32upx;font-weight:bold;">
|
|
|
- <text v-if="orderInfo.onlinePay == 2" style="color:green;">此单线上付款,提交后,钱会原路自动退回给客户</text>
|
|
|
- <block v-else>
|
|
|
- <text v-if="Number(orderInfo.debtPrice)>0" style="color:#3385ff;">
|
|
|
- 此单为欠款单,提交后,欠款金额会自动减少
|
|
|
- </text>
|
|
|
- <text v-else style="color:red;">此单线下付款,提交后钱不会原路退回,请线下转账给客户</text>
|
|
|
- </block>
|
|
|
- </view>
|
|
|
<view class="flex-center btn-box" style="margin-bottom:50upx;margin-top:20upx;padding-bottom:10upx;">
|
|
|
<view class="flex-center btn" @tap="cancelRefund">取消</view>
|
|
|
<view class="flex-center btn active" @tap="confirmRefund" style="margin-left: 80upx">确定</view>
|
|
|
</view>
|
|
|
|
|
|
- <view style="font-size:32upx;z-index:9999;color:red;text-align:center;font-weight:bold;margin-bottom:30upx;"
|
|
|
- v-if="!$util.isEmpty(unClear)" @click="goClear(unClear)">
|
|
|
- <text>有一个待结账单 ¥{{unClear.actPrice?parseFloat(unClear.actPrice):0}}</text>
|
|
|
- <text style="font-weight:bold;margin-left:15upx;">查看</text>
|
|
|
- </view>
|
|
|
-
|
|
|
</view>
|
|
|
</template>
|
|
|
<script>
|
|
|
import TuiListCell from "@/components/plugin/list-cell";
|
|
|
-import { getFullInfo,refund } from "@/api/purchase";
|
|
|
-import { getUnClear } from "@/api/clear"
|
|
|
+import { getFullInfo } from "@/api/purchase";
|
|
|
+import { createRefund } from "@/api/cg-refund";
|
|
|
export default {
|
|
|
name: "orderDetail",
|
|
|
components: {
|
|
|
@@ -129,7 +119,7 @@ export default {
|
|
|
let hasRefundNum = ele.refundNum ? Number(ele.refundNum) : 0
|
|
|
let couldRefundNum = Number(currentNum) - Number(hasRefundNum)
|
|
|
if(Number(currentRefundCont) > Number(couldRefundNum)){
|
|
|
- uni.showToast({title:ele.name+'超过可退数量',icon:'none'})
|
|
|
+ uni.showToast({title:ele.name+' 超过可退数量',icon:'none'})
|
|
|
hasError = true;
|
|
|
return false
|
|
|
}
|
|
|
@@ -161,7 +151,7 @@ export default {
|
|
|
};
|
|
|
that.$util.confirmModal({content:'确认退款?'},() => {
|
|
|
uni.showLoading({title: "提交中",mask:true})
|
|
|
- refund(refundParams).then(res => {
|
|
|
+ createRefund(refundParams).then(res => {
|
|
|
if(res.code == 1){
|
|
|
uni.hideLoading()
|
|
|
this.$util.pageTo({url: '/pagesOrder/refundSuccess?id='+res.data.id,type:2})
|
|
|
@@ -181,20 +171,7 @@ export default {
|
|
|
this.product = res.data.product.map(ele=>{
|
|
|
return {...ele,refundCount:null}
|
|
|
})
|
|
|
-
|
|
|
- let customId = res.data.customId ? res.data.customId : 0
|
|
|
- if(Number(customId)>0){
|
|
|
- getUnClear({customId:customId}).then(res=>{
|
|
|
- if(res.code == 1){
|
|
|
- this.unClear = res.data.info
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
-
|
|
|
- },
|
|
|
- goClear(item){
|
|
|
- this.$util.pageTo({url:'/admin/clear/customInfo?id='+item.id})
|
|
|
- },
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
@@ -236,7 +213,9 @@ export default {
|
|
|
text{color: red;}
|
|
|
}
|
|
|
.list{
|
|
|
- margin-bottom: 10upx;
|
|
|
+ margin-bottom:18upx;
|
|
|
+ border-bottom:1upx solid #CCCCCC;
|
|
|
+ padding-bottom:14upx;
|
|
|
.list-title{
|
|
|
height: 60upx;
|
|
|
padding-bottom: 20upx;
|