Kaynağa Gözat

Merge branch 'master' into debt

shish 1 yıl önce
ebeveyn
işleme
a45ceb051e

+ 8 - 8
ghsApp/src/admin/billing/affirm.vue

@@ -151,10 +151,10 @@
           </tui-list-cell>
 
           <tui-list-cell class="line-cell" :hover="false" :arrow="false">
-            <view class="tui-title">款方式</view>
-            <button @click="form.hasPay = 2" class="admin-button-com middle" :class="form.hasPay == 2 ? 'blue' : 'default'">赊账</button>
-            <button @click="form.hasPay = 0" class="admin-button-com middle" :class="form.hasPay == 0 ? 'blue' : 'default'">扫码付</button>
-            <button @tap="form.hasPay = 1" class="admin-button-com middle" :class="form.hasPay == 1 ? 'blue' : 'default'">线下</button>
+            <view class="tui-title">款方式</view>
+            <button @click="form.hasPay = 2" class="admin-button-com big" :class="form.hasPay == 2 ? 'blue' : 'default'" style="margin-right:16upx;">赊账</button>
+            <button @click="form.hasPay = 0" class="admin-button-com big" :class="form.hasPay == 0 ? 'blue' : 'default'" style="margin-right:16upx;">扫码分享</button>
+            <button @tap="form.hasPay = 1" class="admin-button-com big" :class="form.hasPay == 1 ? 'blue' : 'default'" style="margin-right:0upx;">线下</button>
           </tui-list-cell>
 
           <tui-list-cell class="line-cell" :arrow="true" v-if="form.hasPay == 1">
@@ -167,16 +167,16 @@
 
           <tui-list-cell class="line-cell" :hover="false" :arrow="false">
             <view class="tui-title">打印小票</view>
-            <button @click="form.needPrint = 1" class="admin-button-com middle" :class="form.needPrint == 1 ? 'blue' : 'default'">打印</button>
-            <button @tap="form.needPrint = 2" class="admin-button-com middle" :class="form.needPrint == 2? 'blue' : 'default'">不打印</button>
+            <button @click="form.needPrint = 1" class="admin-button-com big" :class="form.needPrint == 1 ? 'blue' : 'default'">打印</button>
+            <button @tap="form.needPrint = 2" class="admin-button-com big" :class="form.needPrint == 2? 'blue' : 'default'">不打印</button>
           </tui-list-cell>
 
           <tui-list-cell class="line-cell" :hover="false" :arrow="false" >
             <view class="tui-title">
               <text>合计金额</text>  
             </view>
-            <text style="color: #3385FF">¥{{parseFloat(finalPrice)}}</text>
-            <button @tap="showDiscount()" class="admin-button-com mini-btn default" style="margin-left:50upx;">点击打折</button>
+            <text style="color: #3385FF;width:140upx;">¥{{parseFloat(finalPrice)}}</text>
+            <button @tap="showDiscount()" class="admin-button-com middle default" style="margin-left:0upx;">点击打折</button>
             <text v-if="discountValue>0 && discountValue<1">{{ Number(discountValue)*10 }}折</text>
           </tui-list-cell>
 

+ 64 - 6
ghsApp/src/admin/billing/toPay.vue

@@ -33,6 +33,17 @@
             <view style="margin-top:20upx;">
                 <button style="width:25vh;" class="admin-button-com big blue" @click="gotoOrderDetail()">订单详情</button>
             </view>
+            <view style="margin-top:20upx;">
+                
+
+			<!-- #ifdef MP-WEIXIN -->
+			<button style="width:25vh;" class="admin-button-com big blue" open-type="share">邀请付款</button>
+			<!-- #endif -->
+			<!-- #ifdef APP-PLUS -->
+			<button style="width:25vh;" class="admin-button-com big blue" @click="shareOrder()">邀请付款</button>
+			<!-- #endif -->
+
+            </view>
             <view style="margin-top:20upx;">
                 <button style="width:25vh;" @click="changePayWay(2)" class="admin-button-com big default">记赊账</button>
             </view>
@@ -50,13 +61,14 @@
   </view>
 </template>
 <script>
+import { mapGetters } from "vuex";
+import { IMGHOST } from '@/config'
 import { cancel,debtPay,getDetail,codePay,codePayCheck} from "@/api/order";
 export default {
   name: "toPay",
   components: {
   },
   mixins: [],
-  computed: {},
   data() {
     return {
       orderId:0,
@@ -87,16 +99,62 @@ export default {
       getDetail({ id: option.orderId }).then(res=>{
         if(res.code == 1){
           this.orderInfo = res.data
+
+          let customName = this.orderInfo.customName ? this.orderInfo.customName : ''
+          let actPrice = this.orderInfo.actPrice ? parseFloat(this.orderInfo.actPrice) : 0
+          this.title = customName+' '+this.orderInfo.addTime.substr(5,11)+' ¥'+actPrice
+          if(this.orderInfo.payTime!='0000-00-00 00:00:00'){
+            this.title = customName+' '+this.orderInfo.payTime.substr(5,11)+' ¥'+actPrice
+          }
+          if(this.orderInfo.tkPrice && Number(this.orderInfo.tkPrice)>0){
+            this.title = this.title+' 已退¥'+parseFloat(this.orderInfo.tkPrice)
+          }
+          if(this.orderInfo.status == 1){
+            this.title = this.title+' 点击付款,10分钟后失效'
+          }
+
         }
       })
     }
-
-    //在微信端,主动发起扫码
-    // #ifdef MP-WEIXIN
-    this.beginScan()
-    // #endif
   },
+	computed: {
+		...mapGetters({dictInfo:"getDictionariesInfo" }),
+	},
+	onShareAppMessage(res) {
+		console.log("pagesOrder/showOrder?id="+this.orderInfo.purchaseId)
+		return {
+			title: this.title,
+			desc: "",
+			imageUrl: IMGHOST+'/custom/order_share.jpg',
+			path: "pagesOrder/showOrder?id="+this.orderInfo.purchaseId,
+		}
+	},
   methods: {
+		shareOrder(){
+			console.log("pagesOrder/showOrder?id="+this.orderInfo.purchaseId)
+			let that = this
+			let miniOriginalId = that.dictInfo.miniOriginalId && that.dictInfo.miniOriginalId.current && that.dictInfo.miniOriginalId.current.ghs ? that.dictInfo.miniOriginalId.current.ghs : ''
+			uni.share({
+				provider: "weixin", //分享服务提供商(即weixin|qq|sinaweibo)
+				scene: 'WXSceneSession', //场景,可取值参考下面说明。
+				type: 5, //分享形式
+				title: that.title, //分享内容的标题
+				summary: '暂无', //分享内容的摘要
+				imageUrl: IMGHOST+'/custom/order_share.jpg',//图片一定要有,不然会分享失败
+				miniProgram: {
+					id: miniOriginalId,//小程序原始id,发起分享的 App 与小程序属于同一微信开放平台账号
+					path: "pagesOrder/showOrder?id="+this.orderInfo.purchaseId,
+					type: 0,// 0-正式版; 1-测试版; 2-体验版
+					webUrl: 'https://www.wixhb.com'
+				},
+				success: function(res) {
+					//console.log(res)
+				},
+				fail: function(err) {
+					//console.log(err)
+				}
+			})
+		},
     gotoOrderDetail() {
       let id = this.option.orderId ? this.option.orderId : 0
       this.$util.pageTo({url: "/pagesOrder/detail?id="+id,type:2})

+ 0 - 11
ghsApp/src/admin/custom/set.vue

@@ -16,13 +16,6 @@
 					<input type="number" v-model="form.allowDebtAmount" @focus="form.allowDebtAmount=''" placeholder-class="phcolor" class="tui-input" name="allowDebtAmount" placeholder="请填写金额" />
 				</tui-list-cell>
 
-				<tui-list-cell class="line-cell" :hover="false">
-					<view class="tui-title">新客自助挂账</view>
-					<view>
-						<switch style="transform:scale(0.7,0.7)" :checked="form.allowDebt == 0 ? false : true" @change="allowDebtChange" /> {{form.allowDebt==0 ? '禁止' : '允许'}}
-					</view>
-				</tui-list-cell>
-
 				<tui-list-cell class="line-cell" :hover="false">
 					<view class="tui-title">新客查看库存</view>
 					<view>
@@ -84,7 +77,6 @@ export default {
 	data() {
 		return {
 			form: {
-				allowDebt:0,
 				needCheck:0,
 				home:1,
 				homeAmount:0,
@@ -125,9 +117,6 @@ export default {
 		showSoldChange(e){
 			this.form.showSold = e.target.value ? 1 : 0
 		},
-		allowDebtChange(e){
-			this.form.allowDebt = e.target.value ? 1 : 0
-		},
 		needCheckChange(e){
 			this.form.needCheck = e.target.value ? 1 : 0
 		},

+ 1 - 1
ghsApp/src/pagesOrder/detail.vue

@@ -1166,7 +1166,7 @@ export default {
 					this.title = this.title+' 已退¥'+parseFloat(this.detailInfo.tkPrice)
 				}
 				if(this.detailInfo.status == 1){
-					this.title = this.title+' 点击付款,10分钟后失效'
+					this.title = this.title+' 点击付款,10分钟后失效'
 				}
 
 				this.settlePrice = Number(this.detailInfo.bookPrice) - Number(this.detailInfo.orderPrice)