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