Commit 0775e789 authored by Morson's avatar Morson
parents fa6c0184 b1758b2a
...@@ -104,14 +104,14 @@ ...@@ -104,14 +104,14 @@
setValue() { setValue() {
const dataValue = [] const dataValue = []
this.imgList.map(item=>{ this.imgList.map(item=>{
dataValue.push(item.src) dataValue.push(item.path)
}) })
this.valueChange(dataValue) this.valueChange(dataValue)
}, },
closeTake(val) { closeTake(val) {
if(val && val.length > 0){ if(val && val.length > 0){
val.forEach((item,index,array)=>{ val.forEach((item,index,array)=>{
item.path = item.src item.path = item.key
this.imgList.push(item) this.imgList.push(item)
}) })
this.setValue() this.setValue()
......
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
<view class="wrap"> <view class="wrap">
<swiper class="swiper-box" :current="swiperCurrent" @transition="transition" <swiper class="swiper-box" :current="swiperCurrent" @transition="transition"
@animationfinish="animationfinish"> @animationfinish="animationfinish">
<swiper-item class="swiper-item" v-if="currentItem.main_point && currentItem.main_point.length > 0"> <swiper-item class="swiper-item" v-if="currentItem.mainPoint && currentItem.mainPoint.length > 0">
<view class="inner txt-inner" :style="{'background-image':'url(/static/photo/shadow-bg.png)'}"> <view class="inner txt-inner" :style="{'background-image':'url(/static/photo/shadow-bg.png)'}">
<view class="title"> <view class="title">
拍照要求 拍照要求
</view> </view>
<view class="txt-box" > <view class="txt-box" >
<view class="txt" v-for="(txt,index) in currentItem.main_point" :key="index"> <view class="txt" v-for="(txt,index) in currentItem.mainPoint" :key="index">
{{index+1}}. {{txt}} {{index+1}}. {{txt}}
</view> </view>
<view class="txt tips" v-if="currentItem.note"> <view class="txt tips" v-if="currentItem.note">
......
<template> <template>
<view> <view class="mine-view">
<u-navbar v-if="!takeStatus" :is-back="false" :title-size="26" title-color="#000" title="我的"></u-navbar> <image class="header-image" mode="widthFix" :src="imageUrl + 'wodebeijing.png'"></image>
<view v-if="!takeStatus"> <u-navbar :is-back="false" :background="{ background: 'transparent' }" :border-bottom="false">
<view class="u-flex user-box u-p-l-30 u-p-r-20 u-p-b-30"> <text class="title-view">我的</text>
<view class="u-m-r-10"> </u-navbar>
<u-avatar :src="pic" size="140"></u-avatar> <view class="mine-content">
<view class="header-view">
<view class="head-image">
<u-avatar :src="headImageUrl" size="142" mode="circle"></u-avatar>
</view>
<view class="header-content">
<view class="name-view">{{name}}</view>
<view :class="['tel-view', {'active': info.tel}]">
<text>{{tel}}</text>
<icon name="arrow-left-fill"></icon>
</view> </view>
<view class="u-flex-1">
<view class="u-font-18 u-p-b-20">uView ui</view>
<view class="u-font-14 u-tips-color">微信号:helang_uView</view>
</view> </view>
</view> </view>
<view class="u-m-t-20"> <view class="list-view">
<u-cell-group> <u-cell-group>
<u-cell-item v-for="(item, index) in items" :title="item.title" :value="item.value" :key="index"> <view v-for="(item, index) in items" :key="index">
<u-icon slot="icon" size="32" name="search"></u-icon> <u-cell-item :value="item.value" :border-bottom="false" @click="handleClick(index)">
<image slot="icon" :src="imageUrl + item.icon" :style="item.imageStyle"></image>
<view slot="title" class="item-title">{{item.title}}</view>
<view slot="value" class="item-value">{{value}}</view>
</u-cell-item> </u-cell-item>
</u-cell-group> <view v-if="index == 3" class="line-view"></view>
</view> </view>
<view class="u-m-t-20">
<u-cell-group>
<u-cell-item icon="setting" title="设置"></u-cell-item>
</u-cell-group> </u-cell-group>
</view> </view>
<view class="u-m-t-20" @click="take"> <view class="u-m-t-20" @click="take">
...@@ -43,8 +48,10 @@ ...@@ -43,8 +48,10 @@
}, },
data() { data() {
return { return {
pic:'https://uviewui.com/common/logo.png', serviceTel: '0755-81773817',
show:true, info: {},
pic: 'https://uviewui.com/common/logo.png',
show: true,
takeStatus: false, takeStatus: false,
testData: { testData: {
_id: '1', // 规格ID _id: '1', // 规格ID
...@@ -62,20 +69,78 @@ ...@@ -62,20 +69,78 @@
}, },
computed: { computed: {
items() { items() {
return [ return [{
{title: '我的钱包', value: '', icon: ''}, title: '我的钱包',
{title: '我的质保金', value: '', icon: ''}, value: '',
{title: '我的合同', value: '', icon: ''}, icon: 'qianbao.png',
{title: '我的证件', value: '', icon: ''}, imageStyle: 'width:34rpx;height:32rpx'
{title: '我的收货地址', value: '', icon: ''}, },
{title: '我的仓库', value: '', icon: ''}, {
{title: '联系客服', value: '6666666', icon: ''}] title: '配件押金',
value: '',
icon: 'yajin.png',
imageStyle: 'width:32rpx;height:32rpx'
},
{
title: '我的合同',
value: '',
icon: 'hetong.png',
imageStyle: 'width:34rpx;height:32rpx'
},
{
title: '我的证件',
value: '',
icon: 'zhengjian.png',
imageStyle: 'width:36rpx;height:28rpx'
},
{
title: '收货地址',
value: '',
icon: 'wddizhi.png',
imageStyle: 'width:32rpx;height:32rpx'
},
{
title: '我的仓库',
value: '',
icon: 'cangku.png',
imageStyle: 'width:36rpx;height:32rpx'
},
{
title: '联系客服',
value: this.serviceTel,
icon: 'lxkefu.png',
imageStyle: 'width:32rpx;height:32rpx'
}
]
},
name() {
return this.info.name || '点击登录'
},
tel() {
return this.info.tel ? '已绑定手机号' : '绑定手机号'
},
imageUrl() {
return process.uniEnv.qn_base_url
},
pages() {
return ['', '', '', '', 'address', '', '']
},
headImageUrl() {
return this.info.headImage || this.placeholderImage
},
placeholderImage() {
return this.imageUrl + 'touxiang.png'
} }
}, },
onLoad() { onLoad() {
}, },
methods: { methods: {
handleClick(index) {
uni.navigateTo({
url: 'pages/mine/' + this.pages[index]
})
},
take() { take() {
uni.hideTabBar() uni.hideTabBar()
this.takeStatus = true this.takeStatus = true
...@@ -89,6 +154,76 @@ ...@@ -89,6 +154,76 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.mine-view {
position: relative;
</style> .header-image {
position: absolute;
width: 100%;
}
.title-view {
color: #FFFFFF;
font-weight: bold;
font-size: 40rpx;
padding-left: 30rpx;
}
.mine-content {
background-color: #F4F5F7;
.header-view {
padding: 30rpx;
display: flex;
.head-image {
width: 142rpx;
height: 142rpx;
}
.header-content {
color: #FFFFFF;
z-index: 0;
.name-view {
}
.tel-view {
background-color: #FFFFFF;
border-radius: 26rpx;
color: #2272FF;
width: 164rpx;
height: 52rpx;
&.active {
color: #FFFFFF;
border: 1rpx bold #FFFFFF;
}
}
}
}
.list-view {
background-color: #FFFFFF;
border-radius: 16rpx 16rpx 0 0;
.item-title {
font-size: 32rpx;
color: #333333;
margin-left: 16rpx;
line-height: 32rpx;
}
.item-value {
font-size: 26rpx;
color: #999999;
}
.line-view {
height: 2rpx;
background-color: #F4F5F7;
margin-top: 30rpx;
margin-bottom: 30rpx;
}
}
}
}
</style>
...@@ -22,9 +22,9 @@ ...@@ -22,9 +22,9 @@
<view class="class-item" :key="groupIndex" v-show="current == groupIndex"> <view class="class-item" :key="groupIndex" v-show="current == groupIndex">
<view class="title" v-if="groupItem.name !== '基本信息'">{{groupItem.name}}</view> <view class="title" v-if="groupItem.name !== '基本信息'">{{groupItem.name}}</view>
<view class="class-bd"> <view class="class-bd">
<u-form-item v-for="(item,itemIndex) in groupItem.items" :key="itemIndex" v-if="typeToComponentType(item.fieldsType)!=='location'" <u-form-item v-for="(item,itemIndex) in groupItem.items" :key="itemIndex" label-position="top"
label-position="top" :prop="item.fieldsName" :border-bottom="false" v-show="item.fieldsId != 200 || show200"> :prop="item.fieldsName" :border-bottom="false" v-show="item.fieldsId != 200 || show200">
<view :class="[{'label-bold': groupItem.name === '基本信息'}, 'label']"> <view :class="[{'label-bold': groupItem.name === '基本信息'}, 'label']" v-if="typeToComponentType(item.fieldsType)!=='location'">
<image class="item-image" :src="mixingImage" v-if="item.required"></image> <image class="item-image" :src="mixingImage" v-if="item.required"></image>
{{item.fieldsTitle}} {{item.fieldsTitle}}
</view> </view>
...@@ -124,7 +124,6 @@ ...@@ -124,7 +124,6 @@
inGuaranteePeriod:'', inGuaranteePeriod:'',
list: [], list: [],
tabIndex: 0, tabIndex: 0,
show200: true, // 基础信息显示金额输入框
scrollTop: 0, //tab标题的滚动条位置 scrollTop: 0, //tab标题的滚动条位置
oldScrollTop: 0, oldScrollTop: 0,
current: 0, // 预设当前项的值 current: 0, // 预设当前项的值
...@@ -239,6 +238,9 @@ ...@@ -239,6 +238,9 @@
'font-size': '32rpx', 'font-size': '32rpx',
} }
}, },
show200() { /// 基础信息显示金额输入框
return this.form.paymentMethodsType != '03'
}
}, },
methods: { methods: {
getCompleteData() {//获取工单配置的完工项目 getCompleteData() {//获取工单配置的完工项目
...@@ -257,6 +259,7 @@ ...@@ -257,6 +259,7 @@
saveComplete(){// 保存完工信息 saveComplete(){// 保存完工信息
let self = this let self = this
let param = {} let param = {}
self.list.forEach((panel)=>{ self.list.forEach((panel)=>{
param[panel.panelFieldsName] = [] param[panel.panelFieldsName] = []
panel.items.forEach((group) =>{ panel.items.forEach((group) =>{
...@@ -273,13 +276,6 @@ ...@@ -273,13 +276,6 @@
}) })
}) })
if (!param.base[0].fieldsValue) {
return this.$refs.uToast.show({
title: '请先选择产品规格',
type: 'error',
})
}
self.$u.api.saveCompleteData(param,self.orderId).then((res)=>{ self.$u.api.saveCompleteData(param,self.orderId).then((res)=>{
if (res.code == 200) { if (res.code == 200) {
this.$refs.uToast.show({ this.$refs.uToast.show({
...@@ -288,7 +284,7 @@ ...@@ -288,7 +284,7 @@
}) })
} else { } else {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: res.message, title: res.data,
type: 'error', type: 'error',
}) })
} }
...@@ -311,6 +307,7 @@ ...@@ -311,6 +307,7 @@
}else if(value&&Array.isArray(value)&&value.length > 0){ }else if(value&&Array.isArray(value)&&value.length > 0){
panelResult.submitted++ panelResult.submitted++
}else if(first){// 记录第一个 为空 并且需要必填的项 用于定位 }else if(first){// 记录第一个 为空 并且需要必填的项 用于定位
console.log(ele)
first = false first = false
self.waitHandlerPanelIndex = panelIndex self.waitHandlerPanelIndex = panelIndex
self.waitHandlerGroupIndex = groupIndex self.waitHandlerGroupIndex = groupIndex
...@@ -390,11 +387,12 @@ ...@@ -390,11 +387,12 @@
if(innerItem.fieldsType ==='multiInput'){ if(innerItem.fieldsType ==='multiInput'){
// 多个输入框的值触发 // 多个输入框的值触发
let key = Object.keys(data.value)[0] let key = Object.keys(data.value)[0]
debugger
this.form[key] = data.value[key] this.form[key] = data.value[key]
}else{ }else{
this.$set(this.form,innerItem.fieldsName,data.value) this.$set(this.form,innerItem.fieldsName,data.value)
} }
this.show200 = innerItem.fieldsId != 199 || data.value != '03'
console.log(this.form) console.log(this.form)
}, },
nextStep() { nextStep() {
......
...@@ -276,10 +276,12 @@ ...@@ -276,10 +276,12 @@
this.takeStatus = true this.takeStatus = true
}, },
closeTake(img) { closeTake(img) {
console.log(img)
if(img !==undefined ){ if(img !==undefined ){
if (!this.currentItemDate.orderImages) this.currentItemDate.orderImages = []
// step1 添加图片 // step1 添加图片
this.currentItemDate.orderImages.push(img[img.length-1].key) img.forEach(v => {
this.currentItemDate.orderImages.push(v.key)
})
// step2 保存图片 // step2 保存图片
var data={ var data={
type : this.currentItemDate.type, type : this.currentItemDate.type,
......
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