jf пре 5 година
родитељ
комит
e2a1ed6ac1
2 измењених фајлова са 9 додато и 14 уклоњено
  1. 3 6
      ghsApp/src/admin/billing/priceChange.vue
  2. 6 8
      ghsApp/src/components/module/app-commodity.vue

+ 3 - 6
ghsApp/src/admin/billing/priceChange.vue

@@ -50,12 +50,9 @@ export default {
   },
   },
   mixins: [productMins],
   mixins: [productMins],
 	onPullDownRefresh() {
 	onPullDownRefresh() {
-		this.initData()
+		this.initDataContrapose();
   	console.error('111')
   	console.error('111')
 	},
 	},
-	onShow(){
-		uni.startPullDownRefresh();
-	},
   data () {
   data () {
     return {
     return {
       pageType: "price_change",
       pageType: "price_change",
@@ -76,7 +73,7 @@ export default {
 								//
 								//
         // });
         // });
 
 
-        await this.initData()
+        await this.initDataContrapose()
       } catch (error) {
       } catch (error) {
         console.log(5555, error)
         console.log(5555, error)
 
 
@@ -89,7 +86,7 @@ export default {
         // }
         // }
         // await autoPriceByIdApi({productId: item.id})
         // await autoPriceByIdApi({productId: item.id})
         // uni.showToast({title: '自动调价成功',icon: 'none',});
         // uni.showToast({title: '自动调价成功',icon: 'none',});
-        await this.initData()
+        await this.initDataContrapose()
       } catch (error) {
       } catch (error) {
       }
       }
     },
     },

+ 6 - 8
ghsApp/src/components/module/app-commodity.vue

@@ -8,6 +8,7 @@
 			<view class="kc">库存{{ info.stock }}</view>
 			<view class="kc">库存{{ info.stock }}</view>
 			<view class="num-open_bx">
 			<view class="num-open_bx">
 				<view class="price">¥{{ info.price }}</view>
 				<view class="price">¥{{ info.price }}</view>
+<!--				<view class="price" style="text-decoration:line-through;">{{ info.price }}</view>-->
 				<view class="open-bx" v-if="type == COMMODITY_TYPE.COMMON">
 				<view class="open-bx" v-if="type == COMMODITY_TYPE.COMMON">
 					<i
 					<i
 						class="iconfont iconjian"
 						class="iconfont iconjian"
@@ -22,6 +23,7 @@
 					<i class="iconfont iconzeng" @click="addEvent"></i>
 					<i class="iconfont iconzeng" @click="addEvent"></i>
 				</view>
 				</view>
 				<view class="open-bx" v-else-if="type == COMMODITY_TYPE.CHANGE">
 				<view class="open-bx" v-else-if="type == COMMODITY_TYPE.CHANGE">
+					<view class="change-input" v-if="info.priceLabel==2&&isShowAutoPrice" @click="isShowAutoPrice=false">{{info.price}}</view>
 <!--					<input v-if="info.priceLabel==2"-->
 <!--					<input v-if="info.priceLabel==2"-->
 <!--						class="change-input"-->
 <!--						class="change-input"-->
 <!--						:value="info.price"-->
 <!--						:value="info.price"-->
@@ -30,13 +32,7 @@
 <!--						@focus="changeAutoPrice=''"-->
 <!--						@focus="changeAutoPrice=''"-->
 <!--						@change="changeAutoPriceEvent"-->
 <!--						@change="changeAutoPriceEvent"-->
 <!--					/>-->
 <!--					/>-->
-					<input
-												class="change-input"
-												v-model="changeAutoPrice"
-												type="digit"
-												placeholder="自动调价"
-												@focus="changeAutoPrice=''"
-					/>
+					<input v-show="!isShowAutoPrice||info.priceLabel!=2" :focus="!isShowAutoPrice" class="change-input" v-model="changeAutoPrice" type="digit" placeholder="自动调价" @focus="changeAutoPrice=''"/>
 					<!--@change="changePriceEvent"-->
 					<!--@change="changePriceEvent"-->
 					<i :class="isShowSucceed?'position iconfont iconjihuo':'position'" ></i>
 					<i :class="isShowSucceed?'position iconfont iconjihuo':'position'" ></i>
 					<view class="btn-box" v-if="changeAutoPrice==''" @click="removeEvent">确定</view>
 					<view class="btn-box" v-if="changeAutoPrice==''" @click="removeEvent">确定</view>
@@ -85,6 +81,7 @@ export default {
 	data() {
 	data() {
 		return {
 		return {
 			COMMODITY_TYPE,
 			COMMODITY_TYPE,
+			isShowAutoPrice:true,
 			isShowSucceed:false,
 			isShowSucceed:false,
 			changeAutoPrice:'',
 			changeAutoPrice:'',
 		};
 		};
@@ -137,10 +134,11 @@ export default {
 				productId: this.info.id,
 				productId: this.info.id,
 				price: this.changeAutoPrice
 				price: this.changeAutoPrice
 			})
 			})
+			this.isShowAutoPrice = true;
 			this.isShowSucceed = true;
 			this.isShowSucceed = true;
 			setTimeout(()=>{
 			setTimeout(()=>{
 				this.isShowSucceed = false
 				this.isShowSucceed = false
-				this.changeAutoPrice = '';
+				// this.changeAutoPrice = '';
 				// this.autoPrice = '';
 				// this.autoPrice = '';
 			},2000)
 			},2000)
 			this.$emit("changePrice", this.info, this.changeAutoPrice);
 			this.$emit("changePrice", this.info, this.changeAutoPrice);