send 7.28

This commit is contained in:
2020-07-28 20:47:31 +08:00
parent 208f27aa93
commit b12a3c1722
9 changed files with 743 additions and 345 deletions

View File

@@ -3,105 +3,63 @@
<view>
<u-tabs-swiper ref="tabs" :list="list" :is-scroll="false" active-color="#FF780F" :current="current" font-size="32" :show-bar="false" @change="tabsChange" height="88" ></u-tabs-swiper>
</view>
<swiper :current="swiperCurrent" @animationfinish="animationfinish">
<swiper-item class="swiper-item">
<view class="order-info">
<view class="order-name" @click="order()">
<view class="title titles" >
<text>选择订单</text>
<image src="../../static/image/shop/2.png" mode=""></image>
</view>
<u-icon name="arrow-dwon" color="#2979ff" size="28"></u-icon>
</view>
<view class="choose-info" v-if="choose">
<view class="store">
<view>
<image src="../../static/image/mine/23.png" mode=""></image>胖胖的店
</view>
<view>
订单编号2222222222222
</view>
</view>
<view class="store_info">
<view class="info_img">
<image src="../../static/image/mine/23.png" mode="">
</view>
<view class="info_txt">
<view class="content">
木糖少女小紫薯西装领连衣裙夏季新款女装夏收腰格子格纹裙子
</view>
<view class="much">
<text>99</text>
<text>x1</text>
</view>
</view>
</view>
</view>
<view class="order-name">
<view class="title">送洗人</view>
<input type="text" v-model="name" />
</view>
<view class="order-phone">
<view class="title">手机号</view>
<input type="text" v-model="phone" />
</view>
<view class="order-area">
<view class="title">省市区</view>
<input type="text" v-model="area" />
<view class="location">
<image src="../static/mine/28.png"></image>
<view>定位</view>
</view>
</view>
<view class="order-address">
<view class="title">详细地址</view>
<input type="text" v-model="address" />
</view>
</view>
<view class="upload-image">
<view class="title">上传商品图片</view>
<u-upload
ref="uUpload"
@on-uploaded="onUploaded"
:custom-btn="true"
:max-count="count"
:auto-upload="false"
>
<view slot="addBtn" class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
<img src="../static/mine/27.png" />
</view>
</u-upload>
</view>
<view class="wash-btn" @click="reset()">确认送洗</view>
</swiper-item>
<swiper :current="swiperCurrent" @animationfinish="animationfinish" :style="{ height: swiperHeight }">
<swiper-item class="swiper-item">
<scroll-view scroll-y="true" style="height: 100%;">
<view class="order-info">
<view class="order-name">
<view class="title">商品名称</view>
<view class="order-name" @click="order()">
<view class="title titles" >
<text>选择订单:</text>
<image src="../../static/image/shop/2.png" mode=""></image>
</view>
<u-icon name="arrow-dwon" color="#2979ff" size="28"></u-icon>
</view>
<view class="choose-info" v-if="choose">
<view class="store">
<view>
<image :src="checkedGoods.store.store_avatar"></image>{{ checkedGoods.store.store_name }}
</view>
<view>
订单编号{{ checkedGoods.order_sn }}
</view>
</view>
<view class="store_info">
<view class="info_img">
<image :src="checkedGoods.goods.goods_image" mode="">
</view>
<view class="info_txt">
<view class="content u-line-2">
{{ checkedGoods.goods.goods_name }}
</view>
<view class="much">
<text>{{ checkedGoods.goods.goods_pay_price }}</text>
<text>x{{ checkedGoods.goods.goods_num }}</text>
</view>
</view>
</view>
</view>
<view class="order-view order-type" @click="showClothesType=true">
<view class="title">商品类型:</view>
<input type="text" v-model="type" disabled />
</view>
<view class="order-view order-name">
<view class="title">送洗人:</view>
<input type="text" v-model="name" />
</view>
<view class="order-phone">
<view class="title">商品类型</view>
<input type="text" v-model="name" />
<view class="order-view order-phone">
<view class="title">手机号:</view>
<input type="text" v-model="phone" maxlength="11" />
</view>
<view class="order-phone">
<view class="title">衣服状况</view>
<input type="text" v-model="name" />
</view>
<view class="order-name">
<view class="title">送洗人</view>
<input type="text" v-model="name" />
</view>
<view class="order-area">
<view class="title">省市区</view>
<input type="text" v-model="area" />
<view class="order-view order-area" @click="showAddress=true">
<view class="title">省市区:</view>
<input type="text" v-model="area" disabled />
<view class="location">
<image src="../static/mine/28.png"></image>
<view>定位</view>
</view>
</view>
<view class="order-address">
<view class="title">详细地址</view>
<view class="order-view order-address">
<view class="title">详细地址:</view>
<input type="text" v-model="address" />
</view>
</view>
@@ -119,59 +77,111 @@
</view>
</u-upload>
</view>
<view class="wash-btn">确认送洗</view>
<view class="wash-btn" @click="reset()">确认送洗</view>
</scroll-view>
</swiper-item>
<swiper-item class="swiper-item">
<view class="order-info">
<view class="order-view order-name">
<view class="title">商品名称:</view>
<input type="text" v-model="goodsName" />
</view>
<view class="order-view order-phone" @click="showClothesType=true">
<view class="title">商品类型:</view>
<input type="text" v-model="type" disabled />
</view>
<view class="order-view order-phone">
<view class="title">衣服状况:</view>
<input type="text" v-model="name" />
</view>
<view class="order-view order-name">
<view class="title">送洗人:</view>
<input type="text" v-model="name" />
</view>
<view class="order-view order-area" @click="showAddress=true">
<view class="title">省市区:</view>
<input type="text" v-model="area" disabled />
<view class="location">
<image src="../static/mine/28.png"></image>
<view>定位</view>
</view>
</view>
<view class="order-view order-address">
<view class="title">详细地址:</view>
<input type="text" v-model="address" />
</view>
</view>
<view class="upload-image">
<view class="title">上传商品图片</view>
<u-upload
ref="uUpload"
@on-uploaded="onUploaded"
:custom-btn="true"
:max-count="count"
:auto-upload="false"
>
<view slot="addBtn" class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
<img src="../static/mine/27.png" />
</view>
</u-upload>
</view>
<view class="wash-btn">确认送洗</view>
</swiper-item>
</swiper>
<view class="popup" v-if="showPopup">
<view class="popup_cont" >
<u-select v-model="showClothesType" :list="typeList" value-name="id" label-name="name" @confirm="confirmType"></u-select>
<u-select v-model="showAddress"
mode="mutil-column-auto"
:list="areaList"
value-name="area_id"
label-name="area_name"
child-name="_child"
@confirm="setArea">
</u-select>
<u-popup v-model="showPopup" mode="bottom" border-radius="20">
<view class="order-popup">
<view class="check">
<text>选择订单</text>
<image src="../../static/image/common/17.png" @click="close()"></image>
<u-icon name="close" color="#A29FA3" size="32"></u-icon>
</view>
<swiper style="height: 1000px;" vertical="true">
<swiper-item class="swiper-item">
<scroll-view scroll-y class="order-list">
<view v-for="(items, index) in 3" :key="index">
<view class="store">
<view>
<image src="../../static/image/mine/23.png" mode=""></image>胖胖的店
</view>
<view>
订单编号2222222222222
</view>
<scroll-view scroll-y class="order-list">
<u-radio-group v-model="value" @change="radioChange">
<view v-for="(items, index) in orderList" :key="index" class="order-item">
<view class="store">
<view class="name">
<image :src="items.extend_store.store_avatar" mode=""></image>
<text>{{ items.store_name }}</text>
</view>
<view class="checkd">
<radio-group @change="er">
<label class="uni-list-cell uni-list-cell-pd" v-for="(item, index) in checkLidt" :key="index">
<view class="radio">
<radio color="#F0AD4E" :value="item.id" :checked="a==item.id"/>
</view>
<view class="store_info">
<view class="info_img">
<image src="../../static/image/mine/23.png" mode="">
</view>
<view class="info_txt">
<view class="content">
木糖少女小紫薯西装领连衣裙夏季新款女装夏收腰格子格纹裙子
</view>
<view class="much">
<text>99</text>
<text>x1</text>
</view>
</view>
</view>
</label>
</radio-group>
<view class="order-sn">
订单编号{{ items.order_sn }}
</view>
</view>
</scroll-view>
</swiper-item>
</swiper>
<view class="bottom_btn" style="width: 100%;background-color: #fff;">
<view class="wash-btn" @click="confirm()">确认</view>
</view>
<view class="checkd">
<label class="radio-view" v-for="(item, index) in items.extend_order_goods" :key="index">
<view class="radio">
<u-radio color="#F0AD4E" :name="items.order_id + ' ' + item.goods_id" active-color="#FF780F" icon-size="34"></u-radio>
</view>
<view class="store_info">
<view class="info_img">
<image :src="item.goods_image" mode="">
</view>
<view class="info_txt">
<view class="content u-line-2">
{{ item.goods_name }}
</view>
<view class="much">
<text>{{ item.goods_pay_price }}</text>
<text>x{{ item.goods_num }}</text>
</view>
</view>
</view>
</label>
</view>
</view>
</u-radio-group>
</scroll-view>
<view class="order-btn" @click="confirm">确认</view>
</view>
</view>
</u-popup>
</view>
</template>
<script>
@@ -180,45 +190,119 @@ export default {
return {
items: [],
count: 4, // 最大图片数量
type: '',
name: '',
phone: '',
area: '',
address: '',
// platformForm: {
// type: '',
// name: '',
// phone: '',
// area: '',
// address: '',
// },
// physicalForm: {
// },
goodsName: '',
list: [{
name: '平台历史订单'
}, {
name: '实体店历史订单'
}],
typeList: [],
orderList: [],
current: 0,
areaList: [],
showClothesType: false,
showAddress: false,
swiperCurrent: 0,
showPopup : false,
a:"",
checkLidt:[
{id:'1'},
{id:'2'},
{id:'3'}
]
showPopup : false,
checkedList: [],
page: 0,
swiperHeight: '',
value: '', // radio
checkedGoods: {},
choose: false, // 是否选择商品
}
},
onShow() {
this.current = 0;
this.swiperCurrent = 0;
this.showPopup = false;
this.choose = false;
},
onLoad() {
this.getOrderList();
this.setViewHeight();
this.getAreaData();
this.getClothesTypeList();
},
methods: {
onShow() {
this.current = 0;
this.swiperCurrent = 0;
this.showPopup = false;
this.choose = false
getClothesTypeList() {
this.$u.api.getClothesTypeList().then(res => {
this.typeList = res.data.typeList;
})
},
confirmType(e) {
// console.log(e);
this.type = e[0].label;
},
async getOrderList({ load = 'reload' } = {}) {
const res = await this.$u.api.getOrderList({
page: this.page,
// type: '40',
})
this.timer = true;
if(res.errCode == 0) {
if(load == 'reload') this.orderList = res.data;
else this.orderList.push(...res.data);
}
return res;
},
submit() {
this.$refs.uUpload.upload();
},
onUploaded(list) {
console.log(list)
},tabsChange(index) {
console.log(list);
},
tabsChange(index) {
this.swiperCurrent = index;
},
er(e){
console.log(e)
this.a =e.detail.value;
console.log(this.a)
radioChange(e){
const ids = e.split(" ");
console.log(ids)
let checkedGoods = {};
this.orderList.forEach(order => {
if(order.order_id == ids[0]) {
Object.assign(checkedGoods, { store: order.extend_store });
Object.assign(checkedGoods, { order_sn: order.order_sn });
order.extend_order_goods.forEach(goods => {
if(goods.goods_id == ids[1]) {
Object.assign(checkedGoods, { goods: goods });
this.checkedGoods = checkedGoods;
}
})
}
})
},
setArea(area) {
// console.log(area);
this.area_id = area[0].value;
this.city_id = area[1].value;
let temp = '';
area.forEach(e => {
temp += e.label;
});
this.area = temp;
},
getAreaData() {
this.$u.api.getArea().then((res)=>{
if (res.errCode == 0) {
this.areaList = res.data;
}
})
},
animationfinish(e) {
let current = e.detail.current;
@@ -226,16 +310,20 @@ export default {
this.current = current;
this.toApplyPage(current);
},
order(){
order() {
this.showPopup = true;
},
toApplyPage(index) {
console.log(index)
// console.log(index)
if(index == 1) {
this.showPopup = false;
this.choose = false
}
},
setViewHeight() {
const res = uni.getSystemInfoSync();
this.swiperHeight = res.windowHeight - (88 / 2) + 'px';
},
// replaces(){
// if(this.list[0].name=='实体店历史订单'){
// this.$set(this.list,0,{name: '平台历史订单'} )
@@ -245,79 +333,70 @@ export default {
// },
confirm(){
this.showPopup = false;
if(this.a ==''){
this.choose =false
if(JSON.stringify(this.checkedGoods) != '{}'){
this.choose = true;
}else{
this.choose = true
this.choose = false;
}
},
close(){
this.showPopup = false
},
reset(){
this.choose = false
},
radioChange: function(evt) {
for (let i = 0; i < this.items.length; i++) {
if (this.items[i].value === evt.target.value) {
this.current = i;
}
}
}
},
},
};
</script>
<style lang="scss" scoped>
.wash-order {
height: calc(100vh - 1rpx);
overflow: hidden;
border-top: 1rpx solid #ECECEC;
> uni-swiper {
flex: 1;
height: 95vh;
// height: 95vh;
}
.order-info {
.choose-info{
display: flex;flex-wrap: wrap;
height: 335rpx;
.store{
>view{
>image{
width:60rpx;
height:60rpx;
border-radius:50%;
vertical-align: middle;
padding-right:13rpx
>image {
width:60rpx;
height:60rpx;
border-radius: 50%;
vertical-align: middle;
margin-right: 12rpx;
}
}
font-size:28rpx;
font-family:PingFang SC;
font-weight:400;
font-size: 28rpx;
color:rgba(51,51,51,1);
line-height: 60rpx;
}
.store_info{
display: flex;
flex-wrap: nowrap;
width: 100%;
height: 150rpx;
.info_img{
>image{
width: 180rpx;
height: 160rpx;
.info_img {
>image {
width: 180rpx;
height: 160rpx;
background-color: aqua;
border-radius: 10rpx;
}
}
.info_txt{
.info_txt {
padding-left: 30rpx;
padding-right: 30rpx;
display: flex;
flex-wrap: wrap;
width: 100%;
.content{
line-height: 44rpx;
.content {
height: 74rpx;
line-height: 37rpx;
font-size: 30rpx;
color:rgba(51,51,51,1);
}
@@ -363,12 +442,10 @@ export default {
>image{
width: 27rpx;
height: 12rpx;
}
}
> input {
flex: 1;
text-align: right;
}
}
@@ -385,6 +462,17 @@ export default {
}
}
}
.order-view {
.title {
width: 140rpx;
font-size: 30rpx;
color: rgba(51,51,51,1);
margin-right: 10rpx;
}
> input {
text-align: left;
}
}
}
.upload-image {
padding: 35rpx 30rpx;
@@ -417,141 +505,103 @@ export default {
height: 98rpx;
background: rgba(255,120,15,1);
border-radius: 49rpx;
position: absolute;
bottom: 40rpx;
left: 50%;
transform: translate(-50%, 0);
margin: 30rpx auto 30rpx;
font-size: 36rpx;
color:rgba(255,255,255,1);
text-align: center;
line-height: 98rpx;
}
.popup{
width: 100%;
height: 100%;
position: fixed;
bottom: 0;
left: 0;
right: 0;
z-index: 2;
background-color: rgba(0, 0, 0, 0.4);
transform: scale(1);
align-items: center;
transition-duration: 0.3s;
.popup_cont{
border-top: 1px solid RGBA(239, 236, 240, 1);
background-color: #fff;
width: 100%;
height: 1072rpx;
line-height: 80rpx;
font-size:28rpx;
font-family:PingFang SC;
font-weight:400;
color:rgba(102,102,102,1);
transform: scale(1);
position: fixed;
.order-popup {
.check{
padding: 30rpx;
border-bottom: 1rpx solid rgba(236, 236, 236, 1);
display: flex;
flex-direction: column;
bottom: 0px;
left: 0px;
right: 0px;
/* top: 0px; */
transition-duration: 0.3s;
border-radius:20px 20px 0px 0px;
> uni-swiper {
flex: 1;
height: 100vh;
.order-list{
height: 60vh;
padding-bottom: 140rpx;
}
align-items: center;
justify-content: space-between;
> text {
font-size: 30rpx;
font-weight: 500;
color: rgba(51,51,51,1);
}
.check{
font-size:30rpx;
font-family:PingFang SC;
font-weight:500;
color:rgba(51,51,51,1);
height:88rpx;
width: 100%;
padding-left: 30rpx;
border-bottom: 1px solid rgba(236, 236, 236, 1);
>image{
width: 32rpx;
height: 32rpx;
vertical-align: middle;
float: right;
padding-top: 30rpx;
padding-right:30rpx
}
}
.store{
>view{
padding-left: 30rpx;
padding-top: 30rpx;
>image{
width:60rpx;
height:60rpx;
border-radius:50%;
vertical-align: middle;
padding-right:13rpx
}
}
font-size:28rpx;
font-family:PingFang SC;
font-weight:400;
color:rgba(51,51,51,1);
line-height: 60rpx;
}
.checkd{
>radio-group .uni-list-cell{
display: flex;
flex-wrap: nowrap;
width: 100%;
}
.radio{
display: flex;
align-items: center;
padding-left: 30rpx;
}
.store_info{
display: flex;
flex-wrap: nowrap;
width: 100%;
.info_img{
>image{
width: 180rpx;
height: 160rpx;
}
.order-list {
height: 60vh;
padding: 30rpx;
box-sizing: border-box;
.order-item {
margin-bottom: 30rpx;
.store {
.name {
margin-bottom: 20rpx;
font-size: 28rpx;
color:rgba(51,51,51,1);
> image {
width: 60rpx;
height: 60rpx;
border-radius: 50%;
vertical-align: middle;
margin-right: 13rpx;
}
}
.info_txt{
padding-left: 30rpx;
padding-right: 30rpx;
.order-sn {
margin-bottom: 20rpx;
font-size: 24rpx;
color: rgba(153,153,153,1);
}
}
.checkd {
.radio-view {
display: flex;
flex-wrap: wrap;
width: 100%;
.content{
line-height: 44rpx;
font-size: 30rpx;
color:rgba(51,51,51,1);
align-items: center;
.radio {
margin-right: 20rpx;
}
.much{
.store_info {
display: flex;
justify-content: space-between;
flex-wrap: nowrap;
width: 100%;
.info_img{
>image{
width: 180rpx;
height: 160rpx;
background-color: aqua;
border-radius: 10rpx;
}
}
.info_txt{
padding-left: 30rpx;
padding-right: 30rpx;
display: flex;
flex-wrap: wrap;
width: 100%;
.content{
height: 74rpx;
line-height: 37rpx;
font-size: 30rpx;
color:rgba(51,51,51,1);
}
.much{
display: flex;
justify-content: space-between;
width: 100%;
}
}
}
}
}
}
}
.order-btn {
width: 690rpx;
height: 98rpx;
background: rgba(255,120,15,1);
border-radius: 49rpx;
line-height: 98rpx;
text-align: center;
margin: 0 auto 40rpx;
font-size: 36rpx;
color: rgba(255,255,255,1);
}
}
}
</style>