<template>
|
<view>
|
<view class="status_bar">
|
<!-- 这里是状态栏 -->
|
</view>
|
<uni-nav-bar left-icon="left" title="日计划" @clickLeft="back" @clickRight="scan" :fixed="true"
|
:border="false" rightWidth="160rpx" leftWidth="160rpx"
|
>
|
<block slot="right">
|
<view class="city">
|
<view>
|
<text class="uni-nav-bar-text">{{user.username}}</text>
|
</view>
|
<uni-icons type="arrowdown" color="#333333" size="20" />
|
</view>
|
</block>
|
</uni-nav-bar>
|
|
<view class="card" v-for="item in items" >
|
<view class=card @click="goDetl(item)">
|
<view class="item100noborder" >
|
<view class="box-time" style="flex: 1;">{{item.weeklyDay$}}</view>
|
<view class="box-time">{{item.dailyTime$}}</view>
|
</view>
|
<view class="item100">
|
<view class="code-decs">工作内容</view>
|
{{item.workContent}}
|
</view>
|
<view class="item100">
|
<view class="code-decs">工作目的</view>
|
{{item.workPurpose}}
|
</view>
|
<view class="item100">
|
<view class="code-decs">甲方单位</view>
|
{{item.cstmrId$}}
|
</view>
|
</view>
|
|
<view class="buttomcss">
|
<button size="mini" class="mini-btn" type="default" @click="goDayStroke(item)">查看当前日行程</button>
|
<button size="mini" class="mini-btn" type="primary" @click="goDayStrokeCreate(item)">创建日行程</button>
|
</view>
|
|
|
</view>
|
|
</view>
|
</template>
|
|
<script>
|
export default {
|
data() {
|
return {
|
user: {
|
username: '',
|
id: 0,
|
type: ''
|
},
|
token: '',
|
items:[]
|
|
}
|
},
|
onShow() {
|
// this.baseUrl = uni.getStorageSync('baseUrl');
|
this.token = uni.getStorageSync('token');
|
|
},
|
onLoad(option) {
|
let _this = this
|
_this.items = []
|
const eventChannel = this.getOpenerEventChannel();
|
eventChannel.on('weekly', function(data) {
|
|
uni.request({
|
url: `${_this.baseUrl}/weeklyDailyPlan/list/auth`,
|
// method: 'POST',
|
header: { 'token': uni.getStorageSync('token') },
|
data: {
|
weekly_id: data.data.id
|
},
|
success(res) {
|
res = res.data.data
|
_this.items = res.records
|
console.log(res.records)
|
}
|
})
|
_this.items = data
|
console.log(data);
|
|
})
|
|
},
|
methods: {
|
goDayStrokeCreate(e){
|
uni.navigateTo({
|
url: '/pages/business/process/dayStrokeCreate',
|
success: function(res) {
|
res.eventChannel.emit('dayStrokeCreate', {
|
data: e
|
})
|
}
|
})
|
},
|
goDayStroke(e){
|
uni.navigateTo({
|
url: '/pages/business/process/dayStroke',
|
success: function(res) {
|
res.eventChannel.emit('dayStroke', {
|
data: e
|
})
|
}
|
})
|
},
|
goDetl(e) {
|
// console.log(e);
|
uni.navigateTo({
|
url: '/pages/business/process/dayDetl',
|
success: function(res) {
|
res.eventChannel.emit('day', {
|
data: e
|
})
|
}
|
})
|
},
|
getOrderNoList() {
|
let that = this
|
uni.request({
|
url: this.baseUrl + '/originRule/list/all',
|
method: 'POST',
|
success(res) {
|
res = res.data
|
that.menuList = res.data
|
}
|
})
|
},
|
chose(item) {
|
let that = this
|
uni.navigateTo({
|
url: "./goodsUp2",
|
success: function(res) {
|
// 通过eventChannel向被打开页面传送数据 向另外一个页面传递值的
|
res.eventChannel.emit('item', {
|
item: item
|
})
|
},
|
events: {
|
// 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据 另外一个页面传过来的
|
acceptDataFromOpenedPage: function(data) {
|
// that.matnr = data.data
|
that.input(that.matnr)
|
},
|
},
|
|
|
});
|
},
|
back() {
|
uni.navigateBack({})
|
},scan() {
|
uni.navigateTo({
|
url: '/pages/authority/authority'
|
})
|
},
|
}
|
}
|
</script>
|
|
<style>
|
.box-time {
|
color: #bdbdbd;
|
}
|
.card {
|
display: flex;
|
flex-wrap: wrap;
|
justify-content: space-between;
|
margin: 20rpx;
|
background-color: #ffffff;
|
border-radius: 20rpx;
|
color: #000000;
|
}
|
.card2 {
|
display: flex;
|
flex-wrap: wrap;
|
padding: 20rpx;
|
justify-content: space-between;
|
background-color: #ffffff;
|
border-radius: 20rpx;
|
color: #000000;
|
}
|
.uni-pb-5 {
|
padding-bottom: 10px;
|
}
|
.uni-px-5 {
|
padding-left: 10px;
|
padding-right: 10px;
|
}
|
.buttom {
|
width: 100%;
|
position: fixed;
|
bottom: 0;
|
left: 0;
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
height: 100rpx;
|
background-color: #FFF;
|
box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.2) ;
|
}
|
.item {
|
width: 40%;
|
display: flex;
|
align-items: center;
|
height: 70rpx;
|
padding: 0px 10upx 0px;
|
/* margin-left: 20rpx; */
|
border-bottom: 1px solid #b7b7b7;
|
}
|
.item100 {
|
width: 100%;
|
display: flex;
|
align-items: center;
|
height: 70rpx;
|
padding: 0px 10upx 0px;
|
/* margin-left: 20rpx; */
|
border-bottom: 1px solid #b7b7b7;
|
}
|
.item100noborder {
|
width: 100%;
|
display: flex;
|
align-items: center;
|
height: 70rpx;
|
padding: 0px 10upx 0px;
|
/* margin-top: 0rpx; */
|
/* border-bottom: 1px solid #000000; */
|
}
|
.code-decs {
|
width: 20vw;
|
font-size: 15px;
|
color: #8c8c8c;
|
}
|
.buttomcss {
|
display: flex;
|
width: 100%;
|
margin: 0 0 5px;
|
/* text-align: center; */
|
}
|
button{
|
font-size: 10rpx;
|
}
|
</style>
|