Commit 5d728f5d authored by Damon's avatar Damon

Merge branch 'dev-1.5.4' into test

parents de9afadb fca1826a
......@@ -28,13 +28,8 @@
</view>
</view>
<slot></slot>
<!-- <view class="img-list">
<u-image class="pic" width="160rpx" height="160rpx" :border-radius="10" @click="selectUpload" :src="uploadImage"></u-image>
</view> -->
</view>
<!-- <u-action-sheet :list="list" v-model="maskShow" :cancel-btn="true" @click="uploadSelect"></u-action-sheet> -->
</view>
<!-- <take-photo v-if="takeStatus" @close="closeTake" :upload="false" :currentItem="currentItemDate"></take-photo> -->
</view>
</template>
......@@ -98,7 +93,6 @@ export default {
.map((img) => {
return { src: img ? img : '' }
})
this.setValue()
}
},
methods: {
......@@ -120,102 +114,7 @@ export default {
delFile(index) {
this.imgList.splice(index, 1)
this.setValue()
},
/*
selectUpload(){
if (this.imgList.length === 10) {
return this.$refs.uToast.show({
title: '图片已超出最大数量',
type: 'error',
})
}
// 弹窗展示
this.maskShow = true
},
uploadSelect(index) {
if (index === 0) {
this.uploadFile('photo')
} else {
this.uploadFile()
}
},
async uploadFile(type){
const self = this
if(type&&type==='photo'){
// 直接打开相册
let options = {
sourceType:['album'],//['album', 'camera']
count: 3,
sizeType: ['compressed']
}
const value = await this.chooseImg(options)
self.setTmpValue(value)
//await this.chooseImage('qiniu',config)
//self.setValue()
return
}
// 使用拍照工具拍摄
this.photograph()
this.getWatermark()
},
closeTake(val) {
if(val && val.length > 0){
// val.forEach(item=>{
// this.imgList.push(item)
// })
// const files = val.map(v => {
// return { path: v.path }
// })
const files = val.map(v => v.path)
this.uploadTakeImg(files)
// this.setValue()
}
this.takeStatus = false
},
async uploadTakeImg(files) {
const value = await this.saveToTask(files)
this.setTmpValue(value)
// const options = {
// files:files, // 必填 临时文件路径 格式: [{path: "图片地址"}]
// load: false, //(默认 true 说明:本接口是否提示加载动画)
// maxSize: 300000, //(默认 无 说明:上传的文件最大字节数限制,默认不限制)
// onEachUpdate: res => {
// const value = [uploader.qiniuTokenObj.visitPrefix + res.url]
// this.valueChange(value)
// },
// Update: res => {
// }
// }
// uploader.qnFileUpload(options)
},
photograph(){// 获取拍照规范接口
let self = this
let param = {"partnerCompanyId":self.partnerCompanyId,
"categoryId":self.categoryId,
"brandId":self.brandId,
"fieldName":self.item.fieldsName}
this.$u.api.orderStandardItem(param).then((res)=>{
if (res.code == 200 && res.data.length>0) {
self.currentItemDate = res.data[0]
}else{
console.log("获取完工项的拍照标准异常",res.data.message)
}
self.takeStatus = true
})
},
getWatermark(){
if(getApp().globalData.photo.waterSetting){
return
}
var data={partnerCompanyId:this.partnerCompanyId}
this.$u.api.getWatermark(data).then((res) => {
if (res.code == 200) {
getApp().globalData.photo.waterSetting = res.data
} else {
console.log("获取水印备注异常",res.data.message)
}
});
}*/
}
},
}
</script>
......@@ -263,17 +162,4 @@ export default {
transform: rotate(90deg);
}
}
// .list {
// display: flex;
// .txt {
// color: #666;
// padding: 10rpx;
// &.active {
// background-color: red;
// color: #fff;
// }
// }
// }
</style>
......@@ -100,7 +100,7 @@ export default {
},
mounted() {
this.isNotMulti = this.orderServiceType === '安装'
this.initComponent()
this.initMeasure()
},
methods: {
openPicker() {
......@@ -140,15 +140,11 @@ export default {
let result = []
for (let key in res.data) {
this.measure = res.data[key].measureExtendDtos
res.data[key].measureExtendDtos.map((item, index) => {
res.data[key].measureExtendDtos.forEach(item => {
result.push({ id: item.measureId, label: item.measureName })
})
}
if (this.orderServiceType === '安装') {
this.settings = result
} else {
this.settings[2] = result
}
this.settings = result
} else {
console.log(res.message, '查询措施失败')
}
......
<template>
<u-mask :show="visible" @click="handleClick" :zoom="false">
<view class="tip-view" :style="'margin-top:' + statusBarHeight + 'px'">
<image
class="tip-image"
:src="imageUrl"
:style="imageStyle"
mode="widthFix"
></image>
</view>
</u-mask>
</template>
<script>
/**
* @description 创建一个遮罩层,提示图片
* @property {Boolean} show 是否显示遮罩(默认false)
* @property {Object} imageName 图片地址名
* @property {Object} imageStyle 自定义样式对象
* @example <mask-tip :show="show"></mask-tip>
*/
export default {
props: {
show: {
type: Boolean,
default: false,
},
imageName: {
type: String,
default: ''
},
imageStyle: {
type: String,
default: ''
},
name: {
type: String,
default: ''
},
timeout: {
type: Boolean,
default: true
}
},
data() {
return {
statusBarHeight: 20,
visible: false
}
},
watch: {
show(val) {
if (!val) return
let value = this.vuex_not_first
if (!value[this.name]) {
uni.getSystemInfo({
success: (res) => {
this.statusBarHeight = res.statusBarHeight
setTimeout(() => {
this.visible = true
}, this.time)
},
})
value[this.name] = true
this.$u.vuex('vuex_not_first', value)
}
}
},
computed: {
imageUrl() {
return process.uniEnv.qn_base_url + this.imageName
},
time() {
return this.timeout ? 1500 : 0
}
},
methods: {
handleClick() {
this.visible = false
this.$emit('click')
},
},
}
</script>
<style lang="scss" scoped>
.tip-view {
}
</style>
......@@ -258,7 +258,7 @@
overflow-x: auto;
display: flex;
width: 100%;
border-right: 2rpx solid #F4F5F7;
// border-right: 2rpx solid #F4F5F7;
.image-view {
width: 120rpx;
height: 120rpx;
......
......@@ -26,8 +26,8 @@
<view class="bottom-view">
<view class="total-view">
<text>合计:</text>
<text class="amount-view">x{{total}}</text>
<text></text>
<text class="amount-view">x{{info.items.length}}</text>
<text>种</text>
</view>
</view>
</view>
......@@ -63,13 +63,13 @@
}
return this.info.finished ? '退件完成' : text
},
total() { // 合计
var i = 0
for (var item of this.info.items) {
i += item.quantity
}
return i
},
// total() { // 合计
// var i = 0
// for (var item of this.info.items) {
// i += item.quantity
// }
// return i
// },
},
methods: {
handleLongpress() { // 长按复制单号
......
......@@ -4,17 +4,20 @@
<u-checkbox v-if="showChecked" icon-size="28" size="40" v-model="check" @change="handleChange"
shape="circle" />
<image class="image-view" :src="imageUrl"></image>
<view class="info-view">
<view class="name-text">{{item.name}}</view>
<view>{{remarkText}}</view>
</view>
</view>
<view class="count-view">
<view v-if="showChecked">
<u-number-box v-model="value" :min="item.min || 0" :max="item.max || item[type]" @minus="numChange"
@plus="numChange" @blur="numChange"></u-number-box>
</view>
<text v-else>x{{item[type]|| 0}}</text>
<view class="info-view">
<view class="name-text">{{item.name}}</view>
<view class="info-bottom">
<view>{{remarkText}}</view>
<view class="count-view">
<view v-if="showChecked">
<u-number-box v-model="value" :min="item.min || 0" :max="item.max || item[type]" @minus="numChange"
@plus="numChange" @blur="numChange"></u-number-box>
</view>
<text v-else>x{{item[type]|| 0}}</text>
<text class="unit-text" v-if="item.unit">{{item.unit}}</text>
</view>
</view>
</view>
</view>
</template>
......@@ -66,23 +69,23 @@
},
},
watch: {
'item.quantity'(val) {
'item.quantity'(val) {
this.check = val > 0
this.value = val
this.value = val
},
'item.selected'(val) {
this.check = val
this.value = val ? this.item.stock : 0
this.value = val ? this.item.stock : 0
},
},
methods: {
handleChange(event) {
this.value = event.value ? this.item.stock : 0
this.$emit('change', event.value)
this.$emit('change', event.value)
this.$emit('numChange', this.value)
},
numChange(event) {
this.check = event.value > 0
numChange(event) {
this.check = event.value > 0
this.$emit('change', this.check)
this.$emit('numChange', event.value)
},
......@@ -93,8 +96,7 @@
<style lang="scss" scoped>
.spare-item {
display: flex;
justify-content: space-between;
align-items: flex-end;
align-items: center;
.left-view {
display: flex;
......@@ -106,24 +108,33 @@
margin-right: 20rpx;
flex-shrink: 0;
}
}
.info-view {
font-size: 24rpx;
.info-view {
font-size: 24rpx;
color: #333333;
width: 100%;
.name-text {
font-size: 32rpx;
font-weight: bold;
color: #333333;
.name-text {
font-size: 32rpx;
font-weight: bold;
margin-bottom: 30rpx;
}
.info-bottom {
display: flex;
justify-content: space-between;
align-items: center;
.count-view {
font-size: 28rpx;
color: #333333;
margin-bottom: 30rpx;
display: flex;
justify-content: flex-end;
align-items: center;
.unit-text {
padding-left: 10rpx;
}
}
}
}
.count-view {
font-size: 28rpx;
color: #333333;
}
}
</style>
</style>
......@@ -7,6 +7,7 @@
<view class="num">
<u-number-box v-if="!disabled" v-model="info.quantity" :min="info.min || 0" :max="info.max || 9999" @change="numChange" @minus="minusValue" @blur="minusValue"></u-number-box>
<text class="nums" v-else>x{{ info.quantity || 1 }}</text>
<text v-if="info.unit" class="unit-text">{{info.unit || ''}}</text>
</view>
</view>
</view>
......@@ -54,9 +55,15 @@
.num {
width: 200rpx;
text-align: center;
display: flex;
justify-content: flex-end;
align-items: center;
.nums {
//color: #F59A23;
}
.unit-text {
padding-left: 10rpx;
}
}
}
}
......
......@@ -12,10 +12,11 @@
<view class="right-content-desc u-line-2">{{ info.remark }}</view>
<view class="u-flex right-content-opera">
<view class="no" v-if="maxShow">
可用{{ info.max }}件
可用{{ info.max + (info.unit || '')}}
</view>
<view class="num">
<u-number-box v-show="!info.disabled" v-model="info.quantity" :min="info.min || 0" :max="info.max || info.quantity" @change="numChange"></u-number-box>
<text v-show="!maxShow && !info.disabled && info.unit" class="unit-text">{{info.unit}}</text>
<u-button v-show="info.disabled" type="primary" size="mini" shape="circle" @click="addApply">加入申请</u-button>
</view>
</view>
......@@ -121,6 +122,12 @@
.num {
flex: 1;
text-align: right;
display: flex;
justify-content: flex-end;
align-items: center;
.unit-text {
padding-left: 10rpx;
}
}
}
}
......
......@@ -6,8 +6,7 @@
<view class="left-list">全选</view>
</view>
<view class="u-flex bottom-center">
<view class="center-list">已选择 {{ partNum }} 种</view>
<view class="center-list">共:<text class="num"> {{ num }} </text> 件</view>
<view class="center-list">共:<text class="num"> {{ partNum }} </text> 种</view>
</view>
</view>
<view class="u-flex select-num" v-if="!showChecked">
......@@ -15,7 +14,7 @@
<u-badge type="error" :show-zero="true" :count="partNum" :offset="[0, 0]"></u-badge>
<u-image width="72rpx" height="72rpx" :lazy-load="false" :src="partsImage"></u-image>
</view>
<view class="num-right">共:<text class="num"> {{ num }} </text> 件</view>
<view class="num-right">共:<text class="num"> {{ partNum }} </text> 种</view>
</view>
<view class="u-flex bottom-right">
<button :class="['btn', btnActive]" @click="submit">{{ submitTxt }}</button>
......@@ -143,14 +142,14 @@
align-items: flex-start;
margin-right: 20rpx;
.center-list {
// &:nth-of-type(1) {
// color: #666;
// font-size: 26rpx;
// }
&:nth-of-type(1) {
color: #666;
font-size: 26rpx;
}
&:nth-of-type(2) {
color: #333;
font-size: 32rpx;
margin-top: 8rpx;
// margin-top: 8rpx;
font-weight: bold;
.num {
color: #2272FF;
......
......@@ -72,10 +72,14 @@ export default {
const data = JSON.parse(JSON.stringify(this.uploadTask))
const saveLists = data.concat(lists)
this.$u.vuex('uploadTask', saveLists)
const newTotal = this.uploadTotal + lists.length
this.$u.vuex('uploadTotal', newTotal)
setTimeout(() => {
this.$u.vuex('uploadTask', saveLists)
this.$u.vuex('uploadTotal', newTotal)
}, 1000)
//this.$u.vuex('uploadSuccess', 0)
return lists
},
......
......@@ -110,12 +110,19 @@
<!-- <EusingList /> -->
</view>
<upload-progress />
<MaskTip
:show="showMask"
imageName="mengceng2.png"
:imageStyle="imageStyle"
name="upload_tip"
/>
</TabBarPage>
</template>
<script>
import TabBarPage from '@/components/tabBarList/index.vue'
import NoOrder from '@/components/order/noOrder.vue'
import MaskTip from '@/components/mask-tip/index.vue'
const app = getApp()
import OrderCell from '@/components/order/index.vue'
// import EusingList from '@/components/order/eusingList.vue'
......@@ -125,6 +132,7 @@ export default {
OrderCell,
TabBarPage,
NoOrder,
MaskTip,
// EusingList,
},
data() {
......@@ -151,6 +159,7 @@ export default {
old: {
scrollTop: 0,
},
showMask: false,
}
},
watch: {
......@@ -193,6 +202,9 @@ export default {
weiruzhuImage() {
return process.uniEnv.qn_base_url + 'weiruzhu.png'
},
imageStyle() {
return 'width:628rpx; margin-top:816rpx; margin-left:122rpx'
}
},
onLoad(e) {
app.trackPage('自营平台首页')
......@@ -202,6 +214,7 @@ export default {
} else {
this.waitInit = true
}
this.showMaskTip()
},
onShow() {
// 每次进入页面都刷新入驻状态
......@@ -444,6 +457,10 @@ export default {
url: '/pages/mine/customer/index' + '?type=exclusive',
})
},
// 显示提示蒙版
showMaskTip() {
this.showMask = true
},
},
}
</script>
......
......@@ -30,7 +30,7 @@
<view class="ware-house-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)" hover-class="u-hover-class">
<view v-for="(item, index) in warehouseItems" :key="index" class="ware-house-content-item" @click="handleClick(item.pathName, true)" hover-class="u-hover-class">
<view class="ware-house-image">
<image :src="item.icon" :style="item.imageStyle"></image>
</view>
......@@ -43,7 +43,7 @@
<view v-for="(group, ind) in items" :key="ind" class="group-view">
<u-cell-group :border="false">
<view v-for="(item, index) in group" :key="index">
<u-cell-item :value="item.value" :border-bottom="false" @click="handleClick(item.pathName)">
<u-cell-item :value="item.value" :border-bottom="false" @click="handleClick(item.pathName, false)">
<image slot="icon" :src="qnFile(item.icon)" :style="item.imageStyle"></image>
<view slot="title" class="item-title">{{item.title}}</view>
<view slot="value" class="item-value">{{value}}</view>
......@@ -54,13 +54,35 @@
</view>
</view>
<u-modal v-model="show" :content="content" show-cancel-button @confirm="logout"></u-modal>
<view>
<u-toast ref="uToast" />
</view>
<MaskTip
:show="showMask"
imageName="mengceng4.png"
:imageStyle="imageStyle"
name="order_tip"
@click="showMask1 = true"
/>
<MaskTip
:show="showMask1"
imageName="mengceng3.png"
:imageStyle="imageStyle1"
name="history_tip"
:timeout="false"
/>
</view>
</template>
<script>
import login from "@/utils/login.js";
import MaskTip from '@/components/mask-tip/index.vue'
const app = getApp();
export default {
components: {
MaskTip
},
data() {
return {
serviceTel: '18124099271',
......@@ -68,7 +90,10 @@
show: false,
content: '是否确认退出该账户?',
wodebeijingImage: '',
placeholderImage: ''
placeholderImage: '',
needSettled: true, // 需要入驻
showMask: false,
showMask1: false,
}
},
computed: {
......@@ -186,6 +211,12 @@
},
isSuperuser() {
return this.vuex_superuser
},
imageStyle() {
return 'width:602rpx; margin-top:560rpx; margin-left:28rpx'
},
imageStyle1() {
return 'width:596rpx; margin-top:736rpx; margin-left:28rpx'
}
},
watch: {
......@@ -208,6 +239,14 @@
}
this.wodebeijingImage = this.qnFile('wodebeijing-jb.png')
this.placeholderImage = this.qnFile('touxiang.png')
this.showMaskTip()
},
onShow() {
// 更新是否需要入住
if (!this.needSettled) return
this.$u.api.getSettleBaseInfo().then((res) => {
this.needSettled = res.data?.needSettled
})
},
methods: {
qnFile(src) {
......@@ -217,8 +256,17 @@
let self = this
app.getBaseInfo(self);
},
handleClick(path) {
handleClick(path, isWarehouse) {
if(this.vuex_token) {
// 没入驻不能进入仓配相关页面
if (isWarehouse && this.needSettled) {
this.$refs.uToast.show({
title: '请先在首页入驻',
type: 'warning',
duration: 1500,
})
return
}
this.$u.route({
url: 'pages/mine/' + path
})
......@@ -259,7 +307,11 @@
} else {
this.$u.route({url: "pages/login/index"})
}
}
},
// 显示提示蒙版
showMaskTip() {
this.showMask = true
},
}
}
</script>
......
......@@ -93,6 +93,12 @@
</view>
<!-- 悬浮按钮 -->
<!-- <EusingList type="collapse" /> -->
<MaskTip
:show="showMask"
imageName="mengceng1.png"
:imageStyle="imageStyle"
name="today_tip"
/>
</TabBarPage>
</template>
......@@ -101,6 +107,8 @@ import TabBarPage from '@/components/tabBarList/index.vue'
import OrderCell from '@/components/order/index.vue'
import NoOrder from '@/components/order/noOrder.vue'
import upload from '@/components/upload/task.js'
import MaskTip from '@/components/mask-tip/index.vue'
// import EusingList from '@/components/order/eusingList.vue'
export default {
......@@ -108,6 +116,7 @@ export default {
TabBarPage,
OrderCell,
NoOrder,
MaskTip,
// EusingList,
},
data() {
......@@ -171,6 +180,7 @@ export default {
old: {
scrollTop: 0,
},
showMask: false,
}
},
computed: {
......@@ -281,6 +291,9 @@ export default {
noOrderCustomStyle() {
return 'margin-top: 100rpx;background-color: #F4F5F7'
},
imageStyle() {
return 'width:546rpx; margin-top:80rpx; margin-left:100rpx'
}
},
onLoad(e) {
getApp().trackPage('订单首页')
......@@ -292,6 +305,7 @@ export default {
this.indexStatus[this.curNow].indexOf(e.type)
)
}
this.showMaskTip()
},
onShow() {
if (this.uploadTask.length > 0) {
......@@ -488,6 +502,10 @@ export default {
this.scrollTop = 0
})
},
// 显示提示蒙版
showMaskTip() {
this.showMask = true
},
},
}
</script>
......
......@@ -2,9 +2,9 @@
<view class="wallet-view">
<u-navbar back-icon-color="#333333" background="#F4F5F7" title="我的钱包" titleColor="#333333"
:border-bottom="false" title-bold></u-navbar>
<view class="wallet-content-view">
<view class="wallet-content-view">
<view class="header-view">
<image class="header-image" :src="qnFile('qianbaobeijing.png')"></image>
<image class="header-image" :src="qnFile('qianbaobeijing.png')"></image>
</view>
<view class="survey-view">
<view class="survey-top-view">
......@@ -51,6 +51,12 @@
</view>
</view>
</view>
<MaskTip
:show="showMask"
imageName="mengceng5.png"
:imageStyle="imageStyle"
name="settlement_tip"
/>
</view>
</template>
......@@ -58,9 +64,12 @@
let now = new Date(new Date().toLocaleDateString()).getTime();
import util from '@/utils/util.js'
import Statement from "@/components/mine/statement.vue"
import MaskTip from '@/components/mask-tip/index.vue'
export default {
components: {
Statement
Statement,
MaskTip
},
data() {
return {
......@@ -74,6 +83,7 @@
loading: true,
statementList: [],
settledAmount: 0,
showMask: false,
}
},
computed: {
......@@ -119,21 +129,25 @@
'color': '#2272FF',
'margin-bottom': '20rpx'
};
},
pages() {
return ['settlement','statement']
},
pages() {
return ['settlement','statement']
},
imageStyle() {
return 'width:690rpx; margin-top:542rpx; margin-left:30rpx'
}
},
onLoad() {
getApp().trackPage('我的钱包页')
this.showMaskTip()
},
onShow() {
// 未登录,先跳转登录
if(!this.vuex_token) {
this.$u.route({url: 'pages/login/index'})
}
this.loadAssets()
this.loadStatement()
onShow() {
// 未登录,先跳转登录
if(!this.vuex_token) {
this.$u.route({url: 'pages/login/index'})
}
this.loadAssets()
this.loadStatement()
},
methods: {
qnFile(src) {
......@@ -142,21 +156,21 @@
// 提现
handleClickWithdraw() {
this.$u.route({
url: 'pages/mine/wallet/withdraw'
url: 'pages/mine/wallet/withdraw'
})
},
handleClick(index) {
this.$u.route({
url: 'pages/mine/wallet/' + this.pages[index]
this.$u.route({
url: 'pages/mine/wallet/' + this.pages[index]
})
},
handleClickCell(orderId) {
this.$u.route({
},
handleClickCell(orderId) {
this.$u.route({
url: 'pages/order/detail?&type=other',
params: {
id: orderId
}
})
}
})
},
async loadAssets() {
let self = this
......@@ -168,9 +182,9 @@
async loadStatement() {
let self = this
self.loading = true
let res = await self.$u.api.listStatement({
starDate: this.moment(new Date()).startOf('month').format('YYYY-MM-DD'),
endDate:this.moment(new Date()).endOf('month').format('YYYY-MM-DD')
let res = await self.$u.api.listStatement({
starDate: this.moment(new Date()).startOf('month').format('YYYY-MM-DD'),
endDate:this.moment(new Date()).endOf('month').format('YYYY-MM-DD')
})
self.loading = false
if(res && res.code == 200) {
......@@ -183,28 +197,32 @@
}
}
},
// 显示提示蒙版
showMaskTip() {
this.showMask = true
},
}
}
</script>
<style lang="scss" scoped>
.wallet-view {
display: flex;
flex-direction: column;
.wallet-view {
display: flex;
flex-direction: column;
height: 100vh;
.wallet-content-view {
position: relative;
overflow: auto;
background-color: #F4F5F7;
.header-view {
position: absolute;
width: 100%;
padding-top: 10rpx;
padding-left: 14rpx;
.header-image {
background-color: #F4F5F7;
.header-view {
position: absolute;
width: 100%;
padding-top: 10rpx;
padding-left: 14rpx;
.header-image {
width: 730rpx;
height: 420rpx;
}
height: 420rpx;
}
}
......@@ -310,5 +328,5 @@
border-radius: 0 0 12rpx 12rpx;
}
}
}
</style>
}
</style>
......@@ -20,8 +20,7 @@
<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" @scroll="scroll"
:scroll-top="scrollTop" refresher-background="#F4F5F7"
@refresherrefresh="onRefresh" @refresherrestore="onRestore" enable-back-to-top>
refresher-background="#F4F5F7" @refresherrefresh="onRefresh" @refresherrestore="onRestore" enable-back-to-top>
<!-- 加载中 && 没有下拉:显示加载中 -->
<view class="loading-view" v-if="!loaded && _freshing">
<u-loading mode="flower"></u-loading>
......@@ -35,7 +34,7 @@
<AppliedCell @operate="handleOperate" :info="item" @action="handleClickCell" @express="handleClickExpress"></AppliedCell>
</view>
<!-- 底部加载状态 -->
<view class="load-more-view" v-if="(pageNumber == 1 && loaded) || pageNumber > 1">
<view class="load-more-view" v-show="(pageNumber == 1 && loaded) || pageNumber > 1">
<u-loadmore :status="loadStatus"
bgColor="#F4F5F7"></u-loadmore>
</view>
......@@ -79,11 +78,11 @@
computed: {
// 不传值 全部;待签收 15;待发货 10;待审核 1;已驳回 -2;已签收 20;已取消 -1;
list() {
return [{
'name': '全部',
'status': null
return [
{
'name': '待签收',
'status': 15
},
{
'name': '待审核',
'status': 1
......@@ -93,13 +92,13 @@
'status': 10
},
{
'name': '待签收',
'status': 15
'name': '已取消',
'status': -1
},
{
'name': '全部',
'status': null
},
// {
// 'name': '已签收',
// 'status': 20
// }
]
},
// 当下tab
......
<template>
<template>
<!-- 返件信息 -->
<view class="ware-house-return">
<u-navbar back-icon-color="#333333" background="#FFFFFF" title="返件信息" titleColor="#333333"
:border-bottom="false" title-bold></u-navbar>
<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" search-icon-color="#999999">
</u-search>
</view>
<NoOrder v-if="noParts" imageName="wupeijianxinxi.png" text="当前暂无返件信息" :customStyle="noPartsCustomStyle" />
:border-bottom="false" title-bold></u-navbar>
<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" search-icon-color="#999999">
</u-search>
</view>
<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%;" scroll-anchoring enable-back-to-top>
<view class="loading-view" v-if="!loaded">
<u-loading mode="flower"></u-loading>
<scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="reachBottom" scroll-anchoring enable-back-to-top>
<view class="loading-view" v-if="!loaded">
<u-loading mode="flower"></u-loading>
</view>
<template v-else>
<view v-for="(item, index) in partsList" :key="item.id">
<view v-for="item in partsList" :key="item.id">
<ReturnCell :info="item"></ReturnCell>
</view>
<view class="load-more-view">
<u-loadmore v-show="(pageNumber == 1 && loaded) || pageNumber > 1" :status="loadStatus"
bgColor="#F4F5F7"></u-loadmore>
<view class="load-more-view" v-if="(pageNumber == 1 && loaded) || pageNumber > 1">
<u-loadmore :status="loadStatus" bgColor="#F4F5F7"></u-loadmore>
</view>
</template>
</scroll-view>
......@@ -44,8 +43,8 @@
pageSize: 20,
partsList: [],
loadStatus: 'loading',
loaded: false,
keyword: '',
loaded: false,
keyword: '',
searchedKeyword: ''
};
},
......@@ -58,45 +57,45 @@
},
noPartsCustomStyle() {
return 'margin-top: 100rpx;background-color: #F4F5F7'
},
searchButtonText() {
return this.searchedKeyword == this.keyword && this.keyword ? '取消' : '搜索'
},
actionStyle() {
return {
'font-size': '32rpx',
'color': '#2272FF',
'margin-left': '20rpx'
}
},
searchButtonText() {
return this.searchedKeyword == this.keyword && this.keyword ? '取消' : '搜索'
},
actionStyle() {
return {
'font-size': '32rpx',
'color': '#2272FF',
'margin-left': '20rpx'
}
},
},
onLoad(e) {
getApp().trackPage('我的配件页')
getApp().trackPage('我的配件页')
this.reloadPartsList()
},
methods: {
methods: {
getReturnedParts() { // 返件列表
this.pageNumber += 1
if (this.pageNumber == 1) {
this.loaded = false
if (this.pageNumber == 1) {
this.loaded = false
}
var param = {
'pageSize': this.pageSize,
'pageNumber': this.pageNumber,
'items': true,
'type': 'new'
}
if (this.keyword) {
param.keyword = this.keyword
}
'pageSize': this.pageSize,
'pageNumber': this.pageNumber,
'items': true,
'type': 'new'
}
if (this.keyword) {
param.keyword = this.keyword
}
this.searchedKeyword = this.keyword
this.$u.api.returnedParts(param).then((res) => {
if (res.code == 200) {
if (this.pageNumber == 1) {
this.partsList = []
}
let list = res.data || []
this.partsList.push(...list)
}
let list = res.data || []
this.partsList.push(...list)
this.loadStatus = list.length < this.pageSize ? 'nomore' : 'loadmore'
} else {
console.log(res.message)
......@@ -104,44 +103,44 @@
this.loaded = true
});
},
handleClickCell(info) {
var pages = getCurrentPages();
if (pages.length >= 1) {
var page = pages[pages.length - 1];
page.info = info
}
uni.navigateTo({
url: 'pages/mine/warehouse/partsDetail'
})
},
handleClickCell(info) {
var pages = getCurrentPages();
if (pages.length >= 1) {
var page = pages[pages.length - 1];
page.info = info
}
uni.navigateTo({
url: 'pages/mine/warehouse/partsDetail'
})
},
handleClickSearch() { // 软键盘搜索
this.reloadPartsList()
},
handleClear() { // 清空搜索
if (this.searchedKeyword) {
this.reloadPartsList()
}
},
handleClickButton() { // 点了搜索按钮
if (this.searchedKeyword == this.keyword) {
this.keyword = ''
}
this.reloadPartsList()
handleClickSearch() { // 软键盘搜索
this.reloadPartsList()
},
handleClear() { // 清空搜索
if (this.searchedKeyword) {
this.reloadPartsList()
}
},
handleClickButton() { // 点了搜索按钮
if (this.searchedKeyword == this.keyword) {
this.keyword = ''
}
this.reloadPartsList()
},
onRestore() {
this.triggered = 'restore'; // 需要重置
},
reloadPartsList() { // 第一页数据
this.pageNumber = 0
this.loadStatus = 'loading'
this.loadStatus = 'loading'
this.getReturnedParts()
},
reachBottom(e) {
if (this.loadStatus != 'loadmore') return
this.loadStatus == 'loading'
this.getReturnedParts()
},
reachBottom(e) {
if (this.loadStatus != 'loadmore') return
this.loadStatus == 'loading'
this.getReturnedParts()
},
}
};
......@@ -150,21 +149,21 @@
<style lang="scss" scoped>
.ware-house-return {
padding: 0 30rpx;
height: 100vh;
display: flex;
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;
}
height: 100vh;
display: flex;
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 {
......@@ -173,15 +172,15 @@
.load-more-view {
margin-bottom: 68rpx;
}
.loading-view {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
margin-top: 300rpx;
position: absolute;
}
.loading-view {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
margin-top: 300rpx;
position: absolute;
}
}
}
</style>
</style>
......@@ -25,7 +25,7 @@
</view>
<!-- 物料列表 -->
<view class="tab-view">
<scroll-view scroll-y style="height: 100%;width: 100%;" scroll-anchoring enable-back-to-top @scroll="scroll">
<scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="reachBottom" scroll-anchoring enable-back-to-top>
<!-- 加载转圈页面 -->
<view class="loading-view" v-if="!loaded">
<u-loading mode="flower"></u-loading>
......@@ -37,9 +37,8 @@
@change="handleChange($event, index)"@numChange="handleNumChange($event, index)" />
</view>
<!-- 底部加载状态 -->
<view class="load-more-view">
<u-loadmore v-show="partsList.length > 0" status="nomore" bgColor="#F4F5F7">
</u-loadmore>
<view class="load-more-view" v-if="partsList.length > 0">
<u-loadmore status="nomore" bgColor="#F4F5F7"></u-loadmore>
</view>
</template>
</scroll-view>
......@@ -170,7 +169,7 @@
}
this.searchedKeyword = this.keyword
this.$u.api.reserveList(param).then((res) => {
this.$u.api.getMyReserve(param).then((res) => {
if (res.code == 200) {
this.partsList = []
let list = res.data || []
......@@ -207,7 +206,6 @@
}
},
allSelect(value) { // 底部勾选全选
console.log(value)
for (var item of this.partsList) {
item.selected = value
item.quantity = value ? item.stock : 0
......
This diff is collapsed.
......@@ -23,7 +23,7 @@
<!-- <text class="rightContent u-m-t-14 u-m-l-30 u-p-b-30">{{item.describe}}</text> -->
</view>
<view class="rightImageView" v-if="item.orderImages && item.orderImages.length > 0">
<u-image class="rightImage" v-for="(image, index) in item.orderImages" :src="image + '?imageView2/1/w/100/h/100/q/75'"
<u-image class="rightImage" v-for="(image, index) in item.orderImages" :src="image"
:key="index" @tap.stop="handleClickImage(item, index)" width="116" height="116">
<view slot="error" style="font-size: 24rpx;">上传中</view>
</u-image>
......
......@@ -12,7 +12,7 @@ try {
}
// 需要永久存储,且下次APP启动需要取出的,在state中的变量名
let saveStateKeys = ['vuex_user', 'vuex_wx_uid', 'vuex_token', 'vuex_cache', 'uploadTask', 'uploadTotal', 'uploadSuccess', 'vuex_superuser'];
let saveStateKeys = ['vuex_user', 'vuex_wx_uid', 'vuex_token', 'vuex_cache', 'uploadTask', 'uploadTotal', 'uploadSuccess', 'vuex_superuser', 'vuex_not_first'];
// 保存变量到本地存储中
const saveLifeData = function(key, value) {
......@@ -50,6 +50,8 @@ const store = new Vuex.Store({
uploadTotal: lifeData.uploadTotal ? lifeData.uploadTotal : 0,
// 已上传数量
uploadSuccess: lifeData.uploadSuccess ? lifeData.uploadSuccess : 0,
// 初次登录
vuex_not_first: lifeData.vuex_not_first ? lifeData.vuex_not_first : {},
},
mutations: {
$uStore(state, payload) {
......
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