Commit e98dae09 authored by 李超鹏's avatar 李超鹏

桩到家界面交互调整2

parent 2a6ebf18
......@@ -23,7 +23,7 @@ export function uploadFile(orderId, data) {
// 获取信息
export function getOrderCustomizeInfo(orderId, itemName) {
return request({
url: '/wxh-cloud-rest/rest/thirdparty/order/' + orderId + '/' + itemName,
url: '/wxh-cloud-rest/rest/thirdparty/order/specialInfo/' + orderId + '/' + itemName,
method: 'get'
})
}
......@@ -59,15 +59,14 @@ export default {
},
watch: {
},
mounted() {
if (this.item.value && this.item.value.length > 0) {
'item.value': function() {
this.item.value.map(item => {
this.imgList.push({ src: item })
})
}
},
mounted() {
},
methods: {
async uploadFile(item) {
console.log(item)
......
......@@ -9,27 +9,28 @@
<mt-popup
v-model="popupVisible"
position="bottom">
<div class="select-title">
<span class="btn" @click="cancel">取消</span>
<span class="btn confirm" @click="confirmSelect">确定</span>
</div>
<div class="select-con">
<div class="select-title">
<span class="btn" @click="cancel">取消</span>
<span class="btn confirm" @click="confirmSelect">确定</span>
</div>
<div class="list">
<div class="list-item" v-for="(item,index) in list" :key="index">
<div class="list-item" v-for="(item,index) in item.list" :key="index">
<template v-if="!index">
<span>{{item.name || ''}}</span>
<span>{{item.unit || ''}}</span>
<span>{{item.freeMount || ''}}</span>
<span>{{item.unit || ''}}</span>
<span>{{item.plan || ''}}</span>
<span>{{item.matName || ''}}</span>
<span>{{item.matUnit || ''}}</span>
<span>{{item.freeLength || ''}}</span>
<span>{{item.unitAmt || ''}}</span>
<span>{{item.useLength || ''}}</span>
</template>
<template v-else>
<span>{{item.name || ''}}</span>
<span>{{item.unit || ''}}</span>
<span>{{item.freeMount || ''}}</span>
<span>{{item.unit || ''}}</span>
<span>{{item.matName || ''}}</span>
<span>{{item.matUnit || ''}}</span>
<span>{{item.freeLength || ''}}</span>
<span>{{item.unitAmt || ''}}</span>
<span>
<input v-model="item.plan" placeholder="请输入"/>
<input v-model="item.useLength" placeholder="请输入"/>
</span>
</template>
......@@ -40,7 +41,7 @@
<img src="@/assets/img/add.png" />
</div>
</div>
<div class="list-item other" v-for="(item,index) in other" :key="'other' + index">
<div class="list-item other" v-for="(item,index) in item.other" :key="'other' + index">
<div class="label"></div>
<div class="middle">
<span>
......@@ -59,7 +60,7 @@
<div class="list-item other">
<div class="label">超出金额</div>
<div class="add">
10.0元
{{total || 0}}元
</div>
</div>
</div>
......@@ -74,9 +75,7 @@ export default {
data() {
return {
popupVisible: false,
value: '',
list: [],
other: []
value: ''
}
},
filters: {
......@@ -93,13 +92,27 @@ export default {
}
},
created() {
this.list = this.item.list
},
computed: {
total: {
get: function() {
let sum = 0
this.item.list.map((ele, index) => {
if (index !== 0 && ele.useLength > 0) {
sum = sum + ele.unitAmt * (ele.useLength - ele.freeLength)
}
})
this.item.other.map(ele => {
sum = sum + Number(ele.freeMount)
})
return sum
},
set: function(newValue) {
this.$set(this.item, 'total', newValue)
}
}
},
watch: {
},
methods: {
addOther() {
......@@ -107,10 +120,10 @@ export default {
name: '',
freeMount: ''
}
this.other.push(item)
this.item.other.push(item)
},
deleteOther(index) {
this.other.splice(index)
this.item.other.splice(index)
},
getName(value) {
let result = ''
......@@ -197,6 +210,7 @@ export default {
width:100%;
}
.select-con{
overflow: auto;
height:60vh;
.list{
padding:px2rem(10) px2rem(20);
......@@ -208,18 +222,20 @@ export default {
font-size: px2rem(28);
color:#333;
}
.select-title{
display: flex;
justify-content: space-between;
.btn{
padding:px2rem(10) px2rem(20);
line-height:px2rem(40);
font-size: px2rem(28);
color:#333;
&.confirm{
color:#5f45ea ;
}
}
}
.select-title{
display: flex;
justify-content: space-between;
.btn{
padding:px2rem(10) px2rem(20);
line-height:px2rem(40);
font-size: px2rem(28);
color:#333;
&.confirm{
color:#5f45ea ;
}
}
}
</style>
......@@ -170,12 +170,16 @@ const installData = [{
fieldName: 'materialList',
label: '材料填写',
inputType: 'service-more',
required: false
required: false,
list: [],
other: []
}, {
fieldName: 'craftList',
label: '工艺填写',
inputType: 'service-more',
required: false
required: false,
list: [],
other: []
}]
}, {
title: '安装结果',
......@@ -445,12 +449,16 @@ const inspectData = [{
fieldName: 'materialList',
label: '材料填写',
inputType: 'service-more',
required: false
required: false,
list: [],
other: []
}, {
fieldName: 'craftList',
label: '工艺填写',
inputType: 'service-more',
required: false
required: false,
list: [],
other: []
}]
}, {
title: '勘察结果',
......
This diff is collapsed.
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