shish 4 жил өмнө
parent
commit
7ae3b0ba26

+ 9 - 2
ghsApp/src/admin/book/detail.vue

@@ -28,7 +28,7 @@
 			</view>
 			</view>
 
 
 		</view>
 		</view>
-
+		<view class="return-index" @click="pageTo({url: '/admin/book/index',type:3,})">返回首页</view>
 	</view>
 	</view>
 </template>
 </template>
 <script>
 <script>
@@ -84,7 +84,7 @@ export default {
 </script>
 </script>
 <style lang="scss" scoped>
 <style lang="scss" scoped>
 .app-content{
 .app-content{
-	padding:20rpx 20rpx 10rpx 20rpx;
+	padding:20rpx 20rpx 60rpx 20rpx;
     .title{
     .title{
 		font-weight: bold;
 		font-weight: bold;
 		font-size:40rpx;
 		font-size:40rpx;
@@ -112,5 +112,12 @@ export default {
 	.book-button{
 	.book-button{
 		margin-bottom:15rpx;
 		margin-bottom:15rpx;
 	}
 	}
+	.return-index{
+		text-align: right;
+		margin-top:60rpx;
+		margin-right:20rpx;
+		text-decoration:underline;
+		font-size:35rpx;
+	}
 }
 }
 </style>
 </style>

+ 2 - 2
ghsApp/src/admin/book/index.vue

@@ -69,9 +69,9 @@ export default {
                 }
                 }
             }
             }
             .book-item{
             .book-item{
-                line-height: 62rpx;
+                line-height: 64rpx;
                 color:#008000;
                 color:#008000;
-                font-size:28rpx;
+                font-size:30rpx;
                 display:list-item;
                 display:list-item;
                 list-style-type:disc;
                 list-style-type:disc;
                 margin-left:80rpx;
                 margin-left:80rpx;

+ 43 - 4
ghsApp/src/admin/changePrice/components/Item.vue

@@ -1,9 +1,10 @@
 <template>
 <template>
+<view class="product">
 	<view class="item-cmd_bx" :class="[info.status ==2?'sold-out':'']">
 	<view class="item-cmd_bx" :class="[info.status ==2?'sold-out':'']">
 		<view class="img_bx">
 		<view class="img_bx">
 			<app-img :src="info.cover" alt="" mode="aspectFit" :height="160" />
 			<app-img :src="info.cover" alt="" mode="aspectFit" :height="160" />
 		</view>
 		</view>
-		<view class="cmd-info_bx">
+		<view class="cmd-info_bx" @click="pageTo({url: '/admin/item/detail',query: {id: info.id}})">
 			<view class="tit">{{ info.itemName || "" }}</view>
 			<view class="tit">{{ info.itemName || "" }}</view>
 			<view class="kc">¥{{ info.price }}</view>
 			<view class="kc">¥{{ info.price }}</view>
 			<view class="num-open_bx">
 			<view class="num-open_bx">
@@ -11,12 +12,14 @@
 					<view class="open-bx" >
 					<view class="open-bx" >
 						还剩 <text style="margin-left:8rpx;">{{ info.stock }}</text>
 						还剩 <text style="margin-left:8rpx;">{{ info.stock }}</text>
 						<text style="margin-left:30rpx;color:#999999" v-if="info.status ==2">已下架</text>
 						<text style="margin-left:30rpx;color:#999999" v-if="info.status ==2">已下架</text>
-						<input class="change-input" @blur="savePrice" @focus="modifyPrice = ''" placeholder-style="color:#CCCCCC" v-model="modifyPrice" type="digit" placeholder="填写价格" />
+						<input class="change-input" @click.stop @blur="savePrice" @focus="modifyPrice = ''" placeholder-style="color:#CCCCCC" v-model="modifyPrice" type="digit" placeholder="填写价格" />
 					</view>
 					</view>
 				</view>
 				</view>
 			</view>
 			</view>
 		</view>
 		</view>
 	</view>
 	</view>
+	<view class="level-price">散客 ¥<text style="margin-right:30rpx;">{{skPrice}}</text>普店 ¥<text style="margin-right:30rpx;">{{pdPrice}}</text>银店 ¥<text style="margin-right:30rpx;">{{ydPrice}}</text>金店 ¥<text>{{jdPrice}}</text></view>
+</view>
 </template>
 </template>
 
 
 <script>
 <script>
@@ -47,19 +50,55 @@ export default {
 	data() {
 	data() {
 		return {
 		return {
 			STOCK_TYPE,
 			STOCK_TYPE,
-			modifyPrice:''
+			modifyPrice:'',
+			skPrice:0,
+			pdPrice:0,
+			ydPrice:0,
+			jdPrice:0
 		};
 		};
 	},
 	},
-	mounted(){},
+	watch: {
+		modifyPrice: {
+			handler(newPwd, oldPwd) {
+				console.log(oldPwd)
+				console.log(newPwd)
+				if(newPwd > 0){
+					this.changeLevelPrice(newPwd)
+				}
+			}
+		}
+	},
+	mounted(){
+		this.skPrice = parseFloat(this.info.skPrice)
+		this.pdPrice = parseFloat(this.info.price)
+		this.ydPrice = parseFloat(this.info.hjPrice)
+		this.jdPrice = parseFloat(this.info.zsPrice)
+	},
 	methods: {
 	methods: {
 		savePrice() {
 		savePrice() {
 			this.$emit("savePrice",this.modifyPrice,this.info.id);
 			this.$emit("savePrice",this.modifyPrice,this.info.id);
+		},
+		changeLevelPrice(pdPrice){
+			this.pdPrice = parseFloat(pdPrice)
+			let skSub = (this.info.addPrice - this.info.skAddPrice).toFixed(2)
+			let ydSub = (this.info.addPrice - this.info.hjAddPrice).toFixed(2)
+			let jdSub = (this.info.addPrice - this.info.zsAddPrice).toFixed(2)
+			this.skPrice = parseFloat((pdPrice - skSub).toFixed(2))
+			this.ydPrice = parseFloat((pdPrice - ydSub).toFixed(2))
+			this.jdPrice = parseFloat((pdPrice - jdSub).toFixed(2))
 		}
 		}
 	}
 	}
 };
 };
 </script>
 </script>
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>
+.product{
+	height:230rpx;
+	.level-price{
+		color:#999999;
+		text-align: right;
+	}
+}
 .sold-out{
 .sold-out{
 	background:#F6F6F6;
 	background:#F6F6F6;
 }
 }

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

@@ -26,7 +26,7 @@
 						<view class="item_list_title" v-if="!$util.isEmpty(classItem.child)"> {{ classItem.className }}</view>
 						<view class="item_list_title" v-if="!$util.isEmpty(classItem.child)"> {{ classItem.className }}</view>
 						<text v-if="tabs[tabIndex].name=='库存预警'&&$util.isEmpty(classItem.child)">当前库存充足</text>
 						<text v-if="tabs[tabIndex].name=='库存预警'&&$util.isEmpty(classItem.child)">当前库存充足</text>
 						<template v-for="(productItem, productIndex) in classItem.child">
 						<template v-for="(productItem, productIndex) in classItem.child">
-							<view style="height: 200rpx" :id="`class_${classIndex}`" :key="productIndex">
+							<view style="height: 230rpx" :id="`class_${classIndex}`" :key="productIndex">
 								<ItemComponent v-if="classItem.isActive"
 								<ItemComponent v-if="classItem.isActive"
 								:isPrice="false"
 								:isPrice="false"
 								:type="tabs[tabIndex].key"
 								:type="tabs[tabIndex].key"

+ 2 - 2
ghsApp/src/admin/home/mall.vue

@@ -5,10 +5,10 @@
     </view>
     </view>
     <!-- 确认 -->
     <!-- 确认 -->
       <div class="confirm-btn">
       <div class="confirm-btn">
-        <button class="admin-button-com big blue" @click="downloadImg">下载图片分享</button>
+        <button class="admin-button-com big blue" @click="downloadImg">保存图片</button>
       </div>
       </div>
       <div class="confirm-btn1">
       <div class="confirm-btn1">
-        <button class="admin-button-com big blue" @click="goToMallPt('pages/home/index')">直接打开分享</button>
+        <button class="admin-button-com big blue" @click="goToMallPt('pages/home/index')">打开商城</button>
       </div>
       </div>
   </view>
   </view>
 </template>
 </template>

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

@@ -10,7 +10,7 @@
 			<view class="num-open_bx">
 			<view class="num-open_bx">
 				<template>
 				<template>
 					<view class="open-bx">
 					<view class="open-bx">
-						库存 <text style="font-size: 23rpx;">{{ parseFloat(info.stock) }}</text>
+						还剩 <text style="font-size: 23rpx;margin-left:8rpx;">{{ parseFloat(info.stock) }}</text>
 						<text style="margin-left:30rpx;font-size: 23rpx;display:inline-block;color:#999;">销量 {{ parseFloat(info.actualSold) }}</text>
 						<text style="margin-left:30rpx;font-size: 23rpx;display:inline-block;color:#999;">销量 {{ parseFloat(info.actualSold) }}</text>
 						<text v-if="info.status ==2" style="margin-left:20rpx;font-size:23rpx;color:#999999;font-weight:normal;">已下架</text>
 						<text v-if="info.status ==2" style="margin-left:20rpx;font-size:23rpx;color:#999999;font-weight:normal;">已下架</text>
 					</view>
 					</view>

+ 89 - 17
ghsApp/src/admin/item/detail.vue

@@ -52,7 +52,7 @@
             class="tui-input"
             class="tui-input"
             name="discountPrice"
             name="discountPrice"
             @focus="form.discountPrice=''"
             @focus="form.discountPrice=''"
-            placeholder="没有特价活动请填0"
+            placeholder="没有特价填0"
             maxlength="50"
             maxlength="50"
             type="digit"
             type="digit"
           />
           />
@@ -64,20 +64,6 @@
           <button v-if="productData.id" class="admin-button-com blue small" @click="goStockDetail(productData.id)">库存明细</button>
           <button v-if="productData.id" class="admin-button-com blue small" @click="goStockDetail(productData.id)">库存明细</button>
         </tui-list-cell>
         </tui-list-cell>
 
 
-        <tui-list-cell class="line-cell" :hover="false">
-          <div class="tui-title">每扎加价</div>
-          <input
-            v-model="form.addPrice"
-            placeholder-class="phcolor"
-            class="tui-input"
-            name="addPrice"
-            @focus="form.addPrice=''"
-            placeholder="请填写加价"
-            maxlength="50"
-            type="digit"
-          />
-        </tui-list-cell>
-
         <tui-list-cell class="line-cell" :arrow="true">
         <tui-list-cell class="line-cell" :arrow="true">
           <div class="tui-title">分类</div>
           <div class="tui-title">分类</div>
           <picker
           <picker
@@ -126,6 +112,59 @@
           </picker>
           </picker>
         </tui-list-cell>
         </tui-list-cell>
 
 
+        <tui-list-cell class="line-cell" :hover="false">
+          <div class="tui-title">散客加价</div>
+          <input
+            v-model="form.skAddPrice"
+            placeholder-class="phcolor"
+            class="tui-input"
+            name="skAddPrice"
+            @focus="form.skAddPrice=''"
+            placeholder="请填写散客加价"
+            maxlength="50"
+            type="digit"
+          />
+        </tui-list-cell>
+        <tui-list-cell class="line-cell" :hover="false">
+          <div class="tui-title">普店加价</div>
+          <input
+            v-model="form.addPrice"
+            placeholder-class="phcolor"
+            class="tui-input"
+            name="addPrice"
+            @focus="form.addPrice=''"
+            placeholder="请填写普店加价"
+            maxlength="50"
+            type="digit"
+          />
+        </tui-list-cell>
+        <tui-list-cell class="line-cell" :hover="false">
+          <div class="tui-title">银店加价</div>
+          <input
+            v-model="form.hjAddPrice"
+            placeholder-class="phcolor"
+            class="tui-input"
+            name="hjAddPrice"
+            @focus="form.hjAddPrice=''"
+            placeholder="请填写银店加价"
+            maxlength="50"
+            type="digit"
+          />
+        </tui-list-cell>
+        <tui-list-cell class="line-cell" :hover="false">
+          <div class="tui-title">金店加价</div>
+          <input
+            v-model="form.zsAddPrice"
+            placeholder-class="phcolor"
+            class="tui-input"
+            name="zsAddPrice"
+            @focus="form.zsAddPrice=''"
+            placeholder="请填写金店加价"
+            maxlength="50"
+            type="digit"
+          />
+        </tui-list-cell>
+
         <tui-list-cell class="line-cell" :hover="false">
         <tui-list-cell class="line-cell" :hover="false">
           <div class="tui-title">单位比</div>
           <div class="tui-title">单位比</div>
           <input
           <input
@@ -232,7 +271,10 @@ export default {
         smallUnitId:2,
         smallUnitId:2,
         classId:'',
         classId:'',
         price:'',
         price:'',
+        skAddPrice:'',
         addPrice:'',
         addPrice:'',
+        hjAddPrice:'',
+        zsAddPrice:'',
         discountPrice:'',
         discountPrice:'',
         weight:'',
         weight:'',
         cover:'',
         cover:'',
@@ -328,7 +370,10 @@ export default {
         this.form.delStatus = 0
         this.form.delStatus = 0
         this.form.id = 0
         this.form.id = 0
         this.form.price = ''
         this.form.price = ''
+        this.form.skAddPrice =''
         this.form.addPrice =''
         this.form.addPrice =''
+        this.form.hjAddPrice =''
+        this.form.zsAddPrice =''
         this.form.discountPrice = ''
         this.form.discountPrice = ''
       })
       })
     },
     },
@@ -425,8 +470,20 @@ export default {
 					uni.showToast({title:"请填写售价",icon:"none"})
 					uni.showToast({title:"请填写售价",icon:"none"})
 					return;
 					return;
 				}
 				}
+				if(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/.test(this.form.skAddPrice) == false){
+					uni.showToast({title:"请填写散客加价",icon:"none"})
+					return;
+				}
 				if(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/.test(this.form.addPrice) == false){
 				if(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/.test(this.form.addPrice) == false){
-					uni.showToast({title:"请填写加价",icon:"none"})
+					uni.showToast({title:"请填写普店加价",icon:"none"})
+					return;
+				}
+				if(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/.test(this.form.hjAddPrice) == false){
+					uni.showToast({title:"请填写银店加价",icon:"none"})
+					return;
+				}
+				if(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/.test(this.form.zsAddPrice) == false){
+					uni.showToast({title:"请填写金店加价",icon:"none"})
 					return;
 					return;
 				}
 				}
       }
       }
@@ -486,10 +543,25 @@ export default {
           rule: ["required"],
           rule: ["required"],
           msg: ["请填写售价"]
           msg: ["请填写售价"]
         },
         },
+        {
+          name: "skAddPrice",
+          rule: ["required"],
+          msg: ["请填写散客加价"]
+        },
         {
         {
           name: "addPrice",
           name: "addPrice",
           rule: ["required"],
           rule: ["required"],
-          msg: ["请填写每扎加价"]
+          msg: ["请填写普店加价"]
+        },
+        {
+          name: "hjAddPrice",
+          rule: ["required"],
+          msg: ["请填写银店加价"]
+        },
+        {
+          name: "zsAddPrice",
+          rule: ["required"],
+          msg: ["请填写金店加价"]
         },
         },
         {
         {
           name: "discountPrice",
           name: "discountPrice",

+ 2 - 2
ghsApp/src/mixins/globalMixins.js

@@ -59,7 +59,7 @@ export default {
             uni.setStorageSync('HOME_REFRESH', '2')
             uni.setStorageSync('HOME_REFRESH', '2')
 					} else if (res.data.admin.openShop == '2' && res.data.shopAdminId == '0') {
 					} else if (res.data.admin.openShop == '2' && res.data.shopAdminId == '0') {
             this.MODEL_TITLE = '已申请'
             this.MODEL_TITLE = '已申请'
-            this.MODEL_BTN_TEXT = '查看申请进度'
+            this.MODEL_BTN_TEXT = '审核进度'
             this.AUTHORITY_SHOW = true
             this.AUTHORITY_SHOW = true
             uni.hideTabBar()
             uni.hideTabBar()
             uni.removeStorageSync('HOME_STATUS_STROAGE_SHOW')
             uni.removeStorageSync('HOME_STATUS_STROAGE_SHOW')
@@ -88,7 +88,7 @@ export default {
     }
     }
     if (uni.getStorageSync('HOME_REFRESH') == '1') {
     if (uni.getStorageSync('HOME_REFRESH') == '1') {
       this.MODEL_TITLE = '已申请'
       this.MODEL_TITLE = '已申请'
-      this.MODEL_BTN_TEXT = '查看申请进度'
+      this.MODEL_BTN_TEXT = '审核进度'
       this.AUTHORITY_SHOW = true
       this.AUTHORITY_SHOW = true
       uni.hideTabBar()
       uni.hideTabBar()
     }
     }

+ 2 - 2
ghsApp/src/pagesClient/official/pay.vue

@@ -31,7 +31,7 @@
         <span></span>
         <span></span>
         <span class="app-price">
         <span class="app-price">
           <span></span>
           <span></span>
-          <span class="app-size-40" style="text-decoration:line-through">{{ detail.price }}</span>
+          <span class="app-size-40" style="text-decoration:line-through"></span>
         </span>
         </span>
       </div>
       </div>
 
 
@@ -39,7 +39,7 @@
         <span>合计</span>
         <span>合计</span>
         <span class="app-price">
         <span class="app-price">
           <span>¥</span>
           <span>¥</span>
-          <span class="app-size-40">{{ detail.price }}</span>
+          <span class="app-size-40"></span>
         </span>
         </span>
       </div>
       </div>