Commit bffc60d8 authored by Morson's avatar Morson

Merge branch 'dev' of https://git.banshouhui.com/lijundan/self-support into dev

parents 9afc06b1 6f9ee5b1
......@@ -108,7 +108,7 @@
return array
},
placeholderImage() {
return process.uniEnv.qn_base_url + 'logo.png'
return process.uniEnv.qn_base_url + 'morentupian.png'
},
customStyle() {
return {
......
<template>
<!-- 申请配件按钮 -->
<view class="apply-button" @click="handleClick">
<u-button :custom-style="customStyle" shape="circle" @click.stop="handleOperate" type="primary">
<u-icon class="apply-icon" name="plus"></u-icon>
<text class="apply-text" v-if="showText">申请配件</text>
</u-button>
</view>
</template>
<script>
export default {
props: {
type: { // 按钮宽'collapse': '80rpx', 'expand': '220rpx'
type: String,
default: 'expand'
}
},
computed: {
typeWidth() {
return {
'collapse': '80rpx',
'expand': '220rpx'
}
},
showText() {
return this.type == 'expand'
},
customStyle() {
return {
'height': '80rpx',
'width': this.typeWidth[this.type],
}
}
},
methods: {
handleClick() {
this.$emit('click')
},
}
}
</script>
<style lang="scss" scoped>
.apply-button {
.apply-icon {
font-size: 36rpx;
}
.apply-text {
font-size: 32rpx;
padding-left: 10rpx;
}
}
</style>
......@@ -46,7 +46,7 @@
return this.item.images ? process.uniEnv.systemUrl.apiUrl + this.item.images.split(',').shift() : this.placeholderImage
},
placeholderImage() {
return process.uniEnv.qn_base_url + 'logo.png'
return process.uniEnv.qn_base_url + 'morentupian.png'
},
},
methods: {
......
......@@ -254,6 +254,15 @@
"enablePullDownRefresh": false
}
},
{
"path": "setting/index",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "设置",
"enablePullDownRefresh": false,
"disableScroll": true
}
},
{
"path": "warehouse/index",
"style": {
......
......@@ -6,23 +6,31 @@
</u-navbar>
<view class="mine-content">
<view class="header-view">
<view class="header-left-view">
<view class="head-image">
<image :style="headImageStyle" :src="headImageUrl"></image>
</view>
<view class="header-content">
<view class="name-view" @click="handleClickName">{{name || "点击登录"}}</view>
<view :class="['tel-view', {'active': mobile}]" @click="handleClickTel">
<view :class="['tel-view', {'active': mobile}]" @click="$u.throttle(handleClickTel, 500)">
<text>{{telTip}}</text>
<u-icon class="tel-arrow-icon" name="arrow-up-fill"></u-icon>
</view>
</view>
<view v-if="showSuperButton" class="super-button"><u-button@click="handleSuperButton">切换用户</u-button></view>
<view v-if="showSuperButton" class="super-button"><u-button@click="$u.throttle(handleSuperButton, 500)">切换用户</u-button></view>
</view>
<view class="header-right-view" @click="$u.throttle(handleClickSetting, 500)">
<image :src="shezhiImage" class="right-image-view"></image>
<text>设置</text>
</view>
</view>
<view class="ware-house-view">
<view class="ware-house-title">我的仓库</view>
<view class="ware-house-title">仓配功能</view>
<view class="ware-house-content">
<view v-for="(item, index) in warehouseItems" :key="index" class="ware-house-content-item" @click="handleClick(item.pathName)">
<image :src="item.icon" class="ware-house-image"></image>
<view class="ware-house-image">
<image :src="item.icon" :style="item.imageStyle"></image>
</view>
<view>{{item.title}}</view>
</view>
</view>
......@@ -133,25 +141,29 @@
pathName: 'warehouse/index',
title: '我的配件',
value: '',
icon: process.uniEnv.qn_base_url + 'cangku.png',
icon: process.uniEnv.qn_base_url + 'wodepeijian.png',
imageStyle: 'width:60rpx;height:54rpx'
},
{
pathName: 'warehouse/spare',
title: '我的备件',
value: '',
icon: process.uniEnv.qn_base_url + 'cangku.png',
icon: process.uniEnv.qn_base_url + 'wodebeijian.png',
imageStyle: 'width:60rpx;height:54rpx'
},
{
pathName: 'warehouse/return',
title: '返件信息',
value: '',
icon: process.uniEnv.qn_base_url + 'cangku.png',
icon: process.uniEnv.qn_base_url + 'fanjianxinxi.png',
imageStyle: 'width:56rpx;height:54rpx'
},
{
pathName: 'warehouse/records',
title: '出入库记录',
value: '',
icon: process.uniEnv.qn_base_url + 'cangku.png',
icon: process.uniEnv.qn_base_url + 'churuku.png',
imageStyle: 'width:50rpx;height:54rpx'
},
]
},
......@@ -162,10 +174,13 @@
return this.avatar || this.placeholderImage
},
headImageStyle() {
return this.avatar ? 'width:136rpx; height:136rpx;border-radius:68rpx' : 'width:144rpx; height:144rpx;border-radius:72rpx'
return this.avatar ? 'width:112rpx; height:112rpx;border-radius:56rpx' : 'width:120rpx; height:120rpx;border-radius:60rpx'
},
headSize() {
return this.avatar ? 136 : 144
return this.avatar ? 112 : 120
},
shezhiImage() {
return process.uniEnv.qn_base_url + 'shezhi.png'
}
},
async onLoad() {
......@@ -179,7 +194,7 @@
this.getData()
}
}
this.wodebeijingImage = this.qnFile('wodebeijing.png')
this.wodebeijingImage = this.qnFile('wodebeijing-jb.png')
this.placeholderImage = this.qnFile('touxiang.png')
},
methods: {
......@@ -199,6 +214,9 @@
this.$u.route({url: "pages/login/index"})
}
},
handleClickSetting() {
this.$u.route({url: 'pages/mine/setting/index'})
},
handleClickName() {
if(this.vuex_token && this.settled) {
return false
......@@ -252,16 +270,20 @@
.mine-content {
position: relative;
padding: 30rpx;
padding: 26rpx 30rpx 30rpx 20rpx;
.header-view {
display: flex;
align-items: center;
align-items: flex-start;
justify-content: space-between;
margin-bottom: 60rpx;
.header-left-view {
display: flex;
align-items: center;
.head-image {
width: 144rpx;
height: 144rpx;
width: 120rpx;
height: 120rpx;
background-color: #FFFFFF;
border-radius: 72rpx;
border-radius: 60rpx;
display: flex;
align-items: center;
justify-content: center;
......@@ -273,10 +295,10 @@
margin-left: 24rpx;
.name-view {
font-size: 44rpx;
font-size: 40rpx;
font-weight: bold;
margin-bottom: 14rpx;
margin-top: 6rpx;
margin-bottom: 6rpx;
margin-top: -4rpx;
}
.tel-view {
......@@ -306,16 +328,31 @@
margin-left: 20rpx;
}
}
.header-right-view {
display: flex;
justify-content: flex-end;
align-items: center;
color: #FFFFFF;
margin-right: 4rpx;
font-size: 26rpx;
margin-top: -24rpx;
.right-image-view {
width: 34rpx;
height: 32rpx;
margin-right: 10rpx;
}
}
}
.ware-house-view {
background-color: #FFFFFF;
border-radius: 12rpx;
padding: 30rpx;
padding: 30rpx 30rpx 40rpx 30rpx;
height: 240rpx;
.ware-house-title {
color: #333333;
font-weight: bold;
font-size: 32rpx;
margin-bottom: 12rpx;
margin-bottom: 30rpx;
}
.ware-house-content {
display: flex;
......@@ -324,11 +361,17 @@
.ware-house-content-item {
color: #333333;
font-size: 26rpx;
text-align: center;
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
.ware-house-image {
width: 60rpx;
height: 60rpx;
margin-bottom: 12rpx;
margin-bottom: 14rpx;
display: flex;
justify-content: center;
align-items: center;
}
}
......
<template>
<!-- 设置 -->
<view class="setting-view">
<u-navbar back-icon-color="#333333" background="#FFFFFF" title="设置" titleColor="#333333"
:border-bottom="false" title-bold></u-navbar>
<view class="list-view">
<u-cell-group :border="false">
<view v-for="(item, index) in items" :key="index">
<u-cell-item :value="item.value" :border-bottom="false" @click="handleClick(item.pathName)">
<image slot="icon" :src="item.icon" :style="item.imageStyle"></image>
<view slot="title" class="item-title">{{item.title}}</view>
<view slot="value" class="item-value">{{value}}</view>
</u-cell-item>
</view>
</u-cell-group>
</view>
</view>
</template>
<script>
export default {
data() {
return {
};
},
computed: {
items() {
return [
{
pathName: 'about',
title: '当前版本',
value: process.uniEnv.version,
icon: process.uniEnv.qn_base_url + 'version.png',
imageStyle: 'width:32rpx;height:32rpx'
}
]
}
},
onLoad() {
getApp().trackPage('设置')
},
methods: {
handleClick(path) {
if(this.vuex_token) {
if (path === 'about') {
getApp().updateApp(1)
return
}
this.$u.route({
url: 'pages/mine/' + path + '/index'
})
} else {
this.$u.route({url: "pages/login/index"})
}
},
}
};
</script>
<style lang="scss" scoped>
.setting-view {
padding-bottom: 44px;
height: 100vh;
display: flex;
flex-direction: column;
background-color: #F4F5F7;
.list-view {
height: 100%;
margin-top: 30rpx;
.item-title {
font-size: 32rpx;
color: #333333;
margin-left: 16rpx;
line-height: 32rpx;
}
.item-value {
font-size: 26rpx;
color: #999999;
}
.line-view {
height: 2rpx;
background-color: #F4F5F7;
margin: 30rpx;
}
}
}
</style>
......@@ -3,22 +3,10 @@
<view class="ware-house">
<u-navbar back-icon-color="#333333" background="#FFFFFF" title="我的配件" titleColor="#333333"
:border-bottom="false" title-bold></u-navbar>
<!-- <view class="tools-box">
<view class="search-sub">
<u-subsection :current="curNow" :list="subList" active-color="white" bg-color="white"
inactive-color="#666" button-color="#2272FF" bparts-radius="36" @change="sectionChange" height="72"
bold>
</u-subsection>
</view>
<u-button class="right-btn" @click="handleClickRecords" :custom-style="buttonStyle" type="primary"
shape="circle">操作记录</u-button>
</view> -->
<view class="search-view">
<view class="search-btn" @click="handleClickSearch">
<image class="search-image" mode="widthFix" :src="sousuoImage"></image>
<text class="search-btn-placeholder">请输入关键字</text>
</view>
<text class="search-btn-text">搜索</text>
<u-search :clearabled="false" @focus="handleClickSearch" @custom="handleClickSearch" placeholder="请输入关键字" :action-style="actionStyle" placeholder-color="#999999"
color="#333333" bg-color="#FFFFFF" height="72" search-icon-color="#999999">
</u-search>
</view>
<view class="u-tabs-box">
<u-tabs height="66" activeColor="#2272FF" bg-color="none" inactive-color="#999" bar-height="4"
......@@ -27,13 +15,13 @@
</view>
<view class="tab-view">
<scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="reachBottom" scroll-anchoring
refresher-enabled="true" :refresher-triggered="triggered" :refresher-threshold="100"
refresher-enabled="true" :refresher-triggered="triggered" :refresher-threshold="100" @scroll="scroll"
:scroll-top="scrollTop" refresher-background="#F4F5F7" @refresherpulling="triggered = true"
@refresherrefresh="onRefresh" @refresherrestore="onRestore" enable-back-to-top>
<view class="loading-view" v-if="!loaded">
<u-loading mode="flower"></u-loading>
</view>
<NoOrder v-else-if="noParts" imageName="zwdd.png" text="当前暂无配件信息" :customStyle="noPartsCustomStyle" />
<NoOrder v-else-if="noParts" imageName="wupeijianxinxi.png" text="当前暂无配件信息" :customStyle="noPartsCustomStyle" />
<template v-else>
<view v-for="(item, index) in partsList" :key="item.id">
<AppliedCell @operate="handleOperate" :info="item" @action="handleClickCell"></AppliedCell>
......@@ -45,28 +33,21 @@
</template>
</scroll-view>
</view>
<!-- <view class="bottom-view" v-if="isReserve">
<view class="selected-all-view" @click="radioChange">
<u-icon class="selected-all-icon" name="checkbox-mark" :color="radioColor"></u-icon>
<text>全选</text>
<view class="fixed-button">
<ApplyButton :type="buttonType" @click="handleClickApply"/>
</view>
<view class="right-view">
<u-button class="scd-btn" @click="handleClickRecords" :custom-style="buttonStyle" type="primary"
shape="circle">{{buttonText}}</u-button>
</view>
</view> -->
</view>
</template>
<script>
import AppliedCell from "@/components/parts/appliedPartsCell.vue"
import NoOrder from "@/components/order/noOrder.vue"
import ApplyButton from "@/components/parts/applyButton.vue"
export default {
components: {
AppliedCell,
NoOrder
NoOrder,
ApplyButton
},
data() {
return {
......@@ -79,6 +60,7 @@
triggered: false,
_freshing: false,
selectedAll: false,
buttonType: 'expand' // 申请按钮宽 collapse': '80rpx', 'expand': '220rpx''
};
},
computed: {
......@@ -127,18 +109,13 @@
'width': '200rpx'
}
},
// radioColor() {
// return this.selectedAll ? '#2272FF' : 'transparent'
// },
// buttonTexts() {
// return [['签收', '', '取消申请', '', ''], ['退件', '']]
// },
// buttonText() {
// return this.buttonTexts[this.curNow][this.currentIndex]
// },
// isReserve() { // 选中备件仓
// return this.curNow == 1 && this.currentIndex == 0
// }
actionStyle() {
return {
'font-size': '32rpx',
'color': '#2272FF',
'margin-left': '20rpx'
}
},
},
onLoad(e) {
getApp().trackPage('我的配件页')
......@@ -146,10 +123,6 @@
this._freshing = false;
},
methods: {
// sectionChange(index) {
// this.curNow = index;
// this.reloadPartsList()
// },
// tab栏切换
change(index) {
this.currentIndex = index;
......@@ -186,51 +159,6 @@
this.loaded = true
});
},
// getReturnedParts(status) { // 返件列表
// this.pageNumber += 1
// this.loaded = false
// var param = {
// 'pageSize': 20,
// 'pageNumbr': 1,
// 'items': true,
// 'type': 'new'
// }
// this.$u.api.returnedParts(param).then((res) => {
// if (res.code == 200) {
// if (res.data.type != this.partsType) return
// this.triggered = false;
// this._freshing = false;
// if (this.pageNumber == 1) {
// this.partsList = []
// }
// if (res.data) {
// this.partsList.push(...res.data)
// this.loadStatus = res.data.length < this.pageSize ? 'nomore' : 'loadmore'
// }
// } else {
// console.log(res.message)
// }
// this.loaded = true
// });
// },
// getReserveList() { // 备件列表
// this.pageNumber += 1
// this.loaded = false
// this.$u.api.reserveList().then((res) => {
// if (res.code == 200) {
// if (res.data.type != this.partsType) return
// this.triggered = false
// this._freshing = false
// this.partsList = res.data || []
// this.loadStatus = 'nomore'
// } else {
// console.log(res.message);
// }
// this.loaded = true
// });
// },
handleOperate(info) {
// 调接口
// 修改info的status
......@@ -246,11 +174,11 @@
url: 'pages/mine/warehouse/partsDetail'
})
},
// handleClickRecords() {
// uni.navigateTo({
// url: 'pages/mine/warehouse/records'
// })
// },
handleClickApply() {
uni.navigateTo({
url: 'pages/parts/application'
})
},
handleClickSearch() {
uni.navigateTo({
url: 'pages/mine/warehouse/searchParts'
......@@ -277,10 +205,12 @@
this.loadStatus == 'loading'
this.getUnstockedList(this.currentTab.status)
},
scroll() {
this.buttonType = 'collapse'
},
}
};
</script>
<style lang="scss" scoped>
.ware-house {
padding: 0 30rpx;
......@@ -288,39 +218,16 @@
display: flex;
flex-direction: column;
.search-view {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20rpx;
.search-btn {
height: 72rpx;
background-color: #ffffff;
border-radius: 36rpx;
color: #999999;
display: flex;
align-items: center;
width: 100%;
margin-top: 10rpx;
/deep/ .u-search .u-content {
padding-left: 40rpx;
.search-image {
width: 36rpx;
height: 32rpx;
flex-shrink: 0;
margin-right: 24rpx;
}
.search-btn-placeholder {
line-height: 36rpx;
font-weight: 400;
font-size: 26rpx;
}
/deep/ .u-search .u-input {
margin: 0 20rpx;
}
.search-btn-text {
line-height: 36rpx;
font-weight: 400;
font-size: 32rpx;
color: #2272FF;
width: 110rpx;
text-align: right;
/deep/ .u-search .u-icon--right .u-iconfont {
font-size: 36rpx !important;
}
}
.u-tabs-box {
......@@ -343,36 +250,10 @@
}
}
// .tools-box {
// display: flex;
// flex-direction: row;
// justify-content: space-between;
// padding-bottom: 20rpx;
// .search-sub {
// height: 72rpx;
// width: 320rpx;
// }
// }
.bottom-view {
display: flex;
justify-content: space-around;
align-items: center;
.selected-all-view {
.selected-all-icon {
border: 2rpx solid #666666;
}
}
.right-view {
display: flex;
align-items: center;
.fst-btn {
}
.scd-btn {
}
}
.fixed-button {
position: fixed;
right: 20rpx;
bottom: 140rpx;
}
}
......
......@@ -6,11 +6,10 @@
<view class="search-view">
<u-search v-model="keyword" :action-text="searchButtonText" @search="handleClickSearch" @clear="handleClear"
@custom="handleClickButton" placeholder="请输入关键字" :action-style="actionStyle" placeholder-color="#999999"
color="#333333" bg-color="#FFFFFF" height="72">
color="#333333" bg-color="#FFFFFF" height="72" search-icon-color="#999999">
</u-search>
</view>
<NoOrder v-if="noParts" imageName="zwdd.png" text="当前暂无返件信息" :customStyle="noPartsCustomStyle" />
<NoOrder v-if="noParts" imageName="wupeijianxinxi.png" text="当前暂无返件信息" :customStyle="noPartsCustomStyle" />
<view v-else class="tab-view">
<scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="reachBottom" scroll-anchoring
refresher-enabled="true" :refresher-triggered="triggered" :refresher-threshold="100"
......@@ -163,6 +162,16 @@
flex-direction: column;
.search-view {
margin-bottom: 30rpx;
margin-top: 10rpx;
/deep/ .u-search .u-content {
padding-left: 40rpx;
}
/deep/ .u-search .u-input {
margin: 0 20rpx;
}
/deep/ .u-search .u-icon--right .u-iconfont {
font-size: 36rpx !important;
}
}
.tab-view {
......
......@@ -94,7 +94,7 @@
} else {
console.log(res.message)
}
self.loaded = true
this.loaded = true
});
},
handleOperate(type) {
......@@ -149,7 +149,6 @@
padding: 10rpx 30rpx 20rpx 30rpx;
.empty-result {
padding-top: 354rpx;
display: flex;
flex-direction: column;
justify-content: center;
......
......@@ -6,10 +6,10 @@
<view class="search-view">
<u-search v-model="keyword" :action-text="searchButtonText" @search="handleClickSearch" @clear="handleClear"
@custom="handleClickButton" placeholder="请输入关键字" :action-style="actionStyle" placeholder-color="#999999"
color="#333333" bg-color="#FFFFFF" height="72">
color="#333333" bg-color="#FFFFFF" height="72" search-icon-color="#999999">
</u-search>
</view>
<NoOrder v-if="noParts" imageName="zwdd.png" text="当前暂无备件信息" :customStyle="noPartsCustomStyle" />
<NoOrder v-if="noParts" imageName="wupeijianxinxi.png" text="当前暂无备件信息" :customStyle="noPartsCustomStyle" />
<template v-else>
<view class="title-view">
<view>备件列表</view>
......@@ -233,6 +233,16 @@
.search-view {
margin-bottom: 30rpx;
margin-top: 10rpx;
/deep/ .u-search .u-content {
padding-left: 40rpx;
}
/deep/ .u-search .u-input {
margin: 0 20rpx;
}
/deep/ .u-search .u-icon--right .u-iconfont {
font-size: 36rpx !important;
}
}
.title-view {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment