|
|
@@ -83,6 +83,7 @@
|
|
|
<view class="msg-list" v-if="Number(orderInfo.remainDebtPrice)>0">
|
|
|
<view class="label" style="color:red;">尾款:</view>
|
|
|
<view class="value" style="color:red;font-weight:bold;">¥{{ orderInfo.remainDebtPrice ? parseFloat(orderInfo.remainDebtPrice) : 0 }}</view>
|
|
|
+ <button class="admin-button-com mini-btn" @click="clear(orderInfo)" style="position:relative;left:445upx;top:0">结清</button>
|
|
|
</view>
|
|
|
|
|
|
<view class="msg-list">
|
|
|
@@ -145,6 +146,7 @@ import RateModule from "@/components/plugin/rate";
|
|
|
import { onlinePrintOrder } from '@/api/order'
|
|
|
import { getDetB} from "@/api/order";
|
|
|
const commonUtil = require("@/utils/common.js");
|
|
|
+import { confirmSettle } from "@/api/settle/index"
|
|
|
export default {
|
|
|
name: "detail",
|
|
|
components: { detailGoods, AppCoupon, ModalModule, RateModule,detailItem },
|
|
|
@@ -158,6 +160,29 @@ export default {
|
|
|
onLoad() {
|
|
|
},
|
|
|
methods: {
|
|
|
+ clear(item){
|
|
|
+ let that = this
|
|
|
+ that.$util.confirmModal({content:'确认结账?'},() => {
|
|
|
+ uni.showActionSheet({
|
|
|
+ itemList: ['请选择收款方式:', '微信', '支付宝','现金','银行卡'],
|
|
|
+ success: function (respond) {
|
|
|
+ let currentIndex = respond.tapIndex
|
|
|
+ let inWay = [{name:"未选择",id:-1},{name:"微信",id:0},{name:"支付宝",id:1},{name:"现金",id:4},{name:"银行卡",id:5}]
|
|
|
+ if(currentIndex > 0){
|
|
|
+ let payWay = inWay[currentIndex].id
|
|
|
+ confirmSettle({id:item.id,payWay:payWay}).then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ that.$msg('操作成功')
|
|
|
+ that.getDetailInfo()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ that.$msg("请选择收款方式")
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
callUp(mobile) {
|
|
|
this.$util.callUp(mobile)
|
|
|
},
|