shish 1 год назад
Родитель
Сommit
42c31bdecd
2 измененных файлов с 18 добавлено и 4 удалено
  1. 7 1
      ghsApp/src/admin/expend/addExpend.vue
  2. 11 3
      ghsApp/src/admin/expend/list.vue

+ 7 - 1
ghsApp/src/admin/expend/addExpend.vue

@@ -191,7 +191,13 @@ export default {
           if(res.code == 1){
             this.$msg("提交成功");
             setTimeout(function(){
-              uni.navigateBack({ delta: 1 })
+              uni.navigateBack()
+
+              //返回上一页时需要刷新
+              let pages = getCurrentPages();
+              let prevPage = pages[ pages.length - 2 ];
+              prevPage.$vm.pageAction = {refresh:1}
+
             },1000)
           }
         })

+ 11 - 3
ghsApp/src/admin/expend/list.vue

@@ -20,9 +20,9 @@
 				<view v-if="item.remark!=''" style="color:red;margin-top:8upx;">备注:{{ item.remark }}</view>
 				<view style="margin-top:8upx;">付款:<text>{{item.staffName?item.staffName:''}}</text></view>
 				<view style="margin-top:8upx;" @click="openPicker(item)">
-					时间:{{ item.addTime.substr(5,11) }}
+					时间:{{ item.payTime.substr(5,11) }}
 					<text style="margin-left:40upx;color:#969292;" v-if="item.payTime!='0000-00-00 00:00:00' && item.addTime.substr(5,5)!=item.payTime.substr(5,5)">
-						账单日期 {{ item.payTime.substr(5,11) }}
+						添加时间 {{ item.addTime.substr(5,11) }}
 					</text>
 					<text style="margin-left:30upx;color:#409eff;">修改</text>
 				</view>
@@ -94,9 +94,17 @@ export default {
 			startTime:'',
 			endTime:'',
 			showPicker:false,
-			currentInfo:{}
+			currentInfo:{},
+			pageAction:{refresh:0}
 		};
 	},
+	onShow() {
+		if(this.pageAction.refresh == 1){
+			this.pageAction.refresh = 0
+			this.resetList()
+			this.init()
+		}
+  	},
 	onLoad(){
 		getAllStaff().then(res=>{
 			if(res.code == 1){