| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191 |
- <template>
- <view class="mainBox">
- <uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="单据来源" @clickLeft="back">
- <!--右菜单-->
- <template slot="float">
- <view class="nav-icon-caozuo rightNav" @click="getsure"><u-button type="success" size="small" class="u-reset-button" text="确定"></u-button></view>
- </template>
- </uni-nav-bar>
-
- <view class="listBox">
-
- <view class="itemBox" v-for="(item, index) in listData" :key="index" @click="cleanchecked(index)">
- <view class="chooseBox"> <uni-icons :type="choose===index?'checkbox-filled':'circle'" size="28" :color="choose===index?'#19be6b':'#eee'"></uni-icons></view>
- <view class="infoBox">
- <view class="tit u-line-1">配置采购 {{item.title}}</view>
- <text class="tip">{{item.name}} {{item.department}}</text>
- </view>
- <view class="stateBox">
- <view class="tit">{{item.state==1?'已创建':'未创建'}}</view>
- <text class="tip">{{item.time}}</text>
- </view>
- </view>
-
- </view>
-
- </view>
- </template>
- <script>
- import { post } from "@/utils/api.js";
-
- export default {
- name:"DocumentSource",
- data() {
- return {
- listData:[
- {
- title:'YQ56336325222001',
- name:'张三',
- department:'省事务管理局',
- state:1,
- time:'2021-11-06 18:00'
- },
- {
- title:'YQ56336325222001',
- name:'张三',
- department:'省事务管理局',
- state:1,
- time:'2021-11-06 18:00'
- },
- {
- title:'YQ56336325222001',
- name:'张三',
- department:'省事务管理局',
- state:1,
- time:'2021-11-06 18:00'
- },
- {
- title:'YQ56336325222001',
- name:'张三',
- department:'省事务管理局',
- state:1,
- time:'2021-11-06 18:00'
- },
- {
- title:'YQ56336325222001',
- name:'张三',
- department:'省事务管理局',
- state:1,
- time:'2021-11-06 18:00'
- },
- {
- title:'YQ56336325222001',
- name:'张三',
- department:'省事务管理局',
- state:1,
- time:'2021-11-06 18:00'
- },
- {
- title:'YQ56336325222001',
- name:'张三',
- department:'省事务管理局',
- state:1,
- time:'2021-11-06 18:00'
- },
- {
- title:'YQ56336325222001',
- name:'张三',
- department:'省事务管理局',
- state:1,
- time:'2021-11-06 18:00'
- },
- {
- title:'YQ56336325222001',
- name:'张三',
- department:'省事务管理局',
- state:1,
- time:'2021-11-06 18:00'
- },
- {
- title:'YQ56336325222001',
- name:'张三',
- department:'省事务管理局',
- state:1,
- time:'2021-11-06 18:00'
- },
- {
- title:'YQ56336325222001',
- name:'张三',
- department:'省事务管理局',
- state:1,
- time:'2021-11-06 18:00'
- },
- {
- title:'YQ56336325222001',
- name:'张三',
- department:'省事务管理局',
- state:1,
- time:'2021-11-06 18:00'
- }
- ], //列表数据
- screenHeight:'', //设备高度
- choose:'', //选择id
- chooseItem:{} //传参信息
- };
- },
- onLoad(){
- // 获取屏幕高度
- uni.getSystemInfo({
- success(res) {
- this.screenHeight = (res.screenHeight * (750 / res.windowWidth));
- }
- });
- },
- //加载更多
- onReachBottom(){
- console.log("加载更多");
- },
- methods: {
- //确定
- getsure() {
- console.log("点击确定");
- uni.$emit('updateData', this.chooseItem);
- uni.navigateBack({
- delta: 1
- })
-
- },
- cleanchecked(e){
- this.choose = e;
- this.chooseItem = this.listData[e];
- },
-
- }
-
-
-
- }
-
- </script>
- <style lang="scss" scoped>
- .itemBox{
- padding:30rpx 20rpx;
- display: flex;
- font-size: $uni-font-size-base;
- border-bottom: 1px #f2f2f2 solid;
- .chooseBox{
- margin-right: 20rpx;
- }
- .infoBox{
- .tit{max-width:100%;overflow: hidden;}
- .tip{
- color: #999;
- font-size: $uni-font-size-sm;
- }
- }
- .stateBox{
- margin-left: auto;
- text-align: right;
- .tit{
-
- }
- .tip{
- color: #999;
- font-size: $uni-font-size-sm;
- }
- }
- }
- </style>
|