shish 4 years ago
parent
commit
c4269ad8ee
2 changed files with 13 additions and 15 deletions
  1. 12 14
      ghsApp/src/admin/changePrice/components/Item.vue
  2. 1 1
      ghsApp/src/admin/home/me.vue

+ 12 - 14
ghsApp/src/admin/changePrice/components/Item.vue

@@ -22,21 +22,20 @@
 			</view>
 		</view>
 	</view>
-	<view class="level-price">散客 ¥<text style="margin-right:55upx;">{{skPrice}}</text>银店 ¥<text style="margin-right:55upx;">{{ydPrice}}</text>金店 ¥<text>{{jdPrice}}</text></view>
+	<view class="level-price">
+		散客 ¥<text style="margin-right:35upx;">{{skPrice}}</text>
+		普店 ¥<text style="margin-right:35upx;">{{pdPrice}}</text>
+		银店 ¥<text style="margin-right:35upx;">{{ydPrice}}</text>
+		金店 ¥<text style="margin-right:8upx;">{{jdPrice}}</text>
+	</view>
 </view>
 </template>
-
 <script>
-import { STOCK_TYPE } from "@/utils/declare";
 export default {
 	name: "Commodity",
 	components: {
 	},
 	props: {
-		type: {
-			type: String,
-			default: STOCK_TYPE.WARN
-		},
 		isPrice: {
 			type: Boolean,
 			default: true
@@ -51,7 +50,6 @@ export default {
 	},
 	data() {
 		return {
-			STOCK_TYPE,
 			modifyPrice:'',
 			skPrice:0,
 			pdPrice:0,
@@ -61,12 +59,8 @@ export default {
 	},
 	watch: {
 		modifyPrice: {
-			handler(newPwd, oldPwd) {
-				console.log(oldPwd)
-				console.log(newPwd)
-				if(newPwd > 0){
-					this.changeLevelPrice(newPwd)
-				}
+			handler(newValue) {
+				this.changeLevelPrice(newValue)			
 			}
 		}
 	},
@@ -81,6 +75,9 @@ export default {
 			this.$emit("savePrice",this.modifyPrice,this.info.id);
 		},
 		changeLevelPrice(pdPrice){
+			if(Number(pdPrice) <= 0 ||this.$util.isEmpty(pdPrice)){
+				pdPrice = this.info.price
+			}
 			this.pdPrice = parseFloat(pdPrice)
 			let skSub = (this.info.addPrice - this.info.skAddPrice).toFixed(2)
 			let ydSub = (this.info.addPrice - this.info.hjAddPrice).toFixed(2)
@@ -99,6 +96,7 @@ export default {
 	.level-price{
 		color:#999999;
 		text-align: right;
+		font-size:22upx;
 	}
 }
 .sold-out{

+ 1 - 1
ghsApp/src/admin/home/me.vue

@@ -26,7 +26,7 @@
               </view>
 
             </view>
-            <button v-if="loginInfo.switchShop" @click="showAllShop" class="admin-button-com default chang-shop_btn" > <i class="iconfont iconqiehuan1"></i> 切换门店 </button>
+            <button v-if="getLoginInfo.switchShop" @click="showAllShop" class="admin-button-com default chang-shop_btn" > <i class="iconfont iconqiehuan1"></i> 切换门店 </button>
           </view>
           <view class="image-box" >
             <view class="dec"></view>