shish 3 лет назад
Родитель
Сommit
c7cac4bdb5
1 измененных файлов с 17 добавлено и 8 удалено
  1. 17 8
      ghsApp/src/admin/item/list.vue

+ 17 - 8
ghsApp/src/admin/item/list.vue

@@ -8,7 +8,10 @@
 				<view class="search-bar">
 					<app-search-module v-model="py" placeholder="输拼音首字母也可以搜" @input="searchFn"/>
 				</view>
-				<view style="padding:0 0upx 0 20upx;" >
+				<view style="padding:0 0upx 0 15upx;" >
+					<button class="admin-button-com middle blue" @click="refreshItem()">刷新</button>
+				</view>
+				<view style="padding:0 0upx 0 15upx;" >
 					<button class="admin-button-com middle blue" @click="pageTo({ url: '/admin/ptItem/itemList' })">添花材</button>
 				</view>
 			</view>
@@ -162,19 +165,25 @@ export default {
 		...mapGetters({ loginInfo: "getLoginInfo",dictInfo:"getDictionariesInfo" })
 	},
 	onLoad() {
-		this.shopId = this.getMyShopInfo.id;
-		let type = '';
-		if(this.option.delStatus){
-			this.delStatus = this.option.delStatus
-		}
-		let requestType = this.option.warning && this.option.warning == 1 ? 'warning' : 'itemList'
-		this.initData({ type, shopId: this.shopId,status:this.status,delStatus:this.delStatus,requestType:requestType})
+		this.initItem()
 		let that = this
 		getWeixinId().then(res => {
 			that.getAppIdList = res.data
 		})
 	},
 	methods: {
+		initItem(){
+			this.shopId = this.getMyShopInfo.id;
+			let type = '';
+			if(this.option.delStatus){
+				this.delStatus = this.option.delStatus
+			}
+			let requestType = this.option.warning && this.option.warning == 1 ? 'warning' : 'itemList'
+			this.initData({ type, shopId: this.shopId,status:this.status,delStatus:this.delStatus,requestType:requestType})
+		},
+		refreshItem(){
+			this.initItem()
+		},
 		hideChangeFn(item,status){
 			let that = this
 			changeFrontHide({id:item.id,status:status}).then(res=>{