Enzo 5 years ago
parent
commit
98e0f10d22
  1. 34
      canteen/components/wyb-table/wyb-table.vue
  2. 2
      canteen/pages/classification/warehouse.vue
  3. 4
      canteen/pages/delivery/order.vue
  4. 4
      canteen/pages/index/index.vue
  5. 4
      canteen/pages/purchase/detail.vue
  6. BIN
      canteen/static/images/default_avatar.png
  7. 33
      supplier/components/wyb-table/wyb-table.vue
  8. 4
      supplier/pages/gonghuo/detail.vue
  9. 5
      supplier/pages/index/index.vue
  10. 2
      supplier/pages/offer/index.vue
  11. BIN
      supplier/static/images/default_avatar.png

34
canteen/components/wyb-table/wyb-table.vue

@ -1,5 +1,5 @@
<template>
<view class="wyb-table-box">
<view class="wyb-table-box" :class="randomClass">
<view v-if="loading" class="wyb-table-loading-box" :style="{
'max-width': width === 'auto' ? screenWidth : width,
'max-height': height === 'auto' ? '300rpx' : height,
@ -206,7 +206,6 @@
<script>
import Pinyin from './js/characterToPinyin.js'
import {isEqual} from './js/objEqual.js'
let timer = null;
export default {
data() {
return {
@ -226,6 +225,8 @@
checkType: this.enableCheck,
data: []
},
timer: null,
randomClass: "x"+ Math.random().toString(32).substr(2),
chars: '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
}
},
@ -766,24 +767,41 @@
}
this.autoScrollView();
},
destroyed(){
if(this.timer){
clearInterval(this.timer);
this.timer = null;
}
},
methods: {
// input
autoScrollView(){
try{
// #ifdef H5
if(this.$props.scrollToInput){
let that = this;
if(that.$props.scrollToInput){
setTimeout(function(){
// dom .wyb-table-scroll-view .wyb-table-content .wyb-table-content-line .wyb-table-content-item input
let tabView = document.querySelector('.wyb-table-scroll-view'); // table
let tabView = document.querySelector('.'+ that.randomClass +' .wyb-table-scroll-view'); // table
let tabContent = tabView.querySelector('.wyb-table-content'); // tablecontent
let contentLine = tabContent.querySelector('.wyb-table-content-line'); //
let contentItem = contentLine.querySelector('.wyb-table-content-item input'); //
let offsetWidth = contentItem.offsetParent.offsetWidth;
let offsetLeft = contentItem.offsetParent.offsetLeft - offsetWidth - 20;
timer = setInterval(function(){
let offsetLeft = contentItem.offsetParent.offsetLeft;
let scrollLeft = offsetLeft - offsetWidth - 20;
if(that.timer){
clearInterval(that.timer);
that.timer = null;
}
if(scrollLeft <= 0){
return; // input
}
that.timer = setInterval(function(){
let currentScrollLeft = tabView.scrollLeft;
tabView.scrollLeft += 2;
if(tabView.scrollLeft >= offsetLeft){
clearInterval(timer);
if((tabView.scrollLeft >= scrollLeft) || currentScrollLeft == tabView.scrollLeft){
clearInterval(that.timer); // scrollLeft
that.timer = null;
}
}, 2);
}, 1000)

2
canteen/pages/classification/warehouse.vue

@ -11,7 +11,7 @@
</scroll-view>
<scroll-view :scroll-y="true" class="scroll-right"
:style="{height: 'calc('+ windowHeight +'px - 222rpx)', width:is_search_ing?'100%':'550rpx'}">
<view class="supplier-item" v-for="(item, index) in tab_list[current].list" :key="index">
<view class="supplier-item" v-for="(item, index) in tab_list[current].list" :key="index" v-if="item.stock">
<label class="lf-row-between" @click="switchChecked(item)">
<view style="min-height: 40rpx; max-height: max-content; width: 440rpx;">
<view class="lf-font-28 lf-color-black">{{ item.material_name }}·{{ item.spec_name }}</view>

4
canteen/pages/delivery/order.vue

@ -60,6 +60,10 @@
name: '申请中',
list: [],
..._public
},{
name: '分拣中',
list: [],
..._public
},{
name: '已出库',
list: [],

4
canteen/pages/index/index.vue

@ -1,10 +1,10 @@
<template>
<view>
<view class="lf-row-center lf-flex-column head" v-if="$isRight(canteen)">
<image :src="canteen.avatar"></image>
<image :src="canteen.avatar" v-if="canteen.avatar"></image>
<image src="../../static/images/default_avatar.png" v-else></image>
<view class="lf-m-t-20 lf-font-32 lf-font-bold lf-color-black">{{ canteen.name }}</view>
<view class="lf-font-28 lf-color-555 lf-m-t-10">{{ canteen.role }}</view>
</view>
<view class="list">
<view class="lf-row-between list-item" hover-class="lf-opacity" v-for="(item, index) in block_list"

4
canteen/pages/purchase/detail.vue

@ -42,13 +42,13 @@
<view class="lf-font-bold">{{order.deadline_text}}</view>
</view>
<view class="list" v-if="supplier_voucher.length">
<view>证明材料-供应端</view>
<view>供应商证明材料</view>
<view class="lf-flex-wrap lf-m-t-10">
<image :src="item" @click="lookImage(index, 'supplier_voucher')" class="ms-img" v-for="(item, index) in supplier_voucher" :key="index"></image>
</view>
</view>
<view class="list" v-if="canteen_voucher.length">
<view>证明材料-食堂端</view>
<view>食堂证明材料</view>
<view class="lf-flex-wrap lf-m-t-10">
<image :src="item" @click="lookImage(index, 'canteen_voucher')" class="ms-img" v-for="(item, index) in canteen_voucher" :key="index"></image>
</view>

BIN
canteen/static/images/default_avatar.png

After

Width: 400  |  Height: 400  |  Size: 21 KiB

33
supplier/components/wyb-table/wyb-table.vue

@ -1,5 +1,5 @@
<template>
<view class="wyb-table-box">
<view class="wyb-table-box" :class="randomClass">
<!-- loading加载框 -->
<view v-if="loading" class="wyb-table-loading-box" :style="{
'max-width': width === 'auto' ? screenWidth : width,
@ -230,6 +230,8 @@
checkType: this.enableCheck,
data: []
},
timer: null,
randomClass: "x"+ Math.random().toString(32).substr(2),
chars: '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
}
},
@ -814,24 +816,41 @@
}
this.autoScrollView();
},
destroyed(){
if(this.timer){
clearInterval(this.timer);
this.timer = null;
}
},
methods: {
// input
autoScrollView(){
try{
// #ifdef H5
if(this.$props.scrollToInput){
let that = this;
if(that.$props.scrollToInput){
setTimeout(function(){
// dom .wyb-table-scroll-view .wyb-table-content .wyb-table-content-line .wyb-table-content-item input
let tabView = document.querySelector('.wyb-table-scroll-view'); // table
let tabView = document.querySelector('.'+ that.randomClass +' .wyb-table-scroll-view'); // table
let tabContent = tabView.querySelector('.wyb-table-content'); // tablecontent
let contentLine = tabContent.querySelector('.wyb-table-content-line'); //
let contentItem = contentLine.querySelector('.wyb-table-content-item input'); //
let offsetWidth = contentItem.offsetParent.offsetWidth;
let offsetLeft = contentItem.offsetParent.offsetLeft - offsetWidth - 20;
timer = setInterval(function(){
let offsetLeft = contentItem.offsetParent.offsetLeft;
let scrollLeft = offsetLeft - offsetWidth - 20;
if(that.timer){
clearInterval(that.timer);
that.timer = null;
}
if(scrollLeft <= 0){
return; // input
}
that.timer = setInterval(function(){
let currentScrollLeft = tabView.scrollLeft;
tabView.scrollLeft += 2;
if(tabView.scrollLeft >= offsetLeft){
clearInterval(timer);
if((tabView.scrollLeft >= scrollLeft) || currentScrollLeft == tabView.scrollLeft){
clearInterval(that.timer); // scrollLeft
that.timer = null;
}
}, 2);
}, 1000)

4
supplier/pages/gonghuo/detail.vue

@ -55,13 +55,13 @@
</view>
</block>
<view class="list" v-if="supplier_voucher.length">
<view>证明材料-供应端</view>
<view>供应商证明材料</view>
<view class="lf-flex-wrap lf-m-t-10">
<image :src="item" class="ms-img" @click="lookImage(index, 'supplier_voucher')" v-for="(item, index) in supplier_voucher" :key="index"></image>
</view>
</view>
<view class="list" v-if="canteen_voucher.length">
<view>证明材料-食堂端</view>
<view>食堂证明材料</view>
<view class="lf-flex-wrap lf-m-t-10">
<image :src="item" class="ms-img" @click="lookImage(index, 'canteen_voucher')" v-for="(item, index) in canteen_voucher" :key="index"></image>
</view>

5
supplier/pages/index/index.vue

@ -1,7 +1,8 @@
<template>
<view>
<view class="lf-row-center lf-flex-column head">
<image :src="supplier.avatar"></image>
<view class="lf-row-center lf-flex-column head" v-if="$isRight(supplier)">
<image :src="supplier.avatar" v-if="supplier.avatar"></image>
<image src="../../static/images/default_avatar.png" v-else></image>
<view class="lf-m-t-20 lf-font-32 lf-font-bold lf-color-black">{{ supplier.name }}</view>
<view class="lf-font-28 lf-color-555 lf-m-t-10">{{ supplier.role }}</view>
</view>

2
supplier/pages/offer/index.vue

@ -474,7 +474,7 @@
color: #777;
}
.search-self {
background: rgb(228,228,228);
background: #f2f2f2;
padding: 10rpx 0 10rpx 20rpx;
border-radius: 40rpx;
font-size: 28rpx;

BIN
supplier/static/images/default_avatar.png

After

Width: 400  |  Height: 400  |  Size: 21 KiB

Loading…
Cancel
Save