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

桩到家界面交互调整2

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