Browse Source

[完成] 发起报价UI修改

master
邓平艺 5 years ago
parent
commit
93b9cf24fa
  1. 2
      components/wyb-table/wyb-table.vue
  2. 2
      manifest.json
  3. 3
      pages.json
  4. 113
      pages/supply/offer/index.vue

2
components/wyb-table/wyb-table.vue

@ -396,7 +396,7 @@
}
}
}
console.log("=====", content[header.key]);
// console.log("=====", content[header.key]);
// return result
if(this.isObject(content[header.key], 'edit')){

2
manifest.json

@ -74,7 +74,7 @@
"h5" : {
"router" : {
"mode" : "history",
"base" : "./"
"base" : ""
}
}
}

3
pages.json

@ -22,7 +22,8 @@
{
"path": "pages/supply/offer/index",
"style": {
"navigationBarTitleText": "发起报价"
"navigationBarTitleText": "发起报价",
"disableScroll": true
}
},
{

113
pages/supply/offer/index.vue

@ -1,13 +1,32 @@
<template>
<view>
<view class="lf-p-32 lf-p-t-30 lf-p-b-30 lf-w-100 lf-h-maxcontent lf-border-box">
<view class="lf-font-28 lf-font-bold lf-color-black">报价清单</view>
<view class="box">
<view class="title">报价清单</view>
<view class="lf-font-24 lf-color-gray lf-m-t-5">请在以下物资信息表内填写报价</view>
</view>
<!-- 修饰条 -->
<self-line></self-line>
<view class="box lf-row-between relation">
<view>
<text class="title">关联食堂</text>
<text class="lf-font-24 lf-color-555 lf-m-l-10">(多选)</text>
</view>
<view class="lf-font-24 lf-color-gray lf-text-right lf-row-center" style="width: 370rpx; justify-content: flex-end;" @click="switchRelation">
<view class="lf-line-1">{{ selectName }}</view>
<u-icon name="arrow-right" class="lf-text-vertical"></u-icon>
</view>
<view class="mask" :style="{top: node_top +'px'}" v-if="is_show" @click="is_show = false">
<view class="list">
<view class="lf-row-between item" v-for="(item, index) in relation_list" :key="index" @click.stop="selectItem(index)">
<view>{{ item.name }}</view>
<u-icon name="checkmark-circle" color="#1833F2" size="40" v-if="item.checked"></u-icon>
</view>
</view>
</view>
</view>
<self-line></self-line>
<!-- 物料table -->
<view class="lf-p-32 lf-p-t-30 lf-p-b-30 lf-w-100 lf-h-maxcontent lf-border-box">
<view class="box">
<wyb-table :first-line-fixed="true" contentBgColor="#eef6fe" :headers="headers" :contents="contents" @onInputChange="onInputChange" width="100%" height="800rpx"></wyb-table>
</view>
<!-- 操作按钮 -->
@ -20,6 +39,7 @@
<script>
import wybTable from '@/components/wyb-table/wyb-table';
let app = getApp();
export default {
components: {
@ -100,25 +120,81 @@
spec: '5kg',
preTax: {edit: true, value: ''},
afterTax: {edit: true, value: ''}
}]
}],
is_show: false,
relation_list: [{
name: '美妙食堂',
checked: false
},{
name: '合适烧烤',
checked: false
}],
node_top: 0
}
},
computed: {
selectName(){
let arr = [];
this.relation_list.map(item => {
if(item.checked){
arr.push(item.name);
}
});
let str = '请选择...';
if(arr.length > 0){
str = arr.join(',');
}
return str;
}
},
onLoad(){
},
onReady(){
let that = this;
let info = uni.createSelectorQuery().select(".relation");
      info.boundingClientRect(function(data) {
let num = app.globalData.customBarH;
num += data.height;
num += data.top;
that.node_top = num;
   }).exec()
},
methods: {
onInputChange(event){
console.log("检测到table input被更改", event);
this.contents[event.contentIndex][event.key].value = event.detailValue;
},
switchRelation(){
this.is_show = !this.is_show;
},
selectItem(index){
this.relation_list[index].checked = !this.relation_list[index].checked;
}
}
}
</script>
<style>
page{
overflow: hidden;
}
</style>
<style lang="scss" scoped="scoped">
.lf-m-t-5{
margin-top: 5rpx;
}
.box{
padding: 30rpx 32rpx;
width: 100%;
height: max-content;
box-sizing: border-box;
}
.title{
color: #222222;
font-size: 28rpx;
font-weight: bold;
}
.fixed-bottom{
position: fixed;
bottom: 0rpx;
@ -131,7 +207,7 @@
align-items: center;
border-top: 1rpx solid #E5E5E5;
.btn{
width: 260rpx;
width: 320rpx;
height: 82rpx;
border-radius: 41rpx;
margin: 0;
@ -151,4 +227,31 @@
margin-left: 50rpx;
}
}
.relation{
position: relative;
border-bottom: 1rpx solid #E5E5E5;
}
.mask{
position: fixed;
background-color: rgba(0,0,0,0.4);
width: 100%;
// top: 149px;
bottom: 0;
left: 0;
z-index: 100;
.list{
min-height: max-content;
max-height: 500rpx;
overflow: scroll;
background-color: #FFFFFF;
width: 100%;
.item{
height: 92rpx;
padding: 0 32rpx;
border-bottom: 1rpx solid #E5E5E5;
color: #222222;
font-size: 24rpx;
}
}
}
</style>
Loading…
Cancel
Save