Commit 31edbedd authored by 石盼盼's avatar 石盼盼

Merge branch 'spp' into 'master'

Spp

See merge request !5
parents d7f3d801 5deb5bc7
......@@ -9,7 +9,7 @@ const baseUrl = '/api'
// todo: url
const httpUrl = 'https://repairtest.zeruiedu.com' // 测试接口
const h5Url = 'https://repair.zeruiedu.com' // 测试h5线上地址
const h5Url = 'http://localhost:8080/' // 测试h5线上地址
// const httpUrl = 'https://fenghexm.xueyoubangedu.com' // 正式接口
// const h5Url = 'http://depository.fhxmcy.com' // 正式h5线上地址
......
<template>
<div
class="cont"
v-if="order"
>
<div class="cont" v-if="order">
<div class="top">
<div class="item flex-h flex-vc">
<div class="title">维修类目:</div>
......@@ -42,95 +39,41 @@
</div>
<div class="things">
<div class="things_title">所需耗材</div>
<div
class="list-item"
v-for="(item,index) in addList"
:key="index"
>
<div
class="item flex-h flex-hb"
@click="showZl(index)"
>
<div class="list-item" v-for="(item,index) in addList" :key="index" >
<div class="item flex-h flex-hb" @click="showZl(index)" >
<div class="item_title flex-h flex-vc">
<div class="title_left">耗材种类</div>
<div class="title_r">{{item.zl}}</div>
</div>
<div class="select flex-h flex-vc">
<div class="select_txt">选择</div>
<img
src="@assets/images/my/select.png"
alt
/>
<img src="@assets/images/my/select.png" alt />
</div>
</div>
<div
class="item flex-h flex-hb"
@click="showHc(index)"
>
<div class="item flex-h flex-hb" @click="showHc(index)" >
<div class="item_title flex-h flex-vc">
<div class="title_left">耗材名称</div>
<div class="title_r">{{item.mc}}</div>
</div>
<div class="select flex-h flex-vc">
<div class="select_txt">选择</div>
<img
src="@assets/images/my/select.png"
alt
/>
<img src="@assets/images/my/select.png" alt />
</div>
</div>
<div class="item flex-h flex-vc">
<div class="title_left">耗材个数</div>
<input
type="number"
placeholder="请输入"
v-model="item.sl"
/>
</div>
<!-- 种类弹窗 -->
<van-popup
v-model="item.zlSelect"
round
position="bottom"
>
<van-picker
show-toolbar
:columns="types"
@confirm="(value)=>{typeConfirm(value,index)}"
@cancel="typeCancel(index)"
/>
</van-popup>
<van-popup
v-model="item.mcSelect"
round
position="bottom"
>
<van-picker
show-toolbar
:columns="hcName"
@confirm="(value)=>{hcConfirm(value,index)}"
@cancel="hcCancel(index)"
/>
</van-popup>
</div>
<div class="line"></div>
<div class="math-btn flex-h flex-vc flex-hb">
<div
class="del-btn"
@click="delMeth"
>-删除耗材</div>
<div
class="add-btn"
@click="addMeth"
>+新增耗材</div>
</div>
<input type="number" placeholder="请输入" v-model="item.sl" @input="changeInput($event)" />
</div>
<div class="item flex-h flex-vc">
<div class="title_left">耗材个数</div>
<input type="number" placeholder="请输入" v-model="item.sl" @input="changeInput($event)" />
<div class="title_left">耗材价格</div>
<div class="title_r">{{item.price}}</div>
</div>
<div v-if="addList.length>1" class="delete-btn" @click="delMeth(index)">
<img src="@assets/images/lajitong.png" alt="">
</div>
<!-- 种类弹窗 -->
<van-popup v-model="item.zlSelect" round position="bottom">
<van-popup v-model="item.zlSelect" round position="bottom" >
<van-picker
show-toolbar
:columns="types"
......@@ -139,7 +82,7 @@
@cancel="typeCancel(index)"
/>
</van-popup>
<van-popup v-model="item.mcSelect" round position="bottom">
<van-popup v-model="item.mcSelect" round position="bottom" >
<van-picker
show-toolbar
:columns="hcName"
......@@ -150,9 +93,9 @@
</van-popup>
</div>
<div class="line"></div>
<div class="math-btn flex-h flex-vc flex-hb">
<div class="add-btn" @click="addMeth">+新增耗材</div>
<div v-if="addList.length>1" class="del-btn" @click="delMeth">-删除耗材</div>
<div class="add-btn flex-h flex-vc flex-hb">
<!-- <div v-if="addList.length>1" class="del-btn" @click="delMeth" >-删除耗材</div> -->
<div class="add-btn" @click="addMeth" >+新增耗材</div>
</div>
</div>
<div class="blank"></div>
......@@ -178,7 +121,7 @@ export default {
zl:'',
mc:'',
sl:'',
price: '',
price: '暂无',
zlSelect:false,
mcSelect: false
}
......@@ -194,6 +137,7 @@ export default {
order: '',
hcList: [],
total_price: 0,
hc_price: '',
}
},
created () {
......@@ -255,7 +199,8 @@ export default {
this.addList[index].price = value.price
this.addList[index].mcSelect = false
console.log('家对的被动方法',this.addList[index].price);
this.total_price = this.addList[index].price
// this.total_price = this.addList[index].price
this.hc_price = value.price
},
hcCancel(index) {
this.addList[index].mcSelect = false
......@@ -265,15 +210,18 @@ export default {
zl: '',
mc: '',
sl: '',
price: '暂无',
zlSelect: false,
mcSelect: false
})
},
delMeth(index){
console.log('删除的项',index);
this.addList.splice(index,1)
},
changeInput(e){
this.hc_number = e.target.value
this.total_price = this.hc_number * this.hc_price
},
launch(id){
console.log('东西啊啊',this.addList[0].sl);
......@@ -378,13 +326,25 @@ export default {
height: 1px;
background: #f1f1f1;
}
.math-btn {
.add-btn {
color: #0054ff;
font-size: 0.3rem;
margin-top: 0.4rem;
margin: 0.2rem auto 0 ;
}
.list-item {
margin-bottom: 0.8rem;
position: relative;
}
.delete-btn {
width: 0.4rem;
height: 0.4rem;
position: absolute;
bottom: 0rem;
right: 0rem;
}
.delete-btn img{
width: 100%;
height: 100%;
}
.blank {
width: 100%;
......
......@@ -54,8 +54,8 @@ module.exports = {
// devServer:{type:Object} 3个属性host,port,https 支持webPack-dev-server的所有选项
devServer: {
port: 8080, // 端口号
// host: 'localhost',
host: "192.168.3.44",
host: 'localhost',
// host: "192.168.3.44",
https: false, // https:{type:Boolean}
open: true, // 配置自动启动浏览器
proxy: {
......
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