shish 4 лет назад
Родитель
Сommit
c6bbde6597

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

@@ -6,7 +6,7 @@
 				<app-search-module v-model="py" placeholder="输入字母搜索" @input="searchFn"/>
 			</view>
 			<view style="padding:0 0rpx 0 20rpx;" >
-				<button class="admin-button-com middle blue" @click="downloadTable()">下载价格表</button>
+				<button class="admin-button-com middle blue" @click="downloadTable()">价格表</button>
 			</view>
 		</view>
 

+ 3 - 2
ghsApp/src/admin/home/order.vue

@@ -69,9 +69,10 @@
             </view>
             <view class="order-info_box">
               <view>数量:</view>
-              <view>{{ `${item.bigNum}/${item.smallNum}` }}</view>
+              <view v-if="item.smallNum > 0">{{ `${item.bigNum}/${item.smallNum}` }}</view>
+              <view v-else>{{ item.bigNum }}</view>
               <view class="price">
-                <view>¥{{ item.actPrice }}</view>
+                <view>¥{{ parseFloat(item.actPrice) }}</view>
                 <i class="iconfont iconxiangyou"></i>
               </view>
             </view>

+ 3 - 3
ghsApp/src/admin/item/components/ItemStock.vue

@@ -6,11 +6,11 @@
 		</view>
 		<view class="cmd-info_bx active" @click="pageTo({url: '/admin/item/detail',query: {id: info.id}})">
 			<view class="tit">{{ info.itemName || "" }}</view>
-			<view class="kc">¥{{ info.price }}</view>
+			<view class="kc">¥{{ parseFloat(info.price) }}</view>
 			<view class="num-open_bx">
 				<template>
 					<view class="open-bx">
-						库存 <text style="margin-left: 10rpx;font-size: 23rpx">{{ info.stock }}</text>
+						库存 <text style="margin-left: 10rpx;font-size: 23rpx">{{ parseFloat(info.stock) }}</text>
 					</view>
 				</template>
 			</view>
@@ -125,7 +125,7 @@ export default {
 			width:360rpx;
 		}
 		& .kc {
-			color: #999999;
+			color: red;
 			font-size: 24px;
 			padding: 24px 0 24px;
 		}

+ 33 - 0
ghsApp/src/admin/item/list.vue

@@ -6,6 +6,7 @@
 				<app-search-module v-model="py" placeholder="输入字母搜索" @input="searchFn"/>
 			</view>
 			<view style="padding:0 0rpx 0 20rpx;" >
+				<button class="admin-button-com middle blue" style="margin-right:10rpx;" @click="downloadTable()">价格表</button>
 				<button class="admin-button-com middle blue" @click="pageTo({ url: '/admin/ptItem/itemList' })">添加花材</button>
 			</view>
 		</view>
@@ -60,6 +61,7 @@ import { selectShop } from "@/mixins";
 import { mapGetters } from "vuex";
 import DorpdownSelect from "@/components/module/dorpdownSelect";
 import { getWeixinId } from "@/api/invite/index";
+import { generatePriceTable } from '@/api/product/index'
 export default {
 	name: "item_list",
 	components: {
@@ -96,6 +98,37 @@ export default {
 	},
 
 	methods: {
+		downloadTable(){
+			uni.showLoading({title:'下载中',mask:true});
+			generatePriceTable().then(res => {
+				if(res.code == 1){
+					uni.hideLoading()
+					let file = res.data.file
+					let shortFile = res.data.shortFile
+					uni.downloadFile({
+						url: file,
+						header: {"Content-Type": 'application/vnd.ms-excel'},
+						filePath: `${wx.env.USER_DATA_PATH}/${shortFile}`,
+  						success: (res) => {
+							if (res.statusCode === 200) {
+								wx.saveFileToDisk({
+									filePath: res.filePath,
+									success: function(res) {
+										console.log(res)
+									},
+									fail:function(res) {
+										console.log(res)
+									}
+								})
+							}
+						},
+						fail:()=>{
+							uni.showToast({title:'请用电脑打开小程序下载',mask:true,icon:'none'})
+						}
+					});
+				}					
+			})
+		},
 		goToProduct (id) {
 			let that = this
 			console.log('admin/ghsProduct/detail?shopId='+ that.loginInfo.shopId+'&id=0&ghsShopAdminId='+that.loginInfo.shopAdminId+'&id='+id)

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

@@ -120,12 +120,12 @@
 									<text class="item-name">{{ s.name }}</text>
 									<text class="item-price">
 										<text class="unit"></text>
-										<text class="price"><text v-if="s.bigNum>0">{{s.bigNum}}扎*{{s.unitPrice}}</text> <text v-if="s.smallNum>0" style="margin-left:10rpx;">{{s.smallNum}}支*{{s.smallUnitPrice}}</text></text>
+										<text class="price"><text v-if="s.bigNum>0">{{s.bigNum}}扎*¥{{parseFloat(s.unitPrice)}}</text> <text v-if="s.smallNum>0" style="margin-left:10rpx;">{{s.smallNum}}支*¥{{parseFloat(s.smallUnitPrice)}}</text></text>
 									</text>
 								</view>
 								<view class="info-line">
 									<text class="item-type">{{ s.property }}</text>
-									<text class="item-count">¥{{s.userPrice>0?s.userPrice:s.price }}</text>
+									<text class="item-count">¥{{s.userPrice>0?parseFloat(s.userPrice):parseFloat(s.price) }}</text>
 								</view>
 							</view>
 						</view>
@@ -136,7 +136,7 @@
 							共{{ detailInfo.productStat.kind}}种,共
 							<text v-if="detailInfo.productStat.bigNum > 0">{{ detailInfo.productStat.bigNum }}扎</text>
 							<text v-if="detailInfo.productStat.smallNun > 0">{{detailInfo.productStat.smallNun}}支</text>
-							,合计 ¥<text class="price">{{ userPrice.toFixed(2) }}</text>
+							,合计 ¥<text class="price">{{ parseFloat(userPrice.toFixed(2)) }}</text>
 						</view>
 					</view>
 				</view>

+ 1 - 1
hdApp/src/pagesPurchase/ghsProduct.vue

@@ -8,7 +8,7 @@
           <view class="shop_title">{{pageInfo.name||''}}</view>
 
 			<view v-if="pageInfo.hasRechargeHb && pageInfo.hasRechargeHb ==1" class="shop_intro" @tap="recharge(pageInfo)">
-				<text>充值送红包,最高<text style="color:red;font-weight:700;">{{parseFloat(pageInfo.hasRechargeHbAmount)}}</text>元
+				<text>充值送红包<text style="color:red;font-weight:700;">{{parseFloat(pageInfo.hasRechargeHbAmount)}}</text>元
 					<text style="z-index:999999;margin-left:15rpx;color:red;border:1px solid red;padding:3rpx 12rpx 3rpx 12rpx;border-radius:10rpx;">去充值</text>
 				</text>
 			</view>

+ 1 - 1
hdApp/src/pagesStore/me/recharge.vue

@@ -9,7 +9,7 @@
         <view v-if="item[2]" class="amount string" :class="item[2].select == 1  ? 'selected' : ''" @click="selectRecharge(item[2])">{{item[2].amount}}</view>
       </view>
 
-      <view v-if="!$util.isEmpty(hbData)" class="hb-hint">赠送<text>{{hbData.num}}</text>张<text>{{parseFloat(hbData.hbAmount)}}</text>元红包,共<text>{{parseFloat(hbData.totalHb)}}</text>元</view>
+      <view v-if="!$util.isEmpty(hbData)" class="hb-hint">赠送<text>{{hbData.num}}</text>张<text>{{parseFloat(hbData.hbAmount)}}</text>元红包,共<text>{{parseFloat(hbData.totalHb)}}</text>元</view>
 
       <view class="confirm-btn">
         <button class="admin-button-com big blue" @click="wexinPayFn" formType="submit">充值</button>

+ 3 - 2
hdApp/src/pagesStore/me/rechargeSuccess.vue

@@ -1,6 +1,7 @@
 <template>
   <appResult :title="'充值成功'">
-    <button class="admin-button-com big" @click="closeLayer">关闭</button>
+    <button class="admin-button-com big blue" @click="pageTo('/admin/coupon/couponList')">我的红包</button>
+    <button class="admin-button-com big" @click="goBack">返回</button>
   </appResult>
 </template>
 <script>
@@ -11,7 +12,7 @@ export default {
     appResult,
   },
   methods: {
-    closeLayer() {
+    goBack() {
       uni.navigateBack();
     },
   },