Przeglądaj źródła

Merge branch 'zhongqi-delivery' of git.huaml.com:zhh/front-end into zhongqi-delivery

shizhongqi 8 miesięcy temu
rodzic
commit
617403ea86

+ 1 - 1
ghsApp/src/admin/changePrice/components/Item2.vue

@@ -58,7 +58,7 @@
 	<view class="level-price">
 		<text>剩余 {{info.stock?parseFloat(info.stock):0}}</text>
 		<text style="position:absolute;left:40upx;">毛利 ¥{{ info.ml ? parseFloat(info.ml) : 0 }}</text>
-		<text style="position:absolute;right:50upx;">成本 ¥{{ parseFloat(info.cost) }}</text>
+		<text style="position:absolute;right:50upx;">成本 ¥{{ info.avCost?parseFloat(info.avCost):0 }}</text>
 	</view>
 
 </view>

+ 1 - 1
ghsApp/src/admin/changePrice/list2.vue

@@ -83,7 +83,7 @@ import { mapGetters } from "vuex";
 import { batchChangePrice,generatePriceTable,cancelDiscountPrice,cancelFullOffFn,cancelPreSell } from '@/api/product'
 import { changeFrontHide } from '@/api/item'
 export default {
-	name: "item_list",
+	name: "list2",
 	components: {
 		AppSearchModule,
 		AppWrapperEmpty,

+ 21 - 9
ghsApp/src/admin/shop/renew.vue

@@ -66,6 +66,16 @@
                     <button class="admin-button-com big blue" @click="startRenew(1,customPrice)">购买</button>
                 </view>
             </view>
+            <view class="product-item">
+                <view class="product-header">
+                    <text class="product-name">购买设备</text>
+                    <input type="digit" class="custom-input" placeholder="请输入金额" v-model="machinePrice" @focus="machinePrice=''" />
+                    <input type="text" class="custom-input" style="margin-left:10upx;" placeholder="备注" v-model="remark" @focus="remark=''" />
+                </view>
+                <view class="btn-group">
+                    <button class="admin-button-com big blue" @click="startRenew(2,machinePrice)">购买</button>
+                </view>
+            </view>
         </view>
     </view>
 </template>
@@ -80,7 +90,9 @@ export default {
 			newDeadline:'',
             hasRenew:0,
             renewType:0,
-            customPrice:''
+            customPrice:'',
+            machinePrice:'',
+            remark:''
         }
     },
     computed: {
@@ -118,7 +130,7 @@ export default {
                 }
             }
             this.renewType = type
-            renewShop({price:price,type:type}).then(res=>{
+            renewShop({price:price,type:type,remark:this.remark}).then(res=>{
                 uni.hideLoading()
                 if(res.code == 1){
                     wexinPay(res.data, this.getSuccess, this.getError)
@@ -142,7 +154,7 @@ export default {
     width: 100%;
     min-height: 100vh;
     background-color: #f5f5f5;
-    padding: 20upx;
+    padding: 20upx 20upx 50upx 20upx;
 }
 
 // 信息卡片
@@ -221,13 +233,13 @@ export default {
 
 .custom-input {
     width: 200upx;
-    height: 40upx;
+    height: 60upx;
     padding: 0 10upx;
-    font-size: 28upx;
+    font-size: 30upx;
     border: 2upx solid #ccc;
     border-radius: 4upx;
     background-color: white;
-    
+    text-align: center;
     &::placeholder {
         color: #999;
     }
@@ -240,9 +252,9 @@ export default {
     margin-top: 40upx;
     
     .admin-button-com {
-        min-width: 200upx;
-        height: 60upx;
-        font-size: 28upx;
+        min-width: 240upx;
+        height: 80upx;
+        font-size: 30upx;
         border-radius: 8upx;
         letter-spacing: 2upx;
         display: flex;

+ 1 - 1
hdApp/src/admin/changePrice/components/Item2.vue

@@ -58,7 +58,7 @@
 	<view class="level-price">
 		<text>剩余 {{info.stock?parseFloat(info.stock):0}}</text>
 		<text style="position:absolute;left:40upx;">毛利 ¥{{ info.ml ? parseFloat(info.ml) : 0 }}</text>
-		<text style="position:absolute;right:50upx;">成本 ¥{{ parseFloat(info.cost) }}</text>
+		<text style="position:absolute;right:50upx;">成本 ¥{{ info.avCost?parseFloat(info.avCost):0 }}</text>
 	</view>
 
 </view>

+ 6 - 6
hdApp/src/admin/home/workbench.vue

@@ -186,11 +186,11 @@
               </view>
               <view class="icon-text">商城</view>
             </view>
-            <view class="icon-item" @click="goPage({url: '/admin/changePrice/list2'})">
+            <view class="icon-item" @click="goPage({url: '/admin/item/list2'})">
               <view class="icon-wrapper">
-                <image class="icon-image" :src="`${constant.hostUrl}/image/ghs/home/gj2.png`" mode="aspectFit"></image>
+                <image class="icon-image" :src="`${constant.hostUrl}/image/ghs/home/hcgl2.png`" mode="aspectFit"></image>
               </view>
-              <view class="icon-text">改价</view>
+              <view class="icon-text">花材</view>
             </view>
             <view class="icon-item" @click="goItemKd()">
               <view class="icon-wrapper">
@@ -210,11 +210,11 @@
               </view>
               <view class="icon-text">拆散</view>
             </view>
-            <view class="icon-item" @click="goPage({url: '/admin/item/list2'})">
+            <view class="icon-item" @click="goPage({url: '/admin/changePrice/list2'})">
               <view class="icon-wrapper">
-                <image class="icon-image" :src="`${constant.hostUrl}/image/ghs/home/hcgl2.png`" mode="aspectFit"></image>
+                <image class="icon-image" :src="`${constant.hostUrl}/image/ghs/home/gj2.png`" mode="aspectFit"></image>
               </view>
-              <view class="icon-text">花材</view>
+              <view class="icon-text">改价</view>
             </view>
             <view class="icon-item" @click="goPage({url: '/pagesPurchase/shopping'})">
               <view class="icon-wrapper">

+ 1 - 1
hdApp/src/admin/item/list2.vue

@@ -596,7 +596,7 @@ export default {
 							sweixin = t;
 						}
 					}
-            		let miniOriginalId = that.dictInfo.miniOriginalId && that.dictInfo.miniOriginalId.current && that.dictInfo.miniOriginalId.current.hd ? that.dictInfo.miniOriginalId.current.hd : ''
+            		let miniOriginalId = that.dictInfo.miniOriginalId && that.dictInfo.miniOriginalId.current && that.dictInfo.miniOriginalId.current.mall ? that.dictInfo.miniOriginalId.current.mall : ''
 					if (sweixin) { //&& sweixin.nativeClient
 						sweixin.launchMiniProgram({
 							id: miniOriginalId,

+ 20 - 12
hdApp/src/admin/order/detail.vue

@@ -77,17 +77,9 @@
             <text v-if="orderInfo.fromType == 4 && !$util.isEmpty(orderInfo.thirdSn)">(美团编号:{{orderInfo.thirdSn}})</text>
           </text>
           <view class="module-tit__actions">
-            <button 
-              class="admin-button-com mini-btn" 
-              @click="edit(orderInfo)" 
-              v-if="orderInfo.status == 1 || orderInfo.status == 2">
-              修改
-            </button>
-            <button 
-              class="admin-button-com mini-btn default" 
-              v-else>
-              修改
-            </button>
+            <button class="admin-button-com middle" @click="edit(orderInfo)" v-if="orderInfo.status == 1 || orderInfo.status == 2"> 修改 </button>
+            <button class="admin-button-com middle default" v-else> 修改 </button>
+            <button class="admin-button-com middle" @click="copyInfo(orderInfo)">复制</button>
           </view>
         </view>
         <view class="module-det">
@@ -136,6 +128,9 @@
                 <text v-else>{{thisYear==orderInfo.reachDate.substr(0,4)?'':orderInfo.reachDate.substr(0,4)+'-'}}{{orderInfo.reachDate ? orderInfo.reachDate.substr(5,11):''}}</text>
                 <text class="ml-10">{{orderInfo.reachPeriod||''}}前</text>
               </view>
+              <view class="price" v-if="orderInfo.cardInfo!=''">
+                <button @click="copyCard(orderInfo)" class="admin-button-com">复制贺卡内容</button>
+              </view>
             </view>
 
             <!-- 寄语信息 -->
@@ -584,7 +579,20 @@ export default {
     edit(item) {
       this.$util.pageTo({url: '/admin/order/modify?id=' + item.id})
     },
-    
+    copyCard(detailInfo){
+      uni.setClipboardData({ data: detailInfo.cardInfo, success: function() { self.$msg("复制成功") } })
+    },
+    copyInfo(detailInfo){
+			let receiveUserName = detailInfo.receiveUserName
+			let receiveMobile = detailInfo.receiveMobile
+			let address = detailInfo.city+detailInfo.dist+detailInfo.address+detailInfo.floor
+			if (!this.$util.isEmpty(detailInfo.showAddress) && address != detailInfo.showAddress){
+				address += "("+detailInfo.showAddress+")"
+			}
+			let val = address+" "+receiveUserName+" "+receiveMobile
+			const self = this
+			uni.setClipboardData({ data: val, success: function() { self.$msg("复制成功") } })
+    },
     goRefund() {
       this.$util.pageTo({url: '/admin/order/refund?id=' + this.option.id})
     },

+ 2 - 2
hdApp/src/manifest.json

@@ -2,8 +2,8 @@
     "name" : "花掌柜",
     "appid" : "__UNI__4079DC1",
     "description" : "花店管家婆",
-    "versionName" : "2.1.1",
-    "versionCode" : 211,
+    "versionName" : "2.1.3",
+    "versionCode" : 213,
     "transformPx" : true,
     /* 5+App特有相关 */
     "app-plus" : {

+ 2 - 1
hdApp/src/pages.json

@@ -523,7 +523,8 @@
 				{ "path": "addCgConfirm","style": {"navigationBarTitleText": "确认订单", "enablePullDownRefresh": false } },
 				{ "path": "addCgResult","style": {"navigationBarTitleText": "结果", "enablePullDownRefresh": false } },
 				{ "path": "confirmTake","style": {"navigationBarTitleText": "确认收货", "enablePullDownRefresh": false } },
-				{ "path": "contact","style": {"navigationBarTitleText": "联系我们", "enablePullDownRefresh": false } }
+				{ "path": "contact","style": {"navigationBarTitleText": "联系我们", "enablePullDownRefresh": false } },
+				{ "path": "appPay","style": {"navigationBarTitleText": "支付", "enablePullDownRefresh": false } }
 			]
 		},
 		{

+ 27 - 0
hdApp/src/pagesPurchase/appPay.vue

@@ -0,0 +1,27 @@
+<template>
+	<view>
+		<web-view :src="payUrl" @message="getMessage"></web-view>
+	</view>
+</template>
+<script>
+	export default {
+		data() {
+			return {
+				payUrl: ''
+			}
+		},
+		onLoad() {
+			// 从本地存储读取 payUrl
+			this.payUrl = uni.getStorageSync('tempPayUrl')
+            console.log(this.payUrl)
+		},
+        methods: {
+            getMessage(e){
+            },
+			init(){
+			}
+        }
+	}
+</script>
+<style>
+</style>

+ 5 - 3
hdApp/src/pagesPurchase/wechatPay.vue

@@ -187,8 +187,6 @@ export default {
     },
     appAliPayFn(payWay){
       let that = this
-      // #ifdef MP-WEIXIN
-      // #endif
       // #ifdef APP-PLUS
       uni.showLoading()
       let id = this.option.id ? this.option.id : 0   
@@ -198,7 +196,11 @@ export default {
           if(res.data.payUrl){
             that.orderSn = res.data.orderSn
             that.needCheck = 1
-            plus.runtime.openWeb(res.data.payUrl)
+            let payUrl = res.data.payUrl?res.data.payUrl:''
+            // 保存 payUrl 到本地存储
+            uni.setStorageSync('tempPayUrl', payUrl)
+            // 跳转到 appPay 页面
+            this.$util.pageTo({ url: '/pagesPurchase/appPay', type: 2 })
           }
         }
       })

+ 2 - 2
开发http/hdApp/src/manifest.json

@@ -2,8 +2,8 @@
     "name" : "花掌柜",
     "appid" : "__UNI__4079DC1",
     "description" : "花店管家婆",
-    "versionName" : "2.1.1",
-    "versionCode" : 211,
+    "versionName" : "2.1.3",
+    "versionCode" : 213,
     "transformPx" : true,
     /* 5+App特有相关 */
     "app-plus" : {

+ 2 - 2
开发https/hdApp/src/manifest.json

@@ -2,8 +2,8 @@
     "name" : "花掌柜",
     "appid" : "__UNI__4079DC1",
     "description" : "花店管家婆",
-    "versionName" : "2.1.1",
-    "versionCode" : 211,
+    "versionName" : "2.1.3",
+    "versionCode" : 213,
     "transformPx" : true,
     /* 5+App特有相关 */
     "app-plus" : {

+ 2 - 2
线上/hdApp/src/manifest.json

@@ -2,8 +2,8 @@
     "name" : "花掌柜",
     "appid" : "__UNI__4079DC1",
     "description" : "花店管家婆",
-    "versionName" : "2.1.1",
-    "versionCode" : 211,
+    "versionName" : "2.1.3",
+    "versionCode" : 213,
     "transformPx" : true,
     /* 5+App特有相关 */
     "app-plus" : {