Commit 0775e789 authored by Morson's avatar Morson
parents fa6c0184 b1758b2a
......@@ -104,14 +104,14 @@
setValue() {
const dataValue = []
this.imgList.map(item=>{
dataValue.push(item.src)
})
dataValue.push(item.path)
})
this.valueChange(dataValue)
},
closeTake(val) {
if(val && val.length > 0){
val.forEach((item,index,array)=>{
item.path = item.src
item.path = item.key
this.imgList.push(item)
})
this.setValue()
......
......@@ -3,13 +3,13 @@
<view class="wrap">
<swiper class="swiper-box" :current="swiperCurrent" @transition="transition"
@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="title">
拍照要求
</view>
<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}}
</view>
<view class="txt tips" v-if="currentItem.note">
......
<template>
<view>
<u-navbar v-if="!takeStatus" :is-back="false" :title-size="26" title-color="#000" title="我的"></u-navbar>
<view v-if="!takeStatus">
<view class="u-flex user-box u-p-l-30 u-p-r-20 u-p-b-30">
<view class="u-m-r-10">
<u-avatar :src="pic" size="140"></u-avatar>
</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 class="u-m-t-20">
<u-cell-group>
<u-cell-item v-for="(item, index) in items" :title="item.title" :value="item.value" :key="index">
<u-icon slot="icon" size="32" name="search"></u-icon>
</u-cell-item>
</u-cell-group>
</view>
<view class="u-m-t-20">
<u-cell-group>
<u-cell-item icon="setting" title="设置"></u-cell-item>
</u-cell-group>
</view>
<view class="u-m-t-20" @click="take">
<u-cell-group>
<u-cell-item icon="setting" title="相机组件测试"></u-cell-item>
</u-cell-group>
</view>
</view>
<take-photo v-if="takeStatus" :currentItem="testData" @close="closeTake"></take-photo>
</view>
</template>
<script>
import takePhoto from '@/components/take/index.vue'
export default {
components: {
'take-photo': takePhoto
},
data() {
return {
pic:'https://uviewui.com/common/logo.png',
show:true,
takeStatus: false,
testData: {
_id: '1', // 规格ID
system_id: '2', // 系统ID
brand_id: '3', // 品牌ID
classify_id: '4', // 分类ID
images: [ // 拍照要求示意图
'https://qn-static.banshouhui.com/live_mark.png',
'https://qn-static.banshouhui.com/live_mark.png',
'https://qn-static.banshouhui.com/live_mark.png'
],
main_point: [] // 要点
}
}
},
computed: {
items() {
return [
{title: '我的钱包', value: '', icon: ''},
{title: '我的质保金', value: '', icon: ''},
{title: '我的合同', value: '', icon: ''},
{title: '我的证件', value: '', icon: ''},
{title: '我的收货地址', value: '', icon: ''},
{title: '我的仓库', value: '', icon: ''},
{title: '联系客服', value: '6666666', icon: ''}]
}
},
onLoad() {
},
methods: {
take() {
uni.hideTabBar()
this.takeStatus = true
<template>
<view class="mine-view">
<image class="header-image" mode="widthFix" :src="imageUrl + 'wodebeijing.png'"></image>
<u-navbar :is-back="false" :background="{ background: 'transparent' }" :border-bottom="false">
<text class="title-view">我的</text>
</u-navbar>
<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>
<view class="list-view">
<u-cell-group>
<view v-for="(item, index) in items" :key="index">
<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>
<view v-if="index == 3" class="line-view"></view>
</view>
</u-cell-group>
</view>
<view class="u-m-t-20" @click="take">
<u-cell-group>
<u-cell-item icon="setting" title="相机组件测试"></u-cell-item>
</u-cell-group>
</view>
</view>
<take-photo v-if="takeStatus" :currentItem="testData" @close="closeTake"></take-photo>
</view>
</template>
<script>
import takePhoto from '@/components/take/index.vue'
export default {
components: {
'take-photo': takePhoto
},
data() {
return {
serviceTel: '0755-81773817',
info: {},
pic: 'https://uviewui.com/common/logo.png',
show: true,
takeStatus: false,
testData: {
_id: '1', // 规格ID
system_id: '2', // 系统ID
brand_id: '3', // 品牌ID
classify_id: '4', // 分类ID
images: [ // 拍照要求示意图
'https://qn-static.banshouhui.com/live_mark.png',
'https://qn-static.banshouhui.com/live_mark.png',
'https://qn-static.banshouhui.com/live_mark.png'
],
main_point: [] // 要点
}
}
},
computed: {
items() {
return [{
title: '我的钱包',
value: '',
icon: 'qianbao.png',
imageStyle: 'width:34rpx;height:32rpx'
},
{
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', '', '']
},
closeTake(img) {
console.log(img)
this.takeStatus = false
}
headImageUrl() {
return this.info.headImage || this.placeholderImage
},
placeholderImage() {
return this.imageUrl + 'touxiang.png'
}
},
onLoad() {
},
methods: {
handleClick(index) {
uni.navigateTo({
url: 'pages/mine/' + this.pages[index]
})
},
take() {
uni.hideTabBar()
this.takeStatus = true
},
closeTake(img) {
console.log(img)
this.takeStatus = false
}
}
}
</script>
<style lang="scss" scoped>
.mine-view {
position: relative;
.header-image {
position: absolute;
width: 100%;
}
}
</script>
<style lang="scss" scoped>
.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 @@
<view class="class-item" :key="groupIndex" v-show="current == groupIndex">
<view class="title" v-if="groupItem.name !== '基本信息'">{{groupItem.name}}</view>
<view class="class-bd">
<u-form-item v-for="(item,itemIndex) in groupItem.items" :key="itemIndex" v-if="typeToComponentType(item.fieldsType)!=='location'"
label-position="top" :prop="item.fieldsName" :border-bottom="false" v-show="item.fieldsId != 200 || show200">
<view :class="[{'label-bold': groupItem.name === '基本信息'}, 'label']">
<u-form-item v-for="(item,itemIndex) in groupItem.items" :key="itemIndex" label-position="top"
:prop="item.fieldsName" :border-bottom="false" v-show="item.fieldsId != 200 || show200">
<view :class="[{'label-bold': groupItem.name === '基本信息'}, 'label']" v-if="typeToComponentType(item.fieldsType)!=='location'">
<image class="item-image" :src="mixingImage" v-if="item.required"></image>
{{item.fieldsTitle}}
</view>
......@@ -124,7 +124,6 @@
inGuaranteePeriod:'',
list: [],
tabIndex: 0,
show200: true, // 基础信息显示金额输入框
scrollTop: 0, //tab标题的滚动条位置
oldScrollTop: 0,
current: 0, // 预设当前项的值
......@@ -239,6 +238,9 @@
'font-size': '32rpx',
}
},
show200() { /// 基础信息显示金额输入框
return this.form.paymentMethodsType != '03'
}
},
methods: {
getCompleteData() {//获取工单配置的完工项目
......@@ -256,7 +258,8 @@
},
saveComplete(){// 保存完工信息
let self = this
let param = {}
let param = {}
self.list.forEach((panel)=>{
param[panel.panelFieldsName] = []
panel.items.forEach((group) =>{
......@@ -272,15 +275,8 @@
})
})
})
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) {
this.$refs.uToast.show({
title: '保存成功',
......@@ -288,7 +284,7 @@
})
} else {
this.$refs.uToast.show({
title: res.message,
title: res.data,
type: 'error',
})
}
......@@ -310,7 +306,8 @@
panelResult.submitted++
}else if(value&&Array.isArray(value)&&value.length > 0){
panelResult.submitted++
}else if(first){// 记录第一个 为空 并且需要必填的项 用于定位
}else if(first){// 记录第一个 为空 并且需要必填的项 用于定位
console.log(ele)
first = false
self.waitHandlerPanelIndex = panelIndex
self.waitHandlerGroupIndex = groupIndex
......@@ -390,11 +387,12 @@
if(innerItem.fieldsType ==='multiInput'){
// 多个输入框的值触发
let key = Object.keys(data.value)[0]
debugger
this.form[key] = data.value[key]
}else{
this.$set(this.form,innerItem.fieldsName,data.value)
}
this.show200 = innerItem.fieldsId != 199 || data.value != '03'
console.log(this.form)
},
nextStep() {
......
......@@ -271,15 +271,17 @@
photo.itemIndex = ikey
const len = item.orderImages?item.orderImages.length:0
photo.currentItemLength = len > 9 ? 10 : len
uni.hideTabBar()
this.takeStatus = true
},
closeTake(img) {
console.log(img)
if(img !==undefined ){
if (!this.currentItemDate.orderImages) this.currentItemDate.orderImages = []
// step1 添加图片
this.currentItemDate.orderImages.push(img[img.length-1].key)
img.forEach(v => {
this.currentItemDate.orderImages.push(v.key)
})
// step2 保存图片
var data={
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