Commit 1df5c186 authored by 石盼盼's avatar 石盼盼

bug修改

parent 6ce4756e
......@@ -175,14 +175,13 @@
height: 1.2rem;
border-radius: 0.08rem;
margin-top: 0.08rem;
margin-right: 0.16rem;
}
.img img {
width: 100%;
height: 100%;
border-radius: 0.08rem;
margin-left: 0.16rem;
margin-right: 0.16rem;
}
.list-item {
......
......@@ -85,13 +85,12 @@
height: 1.2rem;
border-radius: 0.08rem;
margin-top: 0.08rem;
margin-right: 0.16rem;
}
.img img {
width: 100%;
height: 100%;
border-radius: 0.08rem;
margin-left: 0.16rem;
margin-right: 0.16rem;
}
.list-item {
margin-bottom: 0.4rem;
......@@ -127,6 +126,15 @@
color: #727272;
margin-bottom: 0.3rem;
}
.one_title{
width: 40%;
// margin-right: 1rem;
white-space: nowrap;
text-align: left;
}
.one_items{
width: 60%;
}
.one-item {
margin-left: 0.3rem;
margin-right: 0.3rem;
......@@ -180,7 +188,7 @@
}
.van-popup textarea {
width: 6.3rem;
height: 3rem;
height: 2rem;
border: 1px solid #f1f1f1;
border-radius: 0.08rem;
padding: 0.3rem 0.2rem;
......@@ -230,6 +238,18 @@
color: #c8c8c8;
font-size: 0.3rem;
}
.hc_field{
width: 6.3rem;
height: 0.76rem;
background: #ffffff;
border: 1px solid #f1f1f1;
border-radius: 0.08rem;
text-align: left;
padding-left: 0.2rem;
margin: 0 auto 0.1rem;
font-size: 0.3rem;
line-height: 0.76rem;
}
.math-btn {
margin-left: 0.3rem;
margin-right: 0.3rem;
......
......@@ -11,6 +11,14 @@
position: relative;
margin: 0 auto;
}
.code_field{
width: 6.9rem;
height: 0.97rem;
border-bottom: 1px solid #F1F1F1;
position: relative;
margin: 0 auto;
line-height: 0.97rem;
}
.tel input{
width: 6.9rem;
height: 0.97rem;
......
......@@ -62,7 +62,8 @@
</div>
<div class="item flex-h flex-vc">
<div class="title_left">耗材个数</div>
<input type="number" :min="1" placeholder="请输入" v-model="item.number" @input="changeInput($event,index)" />
<input type="number" :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)" /> -->
</div>
<div class="item flex-h flex-vc">
<div class="title_left">耗材价格</div>
......@@ -173,12 +174,18 @@ export default {
this.addList[index].zlSelect = true
},
typeConfirm(value, index) {
console.log('11111',value);
if(value.id == this.addList[index].parent_id){
this.addList[index].zlSelect = false
return
}
this.hcList = value
this.addList[index].zl = value.goods_name
this.addList[index].zlSelect = false
this.addList[index].parent_id = value.id
console.log('parent_id' ,this.addList[index].parent_id);
// 当重新选择耗材种类时要清空之前选择的耗材
this.addList[index].goods_id = ''
this.addList[index].mc = ''
this.addList[index].single_price = ''
var childArr = []
for(let i in value.son){
......@@ -197,20 +204,16 @@ export default {
this.addList[index].mcSelect = true
},
hcConfirm(value, index) {
console.log('啊啊啊',value);
// console.log('addlist',this.addList);
this.addList[index].mc = value.goods_name
this.addList[index].single_price = value.single_price
this.addList[index].mcSelect = false
this.addList[index].goods_id = value.id
this.hc_price = this.addList[index].single_price
console.log('goods_id' ,this.addList[index].goods_id);
this.getMonery()
},
changeInput(e,index){
this.hc_number = e.target.value
console.log('商品数量',this.hc_number)
this.totalCount()
if( this.addList[index].mc){
this.getMonery()
......@@ -218,23 +221,28 @@ export default {
},
getMonery(){
console.log('addlist',this.addList);
console.log('执行了吗');
let total_price = 0
// console.log('aaaa',this.hc_number,this.hc_price);
// if(this.hc_number == '' || this.hc_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 = total_price
this.total_price = Number(total_price)
console.log('总价钱',total_price);
},
totalCount(){
console.log('走了嘛');
let count = 0
for(let i=0; i<this.addList.length;i++){
count += Number(this.addList[i].number)
}
this.goods_number = count
console.log('商品总数量',this.goods_number);
},
hcCancel(index) {
this.addList[index].mcSelect = false
......@@ -250,9 +258,16 @@ export default {
})
},
delMeth(index){
console.log('删除的项',index);
this.addList.splice(index,1)
this.getMonery()
this.$dialog.confirm({
title: '提示',
message: '确认删除吗?'
}).then(()=>{
this.addList.splice(index,1)
this.getMonery()
this.totalCount()
})
.catch(() => {})
},
launch(id){
......@@ -306,6 +321,10 @@ export default {
.item-title {
color: #000000;
font-size: 0.3rem;
white-space: nowrap;
}
.hc_field{
padding: 0;
}
.item-desc {
color: #727272;
......@@ -323,13 +342,13 @@ export default {
height: 1.2rem;
border-radius: 0.08rem;
margin-top: 0.8rem;
margin-right: 0.16rem;
border-radius: 0.08rem;
}
.img img {
width: 100%;
height: 100%;
border-radius: 0.08rem;
margin-left: 0.16rem;
margin-right: 0.16rem;
}
.things {
width: 6.9rem;
......@@ -347,6 +366,7 @@ export default {
}
.title_left {
margin-right: 0.38rem;
white-space: nowrap;
}
.title_r {
color: #727272;
......
......@@ -26,12 +26,7 @@
</div>
<van-pull-refresh v-model="isloading" @refresh="onRefresh" v-if="list.length">
<van-list
v-model="loading"
:finished="finished"
finished-text="没有更多了~"
@load="onmore"
>
<van-list v-model="loading" :finished="finished" finished-text="没有更多了~" @load="onmore">
<div class="order-item" v-for="(item, index) in list" :key="item.id">
<div class="title">{{item.order_status_display }}</div>
<div class="item flex-h flex-vc">
......@@ -156,7 +151,7 @@
<van-popup v-model="zdShow" close-icon="close">
<div class="cancel_cont">
<div class="pop_title">备注转单原因</div>
<textarea placeholder="请输入转单理由" v-model="reason"></textarea>
<textarea placeholder="请输入转单理由" maxlength="20" v-model="reason"></textarea>
<div class="btnItem flex-h">
<div class="cancel" @click="cancel">取消</div>
<div class="sure" @click="zd_submit">提交</div>
......@@ -168,8 +163,21 @@
<div class="cancel_cont">
<div class="pop_title">备注耗材</div>
<div class="list-item" v-for="(item,index) in addList" :key="index">
<input class="input" v-model="item.goods_name" type="text" placeholder="请输入耗材名称" />
<input class="input" v-model.number="item.number" type="number" placeholder="请输入耗材个数" />
<input
class="input"
maxlength="20"
v-model="item.goods_name"
type="text"
placeholder="请输入耗材名称"
/>
<!-- <input class="input" maxlength="3" v-model.number="item.number" type="number" placeholder="请输入耗材个数" /> -->
<van-field
class="hc_field"
v-model.number="item.number"
type="number"
placeholder="请输入耗材个数"
maxlength="3"
/>
</div>
<div class="math-btn flex-h flex-vc flex-hb">
<div v-if="addList.length>1" class="del-btn" @click="delMeth">-删除</div>
......@@ -187,13 +195,21 @@
<div class="pop_title">查看耗材</div>
<div class="tc_line"></div>
<div
class="ma-item one-item flex-h flex-hb"
class="ma-item one-item flex-h flex-vc"
v-for="(item, index) in expend_detail.list"
:key="index"
>
<div class="one">{{item.parent_detail ? item.parent_detail.goods_name : '其它'}}</div>
<div class="one">{{item.goods_name}}*{{item.number}}</div>
<div class="one">{{item.is_free ? '免费' : '' + item.price}}</div>
<div class="one one_title">{{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">{{item.good_detail.goods_name}}*{{item.number}}</div>
<div class="one">{{item.price}}</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 class="one">{{item.goods_name}}*{{item.number}}</div>
<div class="one">{{item.is_free ? '免费' : '' + item.price}}</div> -->
</div>
<div class="hc_total">共计{{expend_detail.number}}件,总价: ¥{{expend_detail.price}}</div>
<div class="sure-btn" @click="cancel">确定</div>
......
<template>
<div class="cont">
<div class="tel">
<input v-model.trim="old_tel" maxlength="11" type="number" placeholder="请输入原手机号" />
<input v-model.trim="old_tel" maxlength="11" type="tel" placeholder="请输入原手机号" />
</div>
<div class="tel">
<input v-model.trim="tel" maxlength="11" type="number" placeholder="请输入新的手机号" />
<input v-model.trim="tel" maxlength="11" type="tel" placeholder="请输入新的手机号" />
</div>
<div class="code flex-h">
<input v-model.trim="code" maxlength="6" type="number" placeholder="请输入验证码" />
<van-field class="code_field" v-model.trim="code" type="text" placeholder="请输入验证码" maxlength="6" />
<div class="getCode" @click="getCode">{{buttonText}}</div>
</div>
<div class="submit-btn" @click="submit">提交</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