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;
......
<template>
<view class="upload-progress">
<view :class="['u-flex', 'suspension', {'error': uploadStatus === 3, 'no-active': clicked <= 0}]" @click="openpRrogress">
<view class="upload-progress">
<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="upload-img" v-else>
<image class="icon" :src="icon"></image>
</view>
</view>
<u-popup
v-model="open"
border-radius="12"
mode="center"
<u-popup
v-model="open"
border-radius="12"
mode="center"
:animation="false"
@close="closePopup"
width="690rpx">
<view class="slot-content">
width="690rpx"
>
<view class="slot-content">
<view class="upload-title">
<text class='status-txt'>图片上传进度</text>
<text class="status-txt">图片上传进度</text>
</view>
<view v-if="taskCount > 0">
<view class="progress-circle">
<u-loading class="loading" 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-loading
class="loading"
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>
</view>
<view class="u-flex upload-data">
<view class="u-flex">
<view class="title">需上传</view>
......@@ -38,12 +69,16 @@
</view>
<view class="u-flex">
<view class="title">状态</view>
<view :class="['status', {'error': uploadStatus === 3}]">{{ uploadStatusName }}</view>
<view :class="['status', { error: uploadStatus === 3 }]">{{
uploadStatusName
}}</view>
</view>
</view>
<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>
......@@ -51,227 +86,326 @@
<view><image class="default-img" :src="defaultImg"></image></view>
<view class="text">当前暂无上传图片</view>
</view>
</view>
</u-popup>
</view>
</u-popup>
</view>
</template>
<script>
/**
* upload-progress 图片上传进度
*/
import upload from '@/components/upload/task.js'
export default {
name:"upload-progress",
data() {
return {
open: false,
progressStatus: false,
clicked: 1
}
},
computed: {
icon() {
console.log(process.uniEnv.qn_base_url + 'upload-photo.png')
return process.uniEnv.qn_base_url + 'upload-photo.png'
},
defaultImg() {
return process.uniEnv.qn_base_url + 'upload-default.png'
},
taskCount() {
return this.uploadTotal
},
uploadStatusName() {
let status
switch (this.uploadStatus) {
case 1:
status = '等待上传'
break;
case 2:
status = '上传中'
break;
case 3:
status = '上传中断'
break;
}
return status
},
progressColor() {
return this.uploadStatus === 3 ? '#FA5A49' : '#2272FF'
},
uploadPercentage() {
const num = this.uploadSuccess
const total = this.uploadTotal
return total > 0 ? Math.floor(Math.round(num / total * 10000) / 100.00) : 0
},
/**
* upload-progress 图片上传进度
*/
import upload from '@/components/upload/task.js'
const sys = uni.getSystemInfoSync()
export default {
name: 'upload-progress',
props: {
// 是否启用自动停靠
isDock: {
type: Boolean,
default: false,
},
watch: {
uploadStatus(newValue) {
this.progressStatus = false
this.$nextTick(() => {
this.progressStatus = true
})
},
open(val) {
if (val == false) {
this.changeActive()
}
},
},
created() {
this.changeActive()
},
methods: {
closePopup() {
this.progressStatus = false
},
openpRrogress() {
this.clicked += 1
this.open = true
this.progressStatus = false
setTimeout(() => {
this.progressStatus = true
}, 300)
},
retry() {
if(this.uploadStatus !== 2) upload.uploadImageTask(this)
},
changeActive() {
setTimeout(() => {
// 三秒不点击,算失去活跃
this.clicked = Math.max(0, this.clicked - 1)
}, 3000)
}
// 当前页面是否包含tabbar
existTabBar: {
type: Boolean,
default: false,
},
},
data() {
return {
open: false,
progressStatus: false,
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: {
icon() {
console.log(process.uniEnv.qn_base_url + 'upload-photo.png')
return process.uniEnv.qn_base_url + 'upload-photo.png'
},
defaultImg() {
return process.uniEnv.qn_base_url + 'upload-default.png'
},
taskCount() {
return this.uploadTotal
},
uploadStatusName() {
let status
switch (this.uploadStatus) {
case 1:
status = '等待上传'
break
case 2:
status = '上传中'
break
case 3:
status = '上传中断'
break
}
return status
},
progressColor() {
return this.uploadStatus === 3 ? '#FA5A49' : '#2272FF'
},
uploadPercentage() {
const num = this.uploadSuccess
const total = this.uploadTotal
return total > 0
? Math.floor(Math.round((num / total) * 10000) / 100.0)
: 0
},
},
watch: {
uploadStatus(newValue) {
this.progressStatus = false
this.$nextTick(() => {
this.progressStatus = true
})
},
open(val) {
if (val == false) {
this.changeActive()
}
},
},
created() {
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: {
closePopup() {
this.progressStatus = false
},
openpRrogress() {
this.clicked += 1
this.open = true
this.progressStatus = false
setTimeout(() => {
this.progressStatus = true
}, 300)
},
retry() {
if (this.uploadStatus !== 2) upload.uploadImageTask(this)
},
changeActive() {
setTimeout(() => {
// 三秒不点击,算失去活跃
this.clicked = Math.max(0, this.clicked - 1)
}, 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>
<style lang="scss">
.upload-progress {
width: 100%;
height: 100%;
.suspension {
position: fixed;
right: 20rpx;
bottom: 20%;
width: 80rpx;
height: 80rpx;
border-radius: 50%;
background: #2272FF;
z-index: 999;
opacity: 1;
&.error {
background: #FA5A49;
}
&.no-active {
opacity: 0.6;
}
.progress {
font-size: 24rpx;
color: #fff;
width: 100%;
text-align: center;
.upload-progress {
width: 100%;
height: 100%;
.suspension {
position: fixed;
width: 80rpx;
height: 80rpx;
border-radius: 50%;
background: #2272ff;
z-index: 999;
opacity: 1;
&.error {
background: #fa5a49;
}
&.no-active {
opacity: 0.6;
}
.progress {
font-size: 24rpx;
color: #fff;
width: 100%;
text-align: center;
}
.upload-img {
width: 100%;
text-align: center;
padding-top: 8rpx;
.icon {
width: 36rpx;
height: 32rpx;
}
.upload-img {
width: 100%;
text-align: center;
padding-top: 8rpx;
.icon {
width: 36rpx;
height: 32rpx;
}
}
.slot-content {
padding: 40rpx 30rpx 30rpx 30rpx;
.upload-title {
margin: 20rpx 0 50rpx 0;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.status-txt {
height: 46rpx;
font-size: 40rpx;
font-weight: bold;
color: #333;
line-height: 46rpx;
}
}
.progress-circle {
width: 100%;
height: 320rpx;
text-align: center;
.loading {
line-height: 320rpx;
}
.u-progress-content {
color: #2272ff;
font-size: 60rpx;
&.error {
color: #fa5a49;
}
}
}
.slot-content {
padding: 40rpx 30rpx 30rpx 30rpx;
.upload-title {
margin: 20rpx 0 50rpx 0;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.status-txt {
height: 46rpx;
font-size: 40rpx;
font-weight: bold;
.upload-data {
margin: 50rpx 0 30rpx 0;
.u-flex {
flex-flow: column;
font-size: 48rpx;
width: 210rpx;
height: 120rpx;
.title {
color: #666;
font-size: 28rpx;
padding-bottom: 20rpx;
}
.pending {
color: #333;
line-height: 46rpx;
}
}
.progress-circle {
width: 100%;
height: 320rpx;
text-align: center;
.loading {
line-height: 320rpx;
.resolve {
color: #2272ff;
}
.u-progress-content {
color: #2272FF;
font-size: 60rpx;
.status {
color: #2272ff;
font-size: 36rpx;
&.error {
color: #FA5A49;
color: #fa5a49;
}
}
}
.upload-data {
margin: 50rpx 0 30rpx 0;
.u-flex {
flex-flow: column;
font-size: 48rpx;
width: 210rpx;
height: 120rpx;
.title {
color: #666;
font-size: 28rpx;
padding-bottom: 20rpx;
}
.pending {
color: #333;
}
.resolve {
color: #2272FF;
}
.status {
color: #2272FF;
font-size: 36rpx;
&.error {
color: #FA5A49;
}
}
}
}
.upload-bottom {
display: flex;
justify-content: center;
align-items: center;
.button {
text-align: center;
height: 104rpx;
width: 300rpx;
border-radius: 52rpx;
font-size: 32rpx;
font-weight: 600;
line-height: 104rpx;
}
.upload-bottom {
display: flex;
justify-content: center;
align-items: center;
.button {
text-align: center;
height: 104rpx;
width: 300rpx;
border-radius: 52rpx;
font-size: 32rpx;
font-weight: 600;
line-height: 104rpx;
}
.confirm {
margin: 36rpx 30rpx 52rpx 15rpx;
background: #2272FF;
color: #FFFFFF;
}
.confirm {
margin: 36rpx 30rpx 52rpx 15rpx;
background: #2272ff;
color: #ffffff;
}
.default {
flex-flow: column;
margin: 150rpx 0;
.default-img {
width: 360rpx;
height: 240rpx;
}
.text {
color: #666;
font-size: 28rpx;
margin-top: 50rpx;
}
}
.default {
flex-flow: column;
margin: 150rpx 0;
.default-img {
width: 360rpx;
height: 240rpx;
}
.text {
color: #666;
font-size: 28rpx;
margin-top: 50rpx;
}
}
}
}
</style>
......@@ -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
......
......@@ -39,6 +39,7 @@
style="height: 100%"
scroll-y
scroll-with-animation
scroll-anchoring
class="right-box"
@scroll="rightScroll"
:scroll-into-view="itemId"
......@@ -63,9 +64,7 @@
:prop="item.fieldsName"
:border-bottom="false"
v-show="
((item.fieldsName != 'actualPaid' &&
item.fieldsName != 'eSerialNum') ||
show200) &&
checkFields(item.fieldsName) &&
((readOnly &&
!$u.test.isEmpty(form[item.fieldsName])) ||
!readOnly)
......@@ -97,7 +96,7 @@
>
</xh-input>
<xh-multi-input
v-else-if="item.formType === 'multiinput'"
v-if="item.formType === 'multiinput'"
:groupIndex="groupIndex"
:itemIndex="itemIndex"
:item="item"
......@@ -107,7 +106,7 @@
>
</xh-multi-input>
<xh-radio
v-else-if="item.formType === 'radio'"
v-if="item.formType === 'radio'"
:groupIndex="groupIndex"
:itemIndex="itemIndex"
:item="item"
......@@ -117,7 +116,7 @@
>
</xh-radio>
<xh-checkbox
v-else-if="item.formType === 'checkbox'"
v-if="item.formType === 'checkbox'"
:groupIndex="groupIndex"
:itemIndex="itemIndex"
:item="item"
......@@ -127,7 +126,7 @@
>
</xh-checkbox>
<xh-select
v-else-if="item.formType === 'select'"
v-if="item.formType === 'select'"
:groupIndex="groupIndex"
:itemIndex="itemIndex"
:item="item"
......@@ -137,7 +136,7 @@
>
</xh-select>
<xh-specifications
v-else-if="item.formType === 'select-new-page'"
v-if="item.formType === 'select-new-page'"
:groupIndex="groupIndex"
:itemIndex="itemIndex"
:item="item"
......@@ -146,7 +145,7 @@
@value-change="fieldValueChange"
>
</xh-specifications>
<view v-else-if="item.formType === 'file'">
<view v-if="item.formType === 'file'">
<xh-files
:ref="`fileChild${groupIndex}${itemIndex}`"
:groupIndex="groupIndex"
......@@ -180,7 +179,7 @@
</view>
<xh-location
v-else-if="item.formType === 'location'"
v-if="item.formType === 'location'"
:groupIndex="groupIndex"
:itemIndex="itemIndex"
:item="item"
......@@ -190,7 +189,7 @@
>
</xh-location>
<xh-scan
v-else-if="item.formType === 'scan'"
v-if="item.formType === 'scan'"
:groupIndex="groupIndex"
:itemIndex="itemIndex"
:item="item"
......@@ -200,7 +199,7 @@
>
</xh-scan>
<xh-service-measure
v-else-if="item.formType === 'servicemeasure'"
v-if="item.formType === 'servicemeasure'"
:groupIndex="groupIndex"
:itemIndex="itemIndex"
:item="item"
......@@ -214,7 +213,7 @@
>
</xh-service-measure>
<xh-time
v-else-if="item.formType === 'time'"
v-if="item.formType === 'time'"
:groupIndex="groupIndex"
:itemIndex="itemIndex"
:item="item"
......@@ -224,7 +223,7 @@
>
</xh-time>
<xh-service-more
v-else-if="item.formType === 'form'"
v-if="item.formType === 'form'"
:groupIndex="groupIndex"
:itemIndex="itemIndex"
:item="item"
......@@ -235,7 +234,7 @@
>
</xh-service-more>
<xh-label
v-else-if="item.formType === 'label'"
v-if="item.formType === 'label'"
:groupIndex="groupIndex"
:itemIndex="itemIndex"
:item="item"
......@@ -244,7 +243,7 @@
</xh-label>
<xh-parts
ref="fileChildParts"
v-else-if="item.formType === 'parts'"
v-if="item.formType === 'parts'"
:categoryId="categoryId"
:brandId="brandId"
:order-id="orderId"
......@@ -332,13 +331,11 @@ import XhLocation from '@/components/createCom/XhLocation.vue'
import XhScan from '@/components/createCom/XhScan.vue'
import XhTime from '@/components/createCom/XhTime.vue'
import XhServiceMeasure from '@/components/createCom/XhServiceMeasure.vue'
import XhServiceMore from '../../components/createCom/XhServiceMore'
import XhLabel from '../../components/createCom/XhLabel'
import XhServiceMore from '@/components/createCom/XhServiceMore'
import XhLabel from '@/components/createCom/XhLabel'
import XhParts from '@/components/createCom/XhParts'
import takePhoto from '@/components/take/index.vue'
import baseFile from '@/components/upload/index'
import Detail from '@/components/order/detail.vue'
import returnPartsVue from '../parts/returnParts.vue'
// 表单类型map
const formType = new Map([
......@@ -443,6 +440,24 @@ const actions = (name, pass, type, submit) => {
}
}
const fields = {
'paymentMethodsType': { // 基本信息-不需要收款
fieldsName: ['actualPaid', 'eSerialNum'],
value: '03'
},
'usePart': { // 维修工单-是否使用配件
fieldsName: ['partName'],
value: '02'
},
'getMoney': { // 维修工单-是否收款
fieldsName: ['feeValue', 'feeProject'],
value: '02'
}
}
const fieldsNameArr = Object.values(fields).map(v => v.fieldsName).reduce((acc, cur) => [...acc, ...cur], [])
export default {
data() {
return {
......@@ -468,9 +483,7 @@ export default {
arr: [],
scrollRightTop: 0, // 右边栏目scroll-view的滚动条高度
timer: null, // 定时器
form: {
// 一维表单
},
form: {},
submitBtnStatus: false,
completeCheck: {
status: false,
......@@ -517,13 +530,9 @@ export default {
XhServiceMore,
XhLabel,
XhParts,
Detail,
'take-photo': takePhoto,
},
mixins: [baseFile],
created() {
// console.log(allComponents,'allComponents')
},
onLoad(option) {
getApp().trackPage('订单完工信息页')
if (option) {
......@@ -539,12 +548,6 @@ export default {
this.auditResults = option?.auditResults
? option?.auditResults.split(',')
: []
// this.showTab =item.partnerCompanyName == '挚达充电桩'
} else {
this.orderId = 11880091
this.categoryId = 1100000214
this.orderServiceType = '安装'
this.inGuaranteePeriod = 'Y'
}
this.getCompleteData()
},
......@@ -619,6 +622,17 @@ export default {
},
},
methods: {
checkFields(name) {
let status = true
if (fieldsNameArr.includes(name)) {
Object.entries(fields).forEach(v => {
if (v[1].fieldsName.includes(name)) {
status = this.form[v[0]] ? this.form[v[0]] !== v[1].value : false
}
})
}
return status
},
getCompleteData() {
//获取工单配置的完工项目
uni.showLoading({
......@@ -639,9 +653,11 @@ export default {
},
initData(res) {
this.form = res.data.value || {}
this.initFormData()
const list = res.data.config.sort((a, b) => a.order - b.order)
this.loadOrderDetail()
const data = Object.create(res.data.config, {})
const list = data.sort((a, b) => a.order - b.order)
if (this.readOnly) this.tabIndex = 0
list.forEach((item, index) => {
if (this.maintainStep === item.panelFieldsName && !this.readOnly) {
this.tabIndex = index
......@@ -652,16 +668,8 @@ export default {
const formMap = formType.get(type) || formType.get('text')
d.formType = formMap[0]
d.inputType = formMap[1]
if (d.fieldsName === 'actualPaid' && res.data.value) {
d.required = res.data.value['paymentMethodsType']
? res.data.value['paymentMethodsType'] != '03'
: false
}
if (d.fieldsName === 'eSerialNum' && res.data.value) {
d.required = res.data.value['paymentMethodsType']
? res.data.value['paymentMethodsType'] != '03'
: false
}
d.required = this.checkFields(d.fieldsName)
if (d.fieldsName === 'pipe' || d.fieldsName === 'pipeUseLength') {
// 申请费用计算
this.calcMoney()
......@@ -689,13 +697,10 @@ export default {
}
this.checkCompleteError(list)
} else {
this.list = list
this.list = Object.freeze(list)
}
uni.hideLoading()
},
initFormData() {
this.loadOrderDetail()
},
loadOrderDetail() {
if (
!this.$u.test.isEmpty(this.form) &&
......@@ -764,7 +769,7 @@ export default {
panelName: '异常处理',
items: result,
}
this.list = list
this.list = Object.freeze(list)
this.tabIndex = index
},
......@@ -1141,17 +1146,13 @@ export default {
}
}
if (innerItem.fieldsName === 'paymentMethodsType') {
// 选不需要收款的时候,收款金额修改为非必选
const actualPaid = groupItem.items.find(
(v) => v.fieldsName === 'actualPaid'
)
if (actualPaid) actualPaid.required = data.value != '03'
const eSerialNum = groupItem.items.find(
(v) => v.fieldsName === 'eSerialNum'
)
if (eSerialNum) eSerialNum.required = data.value != '03'
// 根据选择的值隐藏对应的项
if (fields[innerItem.fieldsName]) {
groupItem.items.forEach(c => {
if (fields[innerItem.fieldsName]['fieldsName'].includes(c.fieldsName)) {
c.required = data.value !== fields[innerItem.fieldsName]['value']
}
})
}
if (
......@@ -1337,7 +1338,7 @@ export default {
return
}
}
}, 10)
}, 100)
},
handleTouchstart() {
// 防止输入光标滚动出现错乱
......
......@@ -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