Commit 38ffcca1 authored by 石盼盼's avatar 石盼盼

修改测试问题

parent 45ab295d
...@@ -10,7 +10,7 @@ const baseUrl = '/api' ...@@ -10,7 +10,7 @@ const baseUrl = '/api'
// todo: url // todo: url
const httpUrl = 'https://repairtest.zeruiedu.com' // 测试接口 const httpUrl = 'https://repairtest.zeruiedu.com' // 测试接口
const h5Url ='http://localhost:8080' // 测试h5线上地址 const h5Url ='http://localhost:8080' // 测试h5线上地址
// const h5Url = 'http://repair.h5.zeruiedu.com/' // 测试h5线上地址 // const h5Url = 'http://repair.h5.zeruiedu.com' // 测试h5线上地址
window.localStorage.setItem('httpUrl', httpUrl) window.localStorage.setItem('httpUrl', httpUrl)
window.localStorage.setItem('h5Url', h5Url) window.localStorage.setItem('h5Url', h5Url)
// const httpUrl = 'https://fenghexm.xueyoubangedu.com' // 正式接口 // const httpUrl = 'https://fenghexm.xueyoubangedu.com' // 正式接口
......
...@@ -8,7 +8,25 @@ $bg-color-light: #F5F7FE; ...@@ -8,7 +8,25 @@ $bg-color-light: #F5F7FE;
$border-color: #e7e7e7; $border-color: #e7e7e7;
$text-gray: #989794; $text-gray: #989794;
/* 一行 */
.text-line-one {
overflow: hidden;
text-overflow: ellipsis;
-o-text-overflow: ellipsis;
-webkit-text-overflow: ellipsis;
-moz-text-overflow: ellipsis;
white-space: nowrap;
}
/* 两行 */
.text-line-two {
word-break: break-all;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
height: 85rpx;
}
// 弹出框 // 弹出框
.self-dialog .van-goods-action-button--first { .self-dialog .van-goods-action-button--first {
border-radius: .5rem !important; border-radius: .5rem !important;
......
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
} }
.ma-item { .ma-item {
// margin-top: 0.3rem; // margin-top: 0.3rem;
height: 0.4rem; // height: 0.4rem;
margin-top: 0.2rem; margin-top: 0.2rem;
} }
.item_line{ .item_line{
...@@ -124,7 +124,24 @@ ...@@ -124,7 +124,24 @@
} }
.one { .one {
color: #727272; color: #727272;
margin-bottom: 0.3rem; // width: 17%;
// margin-bottom: 0.3rem;
}
.one1{
width: 30%;
}
.one2 {
width: 40%;
text-align: center;
}
.one3 {
width: 20%;
}
._one{
width: 50%
}
._two {
width: 25%
} }
.one_title{ .one_title{
width: 40%; width: 40%;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<div class="title">{{order.repair_type.type_name}}</div> <div class="title">{{order.repair_type.type_name}}</div>
</div> </div>
<div class="item-title">问题描述:</div> <div class="item-title">问题描述:</div>
<div class="item-desc que-desc">{{order.description}}</div> <div class="item-desc que-desc">{{order.repair_type.type_name}}-{{order.description}}</div>
<div class="item flex-h flex-vc"> <div class="item flex-h flex-vc">
<div class="item-title">服务地址:</div> <div class="item-title">服务地址:</div>
<div class="item-desc">{{order.region.region_name}}-{{order.room.room_name}}-{{order.address}}</div> <div class="item-desc">{{order.region.region_name}}-{{order.room.room_name}}-{{order.address}}</div>
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</div> </div>
<div class="item flex-h flex-vc"> <div class="item flex-h flex-vc">
<div class="item-title">联系电话:</div> <div class="item-title">联系电话:</div>
<div class="item-desc phone">{{order.telephone}}</div> <div class="item-desc phone" @click="callPhone(order)">{{order.telephone}}</div>
</div> </div>
<div class="item flex-h flex-vc"> <div class="item flex-h flex-vc">
<div class="item-title">提交时间:</div> <div class="item-title">提交时间:</div>
...@@ -25,15 +25,8 @@ ...@@ -25,15 +25,8 @@
</div> </div>
<div class="item flex-h flex-vc"> <div class="item flex-h flex-vc">
<div class="item-title">图片详情:</div> <div class="item-title">图片详情:</div>
<div <div class="img flex-h" v-for="(child, index) in order.image" :key="index" @click="preview(order.image,index)">
class="img flex-h" <img :src="child.url" alt />
v-for="(child, index) in order.image"
:key="index"
>
<img
:src="child.url"
alt
/>
</div> </div>
</div> </div>
</div> </div>
...@@ -62,11 +55,11 @@ ...@@ -62,11 +55,11 @@
</div> </div>
<div class="item flex-h flex-vc"> <div class="item flex-h flex-vc">
<div class="title_left">耗材个数</div> <div class="title_left">耗材个数</div>
<input type="number" :min="1" maxlength="3" placeholder="请输入" v-model="item.number" @input="changeInput($event,index)" /> <input type="tel" :min="1" maxlength="3" placeholder="请输入" v-model="item.number" @input="changeInput($event,index)" />
<!-- <van-field class="hc_field" v-model="item.number" type="number" placeholder="请输入" maxlength="3" @input="changeInput($event,index)" /> --> <!-- <van-field class="hc_field" v-model="item.number" type="number" placeholder="请输入" maxlength="3" @input="changeInput(item,index)" /> -->
</div> </div>
<div class="item flex-h flex-vc"> <div class="item flex-h flex-vc">
<div class="title_left">耗材价格</div> <div class="title_left">耗材单价</div>
<div class="title_r">{{item.single_price}}</div> <div class="title_r">{{item.single_price}}</div>
</div> </div>
<div v-if="addList.length>1" class="delete-btn" @click="delMeth(index)"> <div v-if="addList.length>1" class="delete-btn" @click="delMeth(index)">
...@@ -105,6 +98,7 @@ ...@@ -105,6 +98,7 @@
<div class="left"> <div class="left">
<span>{{goods_number}}</span>件,总金额: <span>{{goods_number}}</span>件,总金额:
<!-- <span v-if="isNaN(total_price)">¥暂无</span> -->
<span>{{total_price}}</span> <span>{{total_price}}</span>
</div> </div>
<div class="skBtn" @click="launch(repair_order_id)">发起收款</div> <div class="skBtn" @click="launch(repair_order_id)">发起收款</div>
...@@ -113,6 +107,7 @@ ...@@ -113,6 +107,7 @@
</template> </template>
<script> <script>
import { ImagePreview } from 'vant';
export default { export default {
name: 'charge', name: 'charge',
data () { data () {
...@@ -145,12 +140,38 @@ export default { ...@@ -145,12 +140,38 @@ export default {
} }
}, },
created () { created () {
// console.log('change页面')
this.repair_order_id = this.$route.query.id this.repair_order_id = this.$route.query.id
// console.log(this.$route.query.id,'接收的id');
this.getDetail() this.getDetail()
}, },
watch:{
addList:{
handler(newValue,oldValue){
let filterValue = newValue.filter(item=>{
return (item.zl && item.mc && item.number)
})
if(filterValue.length){
this.getMonery(filterValue)
}else{
this.total_price = 0
}
},
deep:true
},
},
methods: { methods: {
callPhone(order){
let phoneNumber = order.telephone
window.location.href = 'tel://' + phoneNumber
},
preview(img, index){
let temp = img.map(item=>{
return item.url
})
ImagePreview({
images: temp,
startPosition: index,
});
},
getDetail () { getDetail () {
const curParams = { const curParams = {
repair_order_id: this.repair_order_id repair_order_id: this.repair_order_id
...@@ -195,7 +216,10 @@ export default { ...@@ -195,7 +216,10 @@ export default {
single_price: value.son[i].price single_price: value.son[i].price
}) })
} }
this.hcName = childArr this.hcName = childArr
// this.getMonery()
}, },
typeCancel(index) { typeCancel(index) {
this.addList[index].zlSelect = false this.addList[index].zlSelect = false
...@@ -209,33 +233,22 @@ export default { ...@@ -209,33 +233,22 @@ export default {
this.addList[index].mcSelect = false this.addList[index].mcSelect = false
this.addList[index].goods_id = value.id this.addList[index].goods_id = value.id
this.hc_price = this.addList[index].single_price this.hc_price = this.addList[index].single_price
let bool = this.addList.every(item=>{
this.getMonery() return item.number && item.mc && item.zl
})
// this.getMonery()
}, },
changeInput(e,index){ changeInput(e,index){
this.hc_number = e.target.value this.hc_number = e.target.value
this.totalCount() this.totalCount()
if( this.addList[index].mc){
this.getMonery()
}
}, },
getMonery(){ getMonery(filterList){
let total_price = 0 let total_price = 0
// console.log('aaaa',this.hc_number,this.hc_price); filterList.map(item=>{
// if(this.hc_number == '' || this.hc_price == ''){ total_price += Number(item.number) * Number(item.single_price)
// this.total_price = 0 })
// }
for(let i=0; i<this.addList.length;i++){
if(this.addList[i].number == '' || this.addList[i].single_price=='暂无'){
this.total_price = 0
return
}
total_price += this.addList[i].single_price * this.addList[i].number
console.log('数量',this.addList[i].number,'单价',this.addList[i].single_price)
}
this.total_price = Number(total_price) this.total_price = Number(total_price)
console.log('总价钱',total_price); // console.log('总价钱',total_price);
}, },
totalCount(){ totalCount(){
let count = 0 let count = 0
...@@ -263,7 +276,7 @@ export default { ...@@ -263,7 +276,7 @@ export default {
message: '确认删除吗?' message: '确认删除吗?'
}).then(()=>{ }).then(()=>{
this.addList.splice(index,1) this.addList.splice(index,1)
this.getMonery() // this.getMonery()
this.totalCount() this.totalCount()
}) })
.catch(() => {}) .catch(() => {})
...@@ -277,6 +290,12 @@ export default { ...@@ -277,6 +290,12 @@ export default {
if(!bool){ if(!bool){
this.$toast.fail('请输入完整') this.$toast.fail('请输入完整')
return return
}
for(let i = 0; i<this.addList.length;i++){
if(this.addList[i].number == 0){
this.$toast('耗材个数不能为0')
return
}
} }
const curParams = { const curParams = {
repair_order_id: this.repair_order_id, repair_order_id: this.repair_order_id,
......
...@@ -83,9 +83,13 @@ ...@@ -83,9 +83,13 @@
v-for="(child, index) in parent.goods" v-for="(child, index) in parent.goods"
:key="index" :key="index"
> >
<div class="one">{{child.parent_detail.goods_name}}</div> <div class="one one1 text-line-one">{{child.parent_detail.goods_name}}</div>
<div class="one">{{child.good_detail.goods_name}}*{{child.number}}</div> <!-- <div class="one">{{child.good_detail.goods_name}}*{{child.number}}</div> -->
<div class="one">{{child.price}}</div> <div class="one one2 flex-h">
<div class="_one text-line-one">{{child.good_detail.goods_name}}</div>
<div class="_two text-line-one">*{{child.number}}</div>
</div>
<div class="one one3">{{child.price}}</div>
</div> </div>
</div> </div>
<div class="item_line"></div> <div class="item_line"></div>
...@@ -98,9 +102,13 @@ ...@@ -98,9 +102,13 @@
v-for="(child, index) in item.free_material_order.goods" v-for="(child, index) in item.free_material_order.goods"
:key="index" :key="index"
> >
<div class="one">免费</div> <div class="one one1 text-line-one">免费</div>
<div class="one">{{child.goods_name}}*{{child.number}}</div> <div class="one one2 flex-h">
<div class="one">¥0</div> <div class="_one text-line-one">{{child.goods_name}}</div>
<div class="_two text-line-one">*{{child.number}}</div>
</div>
<!-- <div class="one one2 text-line-one">{{child.goods_name}}*{{child.number}}</div> -->
<div class="one one3 text-line-one">¥0</div>
</div> </div>
<div class="item_line"></div> <div class="item_line"></div>
</div> </div>
...@@ -199,17 +207,12 @@ ...@@ -199,17 +207,12 @@
v-for="(item, index) in expend_detail.list" v-for="(item, index) in expend_detail.list"
:key="index" :key="index"
> >
<div class="one one_title">{{item.parent_detail ? item.parent_detail.goods_name : '其它'}}</div> <div class="one one1 one_title text-line-one">{{item.parent_detail ? item.parent_detail.goods_name : '其它'}}</div>
<div class="one_items flex-h flex-vc flex-hb" v-if="item.is_free == 2"> <div class="one one2 flex-h">
<div class="one">{{item.good_detail.goods_name}}*{{item.number}}</div> <div class="_one text-line-one">{{item.is_free == 2 ? item.good_detail.goods_name : item.goods_name}}</div>
<div class="one">{{item.price}}</div> <div class="_two text-line-one">*{{item.number}}</div>
</div>
<div class="one_items flex-h flex-vc flex-hb" v-if="item.is_free == 1">
<div class="one">{{item.goods_name}}*{{item.number}}</div>
<div class="one">免费</div>
</div> </div>
<!-- <div class="one">{{item.goods_name}}*{{item.number}}</div> <div class="one one3">{{item.price}}</div>
<div class="one">{{item.is_free ? '免费' : '' + item.price}}</div> -->
</div> </div>
<div class="hc_total">共计{{expend_detail.number}}件,总价: ¥{{expend_detail.price}}</div> <div class="hc_total">共计{{expend_detail.number}}件,总价: ¥{{expend_detail.price}}</div>
<div class="sure-btn" @click="cancel">确定</div> <div class="sure-btn" @click="cancel">确定</div>
......
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