Blame view

pages/mydeath/mydeath.vue 2.83 KB
1f3f2378   起风了   我的第一次
1
2
3
4
5
6
7
8
9
10
11
12
13
  <template>
  	<view class="page">
  		<pyh-nv ref="nv" :config="nvConfig"></pyh-nv>
  		<view class="listBox" :style="{'padding-top':(pageTop+'px')}">
  			<view class="content">
  				<!-- 订单列表 -->
  				<view class="order-list">
  					<view class="list" v-for="(item,index) in list" @click="onOrderList" :key="index">
  						<view class="title-status">
  							<view class="title">
  								<text>逝者编号:{{item.orderNumber}}</text>
  								<image src="../../static/right1.png"></image>
  							</view>
30c714a7   起风了   zh
14
  							<!-- <view class="status">
1f3f2378   起风了   我的第一次
15
  								<text>待评价</text>
30c714a7   起风了   zh
16
  							</view> -->
1f3f2378   起风了   我的第一次
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
  						</view>
  						<view class="goods-list">
  							<view class="goods">
  								<view class="item">
  									<view class="goods-name">
  										<view class="goods-name-title">逝者姓名:{{item.deceasedName}}</view>
  										<view>创建时间:{{item.createdTime}}</view>
  									</view>
  								</view>
  							</view>
  						</view>
  						<view class="status-btn">
  							<view></view>
  							<view class="btn" @click="mydeathdetail(item)">
  								<image src="../../static/btn.png" mode="widthFix"></image>
  								<text>查看详情</text>
  							</view>
  						</view>
  					</view>
  				</view>
  			</view>
  		</view>
  	</view>
  </template>
  
  <script>
  	export default {
  		data() {
  			return {
  				OrderType: 0,
  				nvConfig: {
  					title: "报丧记录",
  					bgColor: "#ffffff",
  					color: "#000000",
  					fixedAssist: {
  						hide: true,
  					},
  				},
  				info:{
  					pageNum:1,
  					pageSize:10,
  					userId:"",
30c714a7   起风了   zh
59
  					filingStatus:"0"
1f3f2378   起风了   我的第一次
60
61
  				},
  				list:[],
30c714a7   起风了   zh
62
  				total:0,
1f3f2378   起风了   我的第一次
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
  			};
  		},
  		onPageScroll(e) {
  			this.$refs.nv.pageScroll(e)
  		},
  		computed: {
  			pageTop() {
  				return parseInt(88 * uni.getSystemInfoSync().windowWidth / 750) + uni.getSystemInfoSync().statusBarHeight
  			}
  		},
  		onLoad(params) {
  			this.OrderType = params.type;
  			this.getinfo();
  		},
  		methods: {
  			mydeathdetail(item) {
  				var info = JSON.stringify(item)
  				uni.navigateTo({
  					url: '/pages/mydeathdetail/mydeathdetail?info=' + info
  				})
  			},
  			getinfo(){
30c714a7   起风了   zh
85
86
87
88
89
  				if(uni.getStorageSync('userjs') == '调度员'){
  					this.info.userId = ''
  				}else{
  					this.info.userId = uni.getStorageSync("USERS_KEY").userId
  				}
1f3f2378   起风了   我的第一次
90
91
92
  				console.log("user",uni.getStorageSync("USERS_KEY"));
  				this.API.getwsyy(this.info).then(res=>{
  					console.log("获取网上报丧信息",res);
30c714a7   起风了   zh
93
  					this.total = res.total
1f3f2378   起风了   我的第一次
94
95
96
97
98
  					for(let i = 0;i < res.rows.length;i++){
  						this.list.push(res.rows[i])
  					}
  				})
  			},
30c714a7   起风了   zh
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
  		},
  		onReachBottom() {
  			var page = parseInt(this.total / 10 );
  			var s = parseInt(this.total % 10 );
  			console.log(page,s);
  			if(s > 0){
  				page = page + 1
  			}
  			if(page > 0){
  				if(this.info.pageNum < page){
  					this.info.pageNum = this.info.pageNum + 1
  					this.getinfo();
  				}else{
  					console.log("没有了");
  				}
  			}
  		},
1f3f2378   起风了   我的第一次
116
117
118
119
120
121
  	}
  </script>
  
  <style scoped lang="scss">
  	@import 'mydeath.scss';
  </style>