Commit 5d728f5d authored by Damon's avatar Damon

Merge branch 'dev-1.5.4' into test

parents de9afadb fca1826a
...@@ -28,13 +28,8 @@ ...@@ -28,13 +28,8 @@
</view> </view>
</view> </view>
<slot></slot> <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> </view>
<!-- <u-action-sheet :list="list" v-model="maskShow" :cancel-btn="true" @click="uploadSelect"></u-action-sheet> -->
</view> </view>
<!-- <take-photo v-if="takeStatus" @close="closeTake" :upload="false" :currentItem="currentItemDate"></take-photo> -->
</view> </view>
</template> </template>
...@@ -98,7 +93,6 @@ export default { ...@@ -98,7 +93,6 @@ export default {
.map((img) => { .map((img) => {
return { src: img ? img : '' } return { src: img ? img : '' }
}) })
this.setValue()
} }
}, },
methods: { methods: {
...@@ -120,102 +114,7 @@ export default { ...@@ -120,102 +114,7 @@ export default {
delFile(index) { delFile(index) {
this.imgList.splice(index, 1) this.imgList.splice(index, 1)
this.setValue() 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> </script>
...@@ -263,17 +162,4 @@ export default { ...@@ -263,17 +162,4 @@ export default {
transform: rotate(90deg); transform: rotate(90deg);
} }
} }
// .list {
// display: flex;
// .txt {
// color: #666;
// padding: 10rpx;
// &.active {
// background-color: red;
// color: #fff;
// }
// }
// }
</style> </style>
...@@ -100,7 +100,7 @@ export default { ...@@ -100,7 +100,7 @@ export default {
}, },
mounted() { mounted() {
this.isNotMulti = this.orderServiceType === '安装' this.isNotMulti = this.orderServiceType === '安装'
this.initComponent() this.initMeasure()
}, },
methods: { methods: {
openPicker() { openPicker() {
...@@ -140,15 +140,11 @@ export default { ...@@ -140,15 +140,11 @@ export default {
let result = [] let result = []
for (let key in res.data) { for (let key in res.data) {
this.measure = res.data[key].measureExtendDtos 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 }) result.push({ id: item.measureId, label: item.measureName })
}) })
} }
if (this.orderServiceType === '安装') {
this.settings = result this.settings = result
} else {
this.settings[2] = result
}
} else { } else {
console.log(res.message, '查询措施失败') 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 @@ ...@@ -258,7 +258,7 @@
overflow-x: auto; overflow-x: auto;
display: flex; display: flex;
width: 100%; width: 100%;
border-right: 2rpx solid #F4F5F7; // border-right: 2rpx solid #F4F5F7;
.image-view { .image-view {
width: 120rpx; width: 120rpx;
height: 120rpx; height: 120rpx;
......
...@@ -26,8 +26,8 @@ ...@@ -26,8 +26,8 @@
<view class="bottom-view"> <view class="bottom-view">
<view class="total-view"> <view class="total-view">
<text>合计:</text> <text>合计:</text>
<text class="amount-view">x{{total}}</text> <text class="amount-view">x{{info.items.length}}</text>
<text></text> <text>种</text>
</view> </view>
</view> </view>
</view> </view>
...@@ -63,13 +63,13 @@ ...@@ -63,13 +63,13 @@
} }
return this.info.finished ? '退件完成' : text return this.info.finished ? '退件完成' : text
}, },
total() { // 合计 // total() { // 合计
var i = 0 // var i = 0
for (var item of this.info.items) { // for (var item of this.info.items) {
i += item.quantity // i += item.quantity
} // }
return i // return i
}, // },
}, },
methods: { methods: {
handleLongpress() { // 长按复制单号 handleLongpress() { // 长按复制单号
......
...@@ -4,17 +4,20 @@ ...@@ -4,17 +4,20 @@
<u-checkbox v-if="showChecked" icon-size="28" size="40" v-model="check" @change="handleChange" <u-checkbox v-if="showChecked" icon-size="28" size="40" v-model="check" @change="handleChange"
shape="circle" /> shape="circle" />
<image class="image-view" :src="imageUrl"></image> <image class="image-view" :src="imageUrl"></image>
</view>
<view class="info-view"> <view class="info-view">
<view class="name-text">{{item.name}}</view> <view class="name-text">{{item.name}}</view>
<view class="info-bottom">
<view>{{remarkText}}</view> <view>{{remarkText}}</view>
</view>
</view>
<view class="count-view"> <view class="count-view">
<view v-if="showChecked"> <view v-if="showChecked">
<u-number-box v-model="value" :min="item.min || 0" :max="item.max || item[type]" @minus="numChange" <u-number-box v-model="value" :min="item.min || 0" :max="item.max || item[type]" @minus="numChange"
@plus="numChange" @blur="numChange"></u-number-box> @plus="numChange" @blur="numChange"></u-number-box>
</view> </view>
<text v-else>x{{item[type]|| 0}}</text> <text v-else>x{{item[type]|| 0}}</text>
<text class="unit-text" v-if="item.unit">{{item.unit}}</text>
</view>
</view>
</view> </view>
</view> </view>
</template> </template>
...@@ -93,8 +96,7 @@ ...@@ -93,8 +96,7 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.spare-item { .spare-item {
display: flex; display: flex;
justify-content: space-between; align-items: center;
align-items: flex-end;
.left-view { .left-view {
display: flex; display: flex;
...@@ -106,24 +108,33 @@ ...@@ -106,24 +108,33 @@
margin-right: 20rpx; margin-right: 20rpx;
flex-shrink: 0; flex-shrink: 0;
} }
}
.info-view { .info-view {
font-size: 24rpx; font-size: 24rpx;
color: #333333; color: #333333;
width: 100%;
.name-text { .name-text {
font-size: 32rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
color: #333333; color: #333333;
margin-bottom: 30rpx; margin-bottom: 30rpx;
} }
} .info-bottom {
} display: flex;
justify-content: space-between;
align-items: center;
.count-view { .count-view {
font-size: 28rpx; font-size: 28rpx;
color: #333333; color: #333333;
display: flex;
justify-content: flex-end;
align-items: center;
.unit-text {
padding-left: 10rpx;
}
}
}
} }
} }
</style> </style>
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
<view class="num"> <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> <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 class="nums" v-else>x{{ info.quantity || 1 }}</text>
<text v-if="info.unit" class="unit-text">{{info.unit || ''}}</text>
</view> </view>
</view> </view>
</view> </view>
...@@ -54,9 +55,15 @@ ...@@ -54,9 +55,15 @@
.num { .num {
width: 200rpx; width: 200rpx;
text-align: center; text-align: center;
display: flex;
justify-content: flex-end;
align-items: center;
.nums { .nums {
//color: #F59A23; //color: #F59A23;
} }
.unit-text {
padding-left: 10rpx;
}
} }
} }
} }
......
...@@ -12,10 +12,11 @@ ...@@ -12,10 +12,11 @@
<view class="right-content-desc u-line-2">{{ info.remark }}</view> <view class="right-content-desc u-line-2">{{ info.remark }}</view>
<view class="u-flex right-content-opera"> <view class="u-flex right-content-opera">
<view class="no" v-if="maxShow"> <view class="no" v-if="maxShow">
可用{{ info.max }}件 可用{{ info.max + (info.unit || '')}}
</view> </view>
<view class="num"> <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> <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> <u-button v-show="info.disabled" type="primary" size="mini" shape="circle" @click="addApply">加入申请</u-button>
</view> </view>
</view> </view>
...@@ -121,6 +122,12 @@ ...@@ -121,6 +122,12 @@
.num { .num {
flex: 1; flex: 1;
text-align: right; text-align: right;
display: flex;
justify-content: flex-end;
align-items: center;
.unit-text {
padding-left: 10rpx;
}
} }
} }
} }
......
...@@ -6,8 +6,7 @@ ...@@ -6,8 +6,7 @@
<view class="left-list">全选</view> <view class="left-list">全选</view>
</view> </view>
<view class="u-flex bottom-center"> <view class="u-flex bottom-center">
<view class="center-list">已选择 {{ partNum }} 种</view> <view class="center-list">共:<text class="num"> {{ partNum }} </text> 种</view>
<view class="center-list">共:<text class="num"> {{ num }} </text> 件</view>
</view> </view>
</view> </view>
<view class="u-flex select-num" v-if="!showChecked"> <view class="u-flex select-num" v-if="!showChecked">
...@@ -15,7 +14,7 @@ ...@@ -15,7 +14,7 @@
<u-badge type="error" :show-zero="true" :count="partNum" :offset="[0, 0]"></u-badge> <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> <u-image width="72rpx" height="72rpx" :lazy-load="false" :src="partsImage"></u-image>
</view> </view>
<view class="num-right">共:<text class="num"> {{ num }} </text> 件</view> <view class="num-right">共:<text class="num"> {{ partNum }} </text> 种</view>
</view> </view>
<view class="u-flex bottom-right"> <view class="u-flex bottom-right">
<button :class="['btn', btnActive]" @click="submit">{{ submitTxt }}</button> <button :class="['btn', btnActive]" @click="submit">{{ submitTxt }}</button>
...@@ -143,14 +142,14 @@ ...@@ -143,14 +142,14 @@
align-items: flex-start; align-items: flex-start;
margin-right: 20rpx; margin-right: 20rpx;
.center-list { .center-list {
// &:nth-of-type(1) {
// color: #666;
// font-size: 26rpx;
// }
&:nth-of-type(1) { &:nth-of-type(1) {
color: #666;
font-size: 26rpx;
}
&:nth-of-type(2) {
color: #333; color: #333;
font-size: 32rpx; font-size: 32rpx;
margin-top: 8rpx; // margin-top: 8rpx;
font-weight: bold; font-weight: bold;
.num { .num {
color: #2272FF; color: #2272FF;
......
<template> <template>
<view class="upload-progress"> <view class="upload-progress">
<view :class="['u-flex', 'suspension', {'error': uploadStatus === 3, 'no-active': clicked <= 0}]" @click="openpRrogress"> <view
id="_drag_button"
:class="[
'u-flex',
'suspension',
{ error: uploadStatus === 3, 'no-active': clicked <= 0 },
]"
@touchstart.capture="touchstart"
@touchend.capture="touchend"
@touchmove.capture="touchmove"
:style="{
left: left + 'px',
top: top + 'px',
}"
@click="openpRrogress"
>
<view class="progress" v-if="taskCount > 0">{{ uploadPercentage }}%</view> <view class="progress" v-if="taskCount > 0">{{ uploadPercentage }}%</view>
<view class="upload-img" v-else> <view class="upload-img" v-else>
<image class="icon" :src="icon"></image> <image class="icon" :src="icon"></image>
...@@ -13,17 +28,33 @@ ...@@ -13,17 +28,33 @@
mode="center" mode="center"
:animation="false" :animation="false"
@close="closePopup" @close="closePopup"
width="690rpx"> width="690rpx"
>
<view class="slot-content"> <view class="slot-content">
<view class="upload-title"> <view class="upload-title">
<text class='status-txt'>图片上传进度</text> <text class="status-txt">图片上传进度</text>
</view> </view>
<view v-if="taskCount > 0"> <view v-if="taskCount > 0">
<view class="progress-circle"> <view class="progress-circle">
<u-loading class="loading" v-if="!progressStatus" mode="circle"></u-loading> <u-loading
<u-circle-progress v-if="progressStatus" :width="320" :border-width="20" inactive-color="#F4F5F7" :active-color="progressColor" :percent="uploadPercentage"> class="loading"
<view :class="['u-progress-content', {'error': uploadStatus === 3}]"> {{ uploadPercentage }}%</view> v-if="!progressStatus"
mode="circle"
></u-loading>
<u-circle-progress
v-if="progressStatus"
:width="320"
:border-width="20"
inactive-color="#F4F5F7"
:active-color="progressColor"
:percent="uploadPercentage"
>
<view
:class="['u-progress-content', { error: uploadStatus === 3 }]"
>
{{ uploadPercentage }}%</view
>
</u-circle-progress> </u-circle-progress>
</view> </view>
...@@ -38,12 +69,16 @@ ...@@ -38,12 +69,16 @@
</view> </view>
<view class="u-flex"> <view class="u-flex">
<view class="title">状态</view> <view class="title">状态</view>
<view :class="['status', {'error': uploadStatus === 3}]">{{ uploadStatusName }}</view> <view :class="['status', { error: uploadStatus === 3 }]">{{
uploadStatusName
}}</view>
</view> </view>
</view> </view>
<view class="upload-bottom" v-if="uploadStatus === 3"> <view class="upload-bottom" v-if="uploadStatus === 3">
<view class="button confirm" @click="$u.throttle(retry, 500)">重试</view> <view class="button confirm" @click="$u.throttle(retry, 500)"
>重试</view
>
</view> </view>
</view> </view>
...@@ -57,17 +92,40 @@ ...@@ -57,17 +92,40 @@
</template> </template>
<script> <script>
/** /**
* upload-progress 图片上传进度 * upload-progress 图片上传进度
*/ */
import upload from '@/components/upload/task.js' import upload from '@/components/upload/task.js'
export default { const sys = uni.getSystemInfoSync()
name:"upload-progress", export default {
name: 'upload-progress',
props: {
// 是否启用自动停靠
isDock: {
type: Boolean,
default: false,
},
// 当前页面是否包含tabbar
existTabBar: {
type: Boolean,
default: false,
},
},
data() { data() {
return { return {
open: false, open: false,
progressStatus: false, progressStatus: false,
clicked: 1 clicked: 1,
top: sys.windowHeight - 80,
left: sys.windowWidth - 50,
width: 0,
height: 0,
offsetWidth: 0,
offsetHeight: 0,
windowWidth: 0,
windowHeight: 0,
isMove: true,
edge: 10,
} }
}, },
computed: { computed: {
...@@ -86,13 +144,13 @@ ...@@ -86,13 +144,13 @@
switch (this.uploadStatus) { switch (this.uploadStatus) {
case 1: case 1:
status = '等待上传' status = '等待上传'
break; break
case 2: case 2:
status = '上传中' status = '上传中'
break; break
case 3: case 3:
status = '上传中断' status = '上传中断'
break; break
} }
return status return status
}, },
...@@ -102,7 +160,9 @@ ...@@ -102,7 +160,9 @@
uploadPercentage() { uploadPercentage() {
const num = this.uploadSuccess const num = this.uploadSuccess
const total = this.uploadTotal const total = this.uploadTotal
return total > 0 ? Math.floor(Math.round(num / total * 10000) / 100.00) : 0 return total > 0
? Math.floor(Math.round((num / total) * 10000) / 100.0)
: 0
}, },
}, },
watch: { watch: {
...@@ -121,6 +181,30 @@ ...@@ -121,6 +181,30 @@
created() { created() {
this.changeActive() this.changeActive()
}, },
mounted() {
this.windowWidth = sys.windowWidth
this.windowHeight = sys.windowHeight
// #ifdef APP-PLUS
this.existTabBar && (this.windowHeight -= 50)
// #endif
if (sys.windowTop) {
this.windowHeight += sys.windowTop
}
const query = uni.createSelectorQuery().in(this)
query
.select('#_drag_button')
.boundingClientRect((data) => {
this.width = data.width
this.height = data.height
this.offsetWidth = data.width / 2
this.offsetHeight = data.height / 2
// this.left = this.windowWidth - this.width - this.edge
// this.top = this.windowHeight - this.height - this.edge
})
.exec()
},
methods: { methods: {
closePopup() { closePopup() {
this.progressStatus = false this.progressStatus = false
...@@ -134,34 +218,84 @@ ...@@ -134,34 +218,84 @@
}, 300) }, 300)
}, },
retry() { retry() {
if(this.uploadStatus !== 2) upload.uploadImageTask(this) if (this.uploadStatus !== 2) upload.uploadImageTask(this)
}, },
changeActive() { changeActive() {
setTimeout(() => { setTimeout(() => {
// 三秒不点击,算失去活跃 // 三秒不点击,算失去活跃
this.clicked = Math.max(0, this.clicked - 1) this.clicked = Math.max(0, this.clicked - 1)
}, 3000) }, 3000)
},
touchstart(e) {},
touchend(e) {
if (this.isDock) {
let edgeRigth = this.windowWidth - this.width - this.edge
if (this.left < this.windowWidth / 2 - this.offsetWidth) {
this.left = this.edge
} else {
this.left = edgeRigth
}
} }
this.isMove = false
},
touchmove(e) {
// 单指触摸
if (e.touches.length !== 1) {
return false
} }
this.isMove = true
let clientY = e.touches[0].clientY - this.offsetHeight
// #ifdef H5
clientY += this.height
// #endif
let edgeBottom = this.windowHeight - this.height - this.edge
// 上下触及边界
if (clientY < this.edge) {
this.top = this.edge
} else if (clientY > edgeBottom) {
this.top = edgeBottom
} else {
this.top = clientY
} }
let clientX = e.touches[0].clientX - this.offsetWidth
// #ifdef H5
clientX += this.width
// #endif
let edgeLeft = this.windowWidth - this.width - this.edge
// 左右触及边界
if (clientX < this.edge) {
this.left = this.edge
} else if (clientX > edgeLeft) {
this.left = edgeLeft
} else {
this.left = clientX
}
},
},
}
</script> </script>
<style lang="scss"> <style lang="scss">
.upload-progress { .upload-progress {
width: 100%; width: 100%;
height: 100%; height: 100%;
.suspension { .suspension {
position: fixed; position: fixed;
right: 20rpx;
bottom: 20%;
width: 80rpx; width: 80rpx;
height: 80rpx; height: 80rpx;
border-radius: 50%; border-radius: 50%;
background: #2272FF; background: #2272ff;
z-index: 999; z-index: 999;
opacity: 1; opacity: 1;
&.error { &.error {
background: #FA5A49; background: #fa5a49;
} }
&.no-active { &.no-active {
opacity: 0.6; opacity: 0.6;
...@@ -206,10 +340,10 @@ ...@@ -206,10 +340,10 @@
line-height: 320rpx; line-height: 320rpx;
} }
.u-progress-content { .u-progress-content {
color: #2272FF; color: #2272ff;
font-size: 60rpx; font-size: 60rpx;
&.error { &.error {
color: #FA5A49; color: #fa5a49;
} }
} }
} }
...@@ -229,13 +363,13 @@ ...@@ -229,13 +363,13 @@
color: #333; color: #333;
} }
.resolve { .resolve {
color: #2272FF; color: #2272ff;
} }
.status { .status {
color: #2272FF; color: #2272ff;
font-size: 36rpx; font-size: 36rpx;
&.error { &.error {
color: #FA5A49; color: #fa5a49;
} }
} }
} }
...@@ -255,8 +389,8 @@ ...@@ -255,8 +389,8 @@
} }
.confirm { .confirm {
margin: 36rpx 30rpx 52rpx 15rpx; margin: 36rpx 30rpx 52rpx 15rpx;
background: #2272FF; background: #2272ff;
color: #FFFFFF; color: #ffffff;
} }
} }
.default { .default {
...@@ -273,5 +407,5 @@ ...@@ -273,5 +407,5 @@
} }
} }
} }
} }
</style> </style>
...@@ -72,10 +72,14 @@ export default { ...@@ -72,10 +72,14 @@ export default {
const data = JSON.parse(JSON.stringify(this.uploadTask)) const data = JSON.parse(JSON.stringify(this.uploadTask))
const saveLists = data.concat(lists) const saveLists = data.concat(lists)
this.$u.vuex('uploadTask', saveLists)
const newTotal = this.uploadTotal + lists.length const newTotal = this.uploadTotal + lists.length
setTimeout(() => {
this.$u.vuex('uploadTask', saveLists)
this.$u.vuex('uploadTotal', newTotal) this.$u.vuex('uploadTotal', newTotal)
}, 1000)
//this.$u.vuex('uploadSuccess', 0) //this.$u.vuex('uploadSuccess', 0)
return lists return lists
}, },
......
...@@ -110,12 +110,19 @@ ...@@ -110,12 +110,19 @@
<!-- <EusingList /> --> <!-- <EusingList /> -->
</view> </view>
<upload-progress /> <upload-progress />
<MaskTip
:show="showMask"
imageName="mengceng2.png"
:imageStyle="imageStyle"
name="upload_tip"
/>
</TabBarPage> </TabBarPage>
</template> </template>
<script> <script>
import TabBarPage from '@/components/tabBarList/index.vue' import TabBarPage from '@/components/tabBarList/index.vue'
import NoOrder from '@/components/order/noOrder.vue' import NoOrder from '@/components/order/noOrder.vue'
import MaskTip from '@/components/mask-tip/index.vue'
const app = getApp() const app = getApp()
import OrderCell from '@/components/order/index.vue' import OrderCell from '@/components/order/index.vue'
// import EusingList from '@/components/order/eusingList.vue' // import EusingList from '@/components/order/eusingList.vue'
...@@ -125,6 +132,7 @@ export default { ...@@ -125,6 +132,7 @@ export default {
OrderCell, OrderCell,
TabBarPage, TabBarPage,
NoOrder, NoOrder,
MaskTip,
// EusingList, // EusingList,
}, },
data() { data() {
...@@ -151,6 +159,7 @@ export default { ...@@ -151,6 +159,7 @@ export default {
old: { old: {
scrollTop: 0, scrollTop: 0,
}, },
showMask: false,
} }
}, },
watch: { watch: {
...@@ -193,6 +202,9 @@ export default { ...@@ -193,6 +202,9 @@ export default {
weiruzhuImage() { weiruzhuImage() {
return process.uniEnv.qn_base_url + 'weiruzhu.png' return process.uniEnv.qn_base_url + 'weiruzhu.png'
}, },
imageStyle() {
return 'width:628rpx; margin-top:816rpx; margin-left:122rpx'
}
}, },
onLoad(e) { onLoad(e) {
app.trackPage('自营平台首页') app.trackPage('自营平台首页')
...@@ -202,6 +214,7 @@ export default { ...@@ -202,6 +214,7 @@ export default {
} else { } else {
this.waitInit = true this.waitInit = true
} }
this.showMaskTip()
}, },
onShow() { onShow() {
// 每次进入页面都刷新入驻状态 // 每次进入页面都刷新入驻状态
...@@ -444,6 +457,10 @@ export default { ...@@ -444,6 +457,10 @@ export default {
url: '/pages/mine/customer/index' + '?type=exclusive', url: '/pages/mine/customer/index' + '?type=exclusive',
}) })
}, },
// 显示提示蒙版
showMaskTip() {
this.showMask = true
},
}, },
} }
</script> </script>
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<view class="ware-house-view"> <view class="ware-house-view">
<view class="ware-house-title">仓配功能</view> <view class="ware-house-title">仓配功能</view>
<view class="ware-house-content"> <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"> <view class="ware-house-image">
<image :src="item.icon" :style="item.imageStyle"></image> <image :src="item.icon" :style="item.imageStyle"></image>
</view> </view>
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<view v-for="(group, ind) in items" :key="ind" class="group-view"> <view v-for="(group, ind) in items" :key="ind" class="group-view">
<u-cell-group :border="false"> <u-cell-group :border="false">
<view v-for="(item, index) in group" :key="index"> <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> <image slot="icon" :src="qnFile(item.icon)" :style="item.imageStyle"></image>
<view slot="title" class="item-title">{{item.title}}</view> <view slot="title" class="item-title">{{item.title}}</view>
<view slot="value" class="item-value">{{value}}</view> <view slot="value" class="item-value">{{value}}</view>
...@@ -54,13 +54,35 @@ ...@@ -54,13 +54,35 @@
</view> </view>
</view> </view>
<u-modal v-model="show" :content="content" show-cancel-button @confirm="logout"></u-modal> <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> </view>
</template> </template>
<script> <script>
import login from "@/utils/login.js"; import login from "@/utils/login.js";
import MaskTip from '@/components/mask-tip/index.vue'
const app = getApp(); const app = getApp();
export default { export default {
components: {
MaskTip
},
data() { data() {
return { return {
serviceTel: '18124099271', serviceTel: '18124099271',
...@@ -68,7 +90,10 @@ ...@@ -68,7 +90,10 @@
show: false, show: false,
content: '是否确认退出该账户?', content: '是否确认退出该账户?',
wodebeijingImage: '', wodebeijingImage: '',
placeholderImage: '' placeholderImage: '',
needSettled: true, // 需要入驻
showMask: false,
showMask1: false,
} }
}, },
computed: { computed: {
...@@ -186,6 +211,12 @@ ...@@ -186,6 +211,12 @@
}, },
isSuperuser() { isSuperuser() {
return this.vuex_superuser 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: { watch: {
...@@ -208,6 +239,14 @@ ...@@ -208,6 +239,14 @@
} }
this.wodebeijingImage = this.qnFile('wodebeijing-jb.png') this.wodebeijingImage = this.qnFile('wodebeijing-jb.png')
this.placeholderImage = this.qnFile('touxiang.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: { methods: {
qnFile(src) { qnFile(src) {
...@@ -217,8 +256,17 @@ ...@@ -217,8 +256,17 @@
let self = this let self = this
app.getBaseInfo(self); app.getBaseInfo(self);
}, },
handleClick(path) { handleClick(path, isWarehouse) {
if(this.vuex_token) { if(this.vuex_token) {
// 没入驻不能进入仓配相关页面
if (isWarehouse && this.needSettled) {
this.$refs.uToast.show({
title: '请先在首页入驻',
type: 'warning',
duration: 1500,
})
return
}
this.$u.route({ this.$u.route({
url: 'pages/mine/' + path url: 'pages/mine/' + path
}) })
...@@ -259,7 +307,11 @@ ...@@ -259,7 +307,11 @@
} else { } else {
this.$u.route({url: "pages/login/index"}) this.$u.route({url: "pages/login/index"})
} }
} },
// 显示提示蒙版
showMaskTip() {
this.showMask = true
},
} }
} }
</script> </script>
......
...@@ -93,6 +93,12 @@ ...@@ -93,6 +93,12 @@
</view> </view>
<!-- 悬浮按钮 --> <!-- 悬浮按钮 -->
<!-- <EusingList type="collapse" /> --> <!-- <EusingList type="collapse" /> -->
<MaskTip
:show="showMask"
imageName="mengceng1.png"
:imageStyle="imageStyle"
name="today_tip"
/>
</TabBarPage> </TabBarPage>
</template> </template>
...@@ -101,6 +107,8 @@ import TabBarPage from '@/components/tabBarList/index.vue' ...@@ -101,6 +107,8 @@ import TabBarPage from '@/components/tabBarList/index.vue'
import OrderCell from '@/components/order/index.vue' import OrderCell from '@/components/order/index.vue'
import NoOrder from '@/components/order/noOrder.vue' import NoOrder from '@/components/order/noOrder.vue'
import upload from '@/components/upload/task.js' import upload from '@/components/upload/task.js'
import MaskTip from '@/components/mask-tip/index.vue'
// import EusingList from '@/components/order/eusingList.vue' // import EusingList from '@/components/order/eusingList.vue'
export default { export default {
...@@ -108,6 +116,7 @@ export default { ...@@ -108,6 +116,7 @@ export default {
TabBarPage, TabBarPage,
OrderCell, OrderCell,
NoOrder, NoOrder,
MaskTip,
// EusingList, // EusingList,
}, },
data() { data() {
...@@ -171,6 +180,7 @@ export default { ...@@ -171,6 +180,7 @@ export default {
old: { old: {
scrollTop: 0, scrollTop: 0,
}, },
showMask: false,
} }
}, },
computed: { computed: {
...@@ -281,6 +291,9 @@ export default { ...@@ -281,6 +291,9 @@ export default {
noOrderCustomStyle() { noOrderCustomStyle() {
return 'margin-top: 100rpx;background-color: #F4F5F7' return 'margin-top: 100rpx;background-color: #F4F5F7'
}, },
imageStyle() {
return 'width:546rpx; margin-top:80rpx; margin-left:100rpx'
}
}, },
onLoad(e) { onLoad(e) {
getApp().trackPage('订单首页') getApp().trackPage('订单首页')
...@@ -292,6 +305,7 @@ export default { ...@@ -292,6 +305,7 @@ export default {
this.indexStatus[this.curNow].indexOf(e.type) this.indexStatus[this.curNow].indexOf(e.type)
) )
} }
this.showMaskTip()
}, },
onShow() { onShow() {
if (this.uploadTask.length > 0) { if (this.uploadTask.length > 0) {
...@@ -488,6 +502,10 @@ export default { ...@@ -488,6 +502,10 @@ export default {
this.scrollTop = 0 this.scrollTop = 0
}) })
}, },
// 显示提示蒙版
showMaskTip() {
this.showMask = true
},
}, },
} }
</script> </script>
......
...@@ -51,6 +51,12 @@ ...@@ -51,6 +51,12 @@
</view> </view>
</view> </view>
</view> </view>
<MaskTip
:show="showMask"
imageName="mengceng5.png"
:imageStyle="imageStyle"
name="settlement_tip"
/>
</view> </view>
</template> </template>
...@@ -58,9 +64,12 @@ ...@@ -58,9 +64,12 @@
let now = new Date(new Date().toLocaleDateString()).getTime(); let now = new Date(new Date().toLocaleDateString()).getTime();
import util from '@/utils/util.js' import util from '@/utils/util.js'
import Statement from "@/components/mine/statement.vue" import Statement from "@/components/mine/statement.vue"
import MaskTip from '@/components/mask-tip/index.vue'
export default { export default {
components: { components: {
Statement Statement,
MaskTip
}, },
data() { data() {
return { return {
...@@ -74,6 +83,7 @@ ...@@ -74,6 +83,7 @@
loading: true, loading: true,
statementList: [], statementList: [],
settledAmount: 0, settledAmount: 0,
showMask: false,
} }
}, },
computed: { computed: {
...@@ -122,10 +132,14 @@ ...@@ -122,10 +132,14 @@
}, },
pages() { pages() {
return ['settlement','statement'] return ['settlement','statement']
},
imageStyle() {
return 'width:690rpx; margin-top:542rpx; margin-left:30rpx'
} }
}, },
onLoad() { onLoad() {
getApp().trackPage('我的钱包页') getApp().trackPage('我的钱包页')
this.showMaskTip()
}, },
onShow() { onShow() {
// 未登录,先跳转登录 // 未登录,先跳转登录
...@@ -183,6 +197,10 @@ ...@@ -183,6 +197,10 @@
} }
} }
}, },
// 显示提示蒙版
showMaskTip() {
this.showMask = true
},
} }
} }
</script> </script>
......
...@@ -20,8 +20,7 @@ ...@@ -20,8 +20,7 @@
<view class="tab-view"> <view class="tab-view">
<scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="reachBottom" scroll-anchoring <scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="reachBottom" scroll-anchoring
refresher-enabled="true" :refresher-triggered="triggered" :refresher-threshold="100" @scroll="scroll" refresher-enabled="true" :refresher-triggered="triggered" :refresher-threshold="100" @scroll="scroll"
:scroll-top="scrollTop" refresher-background="#F4F5F7" refresher-background="#F4F5F7" @refresherrefresh="onRefresh" @refresherrestore="onRestore" enable-back-to-top>
@refresherrefresh="onRefresh" @refresherrestore="onRestore" enable-back-to-top>
<!-- 加载中 && 没有下拉:显示加载中 --> <!-- 加载中 && 没有下拉:显示加载中 -->
<view class="loading-view" v-if="!loaded && _freshing"> <view class="loading-view" v-if="!loaded && _freshing">
<u-loading mode="flower"></u-loading> <u-loading mode="flower"></u-loading>
...@@ -35,7 +34,7 @@ ...@@ -35,7 +34,7 @@
<AppliedCell @operate="handleOperate" :info="item" @action="handleClickCell" @express="handleClickExpress"></AppliedCell> <AppliedCell @operate="handleOperate" :info="item" @action="handleClickCell" @express="handleClickExpress"></AppliedCell>
</view> </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" <u-loadmore :status="loadStatus"
bgColor="#F4F5F7"></u-loadmore> bgColor="#F4F5F7"></u-loadmore>
</view> </view>
...@@ -79,11 +78,11 @@ ...@@ -79,11 +78,11 @@
computed: { computed: {
// 不传值 全部;待签收 15;待发货 10;待审核 1;已驳回 -2;已签收 20;已取消 -1; // 不传值 全部;待签收 15;待发货 10;待审核 1;已驳回 -2;已签收 20;已取消 -1;
list() { list() {
return [{ return [
'name': '全部', {
'status': null 'name': '待签收',
'status': 15
}, },
{ {
'name': '待审核', 'name': '待审核',
'status': 1 'status': 1
...@@ -93,13 +92,13 @@ ...@@ -93,13 +92,13 @@
'status': 10 'status': 10
}, },
{ {
'name': '待签收', 'name': '已取消',
'status': 15 'status': -1
},
{
'name': '全部',
'status': null
}, },
// {
// 'name': '已签收',
// 'status': 20
// }
] ]
}, },
// 当下tab // 当下tab
......
...@@ -11,17 +11,16 @@ ...@@ -11,17 +11,16 @@
</view> </view>
<NoOrder v-if="noParts" imageName="wupeijianxinxi.png" text="当前暂无返件信息" :customStyle="noPartsCustomStyle" /> <NoOrder v-if="noParts" imageName="wupeijianxinxi.png" text="当前暂无返件信息" :customStyle="noPartsCustomStyle" />
<view v-else class="tab-view"> <view v-else class="tab-view">
<scroll-view scroll-y style="height: 100%;width: 100%;" scroll-anchoring enable-back-to-top> <scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="reachBottom" scroll-anchoring enable-back-to-top>
<view class="loading-view" v-if="!loaded"> <view class="loading-view" v-if="!loaded">
<u-loading mode="flower"></u-loading> <u-loading mode="flower"></u-loading>
</view> </view>
<template v-else> <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> <ReturnCell :info="item"></ReturnCell>
</view> </view>
<view class="load-more-view"> <view class="load-more-view" v-if="(pageNumber == 1 && loaded) || pageNumber > 1">
<u-loadmore v-show="(pageNumber == 1 && loaded) || pageNumber > 1" :status="loadStatus" <u-loadmore :status="loadStatus" bgColor="#F4F5F7"></u-loadmore>
bgColor="#F4F5F7"></u-loadmore>
</view> </view>
</template> </template>
</scroll-view> </scroll-view>
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
</view> </view>
<!-- 物料列表 --> <!-- 物料列表 -->
<view class="tab-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"> <view class="loading-view" v-if="!loaded">
<u-loading mode="flower"></u-loading> <u-loading mode="flower"></u-loading>
...@@ -37,9 +37,8 @@ ...@@ -37,9 +37,8 @@
@change="handleChange($event, index)"@numChange="handleNumChange($event, index)" /> @change="handleChange($event, index)"@numChange="handleNumChange($event, index)" />
</view> </view>
<!-- 底部加载状态 --> <!-- 底部加载状态 -->
<view class="load-more-view"> <view class="load-more-view" v-if="partsList.length > 0">
<u-loadmore v-show="partsList.length > 0" status="nomore" bgColor="#F4F5F7"> <u-loadmore status="nomore" bgColor="#F4F5F7"></u-loadmore>
</u-loadmore>
</view> </view>
</template> </template>
</scroll-view> </scroll-view>
...@@ -170,7 +169,7 @@ ...@@ -170,7 +169,7 @@
} }
this.searchedKeyword = this.keyword this.searchedKeyword = this.keyword
this.$u.api.reserveList(param).then((res) => { this.$u.api.getMyReserve(param).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.partsList = [] this.partsList = []
let list = res.data || [] let list = res.data || []
...@@ -207,7 +206,6 @@ ...@@ -207,7 +206,6 @@
} }
}, },
allSelect(value) { // 底部勾选全选 allSelect(value) { // 底部勾选全选
console.log(value)
for (var item of this.partsList) { for (var item of this.partsList) {
item.selected = value item.selected = value
item.quantity = value ? item.stock : 0 item.quantity = value ? item.stock : 0
......
This diff is collapsed.
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<!-- <text class="rightContent u-m-t-14 u-m-l-30 u-p-b-30">{{item.describe}}</text> --> <!-- <text class="rightContent u-m-t-14 u-m-l-30 u-p-b-30">{{item.describe}}</text> -->
</view> </view>
<view class="rightImageView" v-if="item.orderImages && item.orderImages.length > 0"> <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"> :key="index" @tap.stop="handleClickImage(item, index)" width="116" height="116">
<view slot="error" style="font-size: 24rpx;">上传中</view> <view slot="error" style="font-size: 24rpx;">上传中</view>
</u-image> </u-image>
......
...@@ -12,7 +12,7 @@ try { ...@@ -12,7 +12,7 @@ try {
} }
// 需要永久存储,且下次APP启动需要取出的,在state中的变量名 // 需要永久存储,且下次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) { const saveLifeData = function(key, value) {
...@@ -50,6 +50,8 @@ const store = new Vuex.Store({ ...@@ -50,6 +50,8 @@ const store = new Vuex.Store({
uploadTotal: lifeData.uploadTotal ? lifeData.uploadTotal : 0, uploadTotal: lifeData.uploadTotal ? lifeData.uploadTotal : 0,
// 已上传数量 // 已上传数量
uploadSuccess: lifeData.uploadSuccess ? lifeData.uploadSuccess : 0, uploadSuccess: lifeData.uploadSuccess ? lifeData.uploadSuccess : 0,
// 初次登录
vuex_not_first: lifeData.vuex_not_first ? lifeData.vuex_not_first : {},
}, },
mutations: { mutations: {
$uStore(state, payload) { $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