浏览代码

收款方式

shish 4 年之前
父节点
当前提交
77394d4b19
共有 3 个文件被更改,包括 36 次插入0 次删除
  1. 25 0
      hdApp/src/admin/order/detail.vue
  2. 5 0
      hdApp/src/api/clear/index.js
  3. 6 0
      hdApp/src/api/settle/index.js

+ 25 - 0
hdApp/src/admin/order/detail.vue

@@ -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)
 		},

+ 5 - 0
hdApp/src/api/clear/index.js

@@ -16,4 +16,9 @@ export const detail = data => {
 //取消
 export const cancel = data => {
 	return https.get('/clear/cancel', data)
+}
+
+//花店给客户结清尾款
+export const confirmClear = data => {
+	return https.get('/order-clear/confirm-clear', data)
 }

+ 6 - 0
hdApp/src/api/settle/index.js

@@ -0,0 +1,6 @@
+import https from "@/plugins/luch-request_0.0.7/request";
+
+//花店给客户结清尾款
+export const confirmSettle = data => {
+	return https.get('/settle/confirm-settle', data)
+}