Commit 99e862db authored by chuan.liu's avatar chuan.liu

SwipeAciton 兼容模拟器处理

parent 00e78f1c
...@@ -168,7 +168,8 @@ ...@@ -168,7 +168,8 @@
"fontSize": "14px", "fontSize": "14px",
"color": "#555" "color": "#555"
}] }]
} },
"bounce": "none"
} }
} }
}, { }, {
...@@ -188,7 +189,8 @@ ...@@ -188,7 +189,8 @@
"fontSize": "14px", "fontSize": "14px",
"color": "#555" "color": "#555"
}] }]
} },
"bounce": "none"
} }
} }
}, { }, {
...@@ -208,7 +210,8 @@ ...@@ -208,7 +210,8 @@
"fontSize": "14px", "fontSize": "14px",
"color": "#555" "color": "#555"
}] }]
} },
"bounce": "none"
} }
} }
}, { }, {
...@@ -271,7 +274,8 @@ ...@@ -271,7 +274,8 @@
"fontSize": "14px", "fontSize": "14px",
"color": "#555" "color": "#555"
}] }]
} },
"bounce": "none"
} }
} }
}, { }, {
...@@ -390,7 +394,7 @@ ...@@ -390,7 +394,7 @@
"titleAlign": "left", "titleAlign": "left",
"titleColor": "#333", "titleColor": "#333",
"titleSize": "17px", "titleSize": "17px",
"backgroundColor": "#fff", "backgroundColor": "transparent",
"titleText": "采购计划", "titleText": "采购计划",
"autoBackButton": true "autoBackButton": true
} }
......
...@@ -13,11 +13,12 @@ ...@@ -13,11 +13,12 @@
<scroll-view class="scroll-area view" :scroll-top="scrollTop" scroll-y="true"> <scroll-view class="scroll-area view" :scroll-top="scrollTop" scroll-y="true">
<view class="planout-block"> <view class="planout-block">
<text class="planout-block-title">订购产品</text> <text class="planout-block-title">订购产品</text>
<image class="planout-block-icon" src="@/static/image/shop_more@3x.png" mode="aspectFit"></image> <image class="planout-block-icon" src="@/static/image/shop_more@3x.png" @click="addPlanout"
mode="aspectFit"></image>
</view> </view>
<uni-swipe-action class="planout-block-lists"> <uni-swipe-action class="planout-block-lists">
<uni-swipe-action-item v-for="item in 2" :key='item'> <uni-swipe-action-item v-for="item in planoutLists" :key='item'>
<view class="middle view planout-block-item"> <view class="middle view planout-block-item">
<view class="text-block title-first"> <view class="text-block title-first">
<text class="middle-date title-first__text">1</text> <text class="middle-date title-first__text">1</text>
...@@ -74,11 +75,15 @@ ...@@ -74,11 +75,15 @@
data() { data() {
return { return {
scrollTop: 0, scrollTop: 0,
planoutLists: 2
} }
}, },
methods: { methods: {
handleDel() { handleDel() {
console.log(1) this.planoutLists--
},
addPlanout() {
this.planoutLists++
}, },
nextStep() { nextStep() {
this.$emit('click', 'orderUpload') this.$emit('click', 'orderUpload')
......
...@@ -2,12 +2,10 @@ ...@@ -2,12 +2,10 @@
<view class="lists"> <view class="lists">
<view class="status_bar" :style="navHeight"></view> <view class="status_bar" :style="navHeight"></view>
<view class="middle upload summary"> <view class="middle upload summary">
<view class="summary-line">
<view class="summary-block"> <view class="summary-block">
<text class="upload-text">预约</text> <text class="upload-text">预约</text>
</view> </view>
<switch class="summary-num" color='red' :checked="isChecked" @change="switchChange" /> <switch class="summary-num" color='red' :checked="isChecked" @change="switchChange" />
</view>
<!-- <view class="summary-line summary-line-last"> <!-- <view class="summary-line summary-line-last">
<text>材料保证金</text> <text>材料保证金</text>
<text>0.00</text> <text>0.00</text>
...@@ -89,7 +87,7 @@ ...@@ -89,7 +87,7 @@
data() { data() {
return { return {
isChecked: false, isChecked: false,
scrollTop:0, scrollTop: 0,
orderNo: '', orderNo: '',
} }
}, },
...@@ -153,7 +151,7 @@ ...@@ -153,7 +151,7 @@
/* #endif */ /* #endif */
.lists { .lists {
flex: 1; width: 750rpx;
position: relative; position: relative;
flex-direction: column; flex-direction: column;
padding: 32rpx 16rpx 0; padding: 32rpx 16rpx 0;
...@@ -247,16 +245,13 @@ ...@@ -247,16 +245,13 @@
.summary { .summary {
display: flex; display: flex;
flex-direction: column; justify-content: space-between;
align-items: flex-start;
justify-content: center;
margin-bottom: 32rpx; margin-bottom: 32rpx;
padding: 32rpx 48rpx; padding: 32rpx 48rpx;
} }
.summary-line { .summary-line {
display: flex; display: flex;
width: 100%;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<view class="middle view planout-block-item"> <view class="middle view planout-block-item">
<view class="item-block item-block-code"> <view class="item-block item-block-code">
<text class="item-block-label">计划编码:100820638</text> <text class="item-block-label">单号:100820638</text>
</view> </view>
<view class="item-block item-block-name"> <view class="item-block item-block-name">
<text class="item-block-label item-block__label">电商配额酒年度计划(1-5月)</text> <text class="item-block-label item-block__label">电商配额酒年度计划(1-5月)</text>
...@@ -135,13 +135,13 @@ ...@@ -135,13 +135,13 @@
height: 284rpx; height: 284rpx;
opacity: 0.72; opacity: 0.72;
margin-top: -88rpx; margin-top: -88rpx;
background-image: linear-gradient(232deg, #f4e2e2 25%, #faf3f3 98%); background: linear-gradient(232deg, #f4e2e2 25%, #faf3f3 98%);
} }
.lists { .lists {
position: relative; position: relative;
flex-direction: column; flex-direction: column;
overflow-y: scroll;
background: #f0f4f5; background: #f0f4f5;
flex: 1; flex: 1;
height: 100%; height: 100%;
...@@ -184,7 +184,6 @@ ...@@ -184,7 +184,6 @@
font-size: 28rpx; font-size: 28rpx;
line-height: 96rpx; line-height: 96rpx;
height: 96rpx; height: 96rpx;
white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
color: #888; color: #888;
...@@ -242,7 +241,6 @@ ...@@ -242,7 +241,6 @@
font-size: 32rpx; font-size: 32rpx;
color: #333; color: #333;
font-weight: 500; font-weight: 500;
white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
...@@ -278,7 +276,7 @@ ...@@ -278,7 +276,7 @@
justify-content: space-between; justify-content: space-between;
} }
.block-detal-item-last{ .block-detal-item-last {
margin-bottom: 0; margin-bottom: 0;
} }
...@@ -287,7 +285,7 @@ ...@@ -287,7 +285,7 @@
font-size: 24rpx; font-size: 24rpx;
} }
.detal-item-value{ .detal-item-value {
color: #333; color: #333;
font-size: 28rpx; font-size: 28rpx;
} }
......
...@@ -103,22 +103,32 @@ ...@@ -103,22 +103,32 @@
}, },
}, },
onNavigationBarButtonTap(e) { onNavigationBarButtonTap(e) {
console.log('onNavigationBarButtonTap:', e); // console.log('onNavigationBarButtonTap:', e, this.isOpened, this.selectedBusiness);
if (this.isOpened === 'left' && this.selectedBusiness && this.selectedBusiness.id) {
uni.$emit('selectedBusiness', {
selectedBusiness: this.selectedBusiness
})
uni.navigateBack({})
return
}
this.isOpened = this.isOpened === 'none' ? 'left' : 'none'; this.isOpened = this.isOpened === 'none' ? 'left' : 'none';
// #ifdef APP-PLUS // #ifdef APP-PLUS
let webView = this.$mp.page.$getAppWebview(); let pages = getCurrentPages()
let page = pages[pages.length - 1]
let webView = page.$getAppWebview();
console.log('webView', webView) console.log('webView', webView)
webView.setTitleNViewButtonStyle(0, { webView.setTitleNViewButtonStyle(0, {
text: this.isOpened === 'none' ? '选择' : '完成', text: this.isOpened === 'none' ? '选择' : '完成',
}); });
// let titleObj = webView.getStyle().titleNView;
// if(!titleObj.buttons){
// returnl
// }
// titleObj.buttons[0].text = 'dd';
// webView.setStyle({
// titleNView:titleObj
// })
// #endif // #endif
if (this.isOpened === 'none') {
uni.$emit('selectedBusiness', {
selectedBusiness: this.selectedBusiness
})
uni.navigateBack({})
}
}, },
methods: { methods: {
search() { search() {
...@@ -163,7 +173,6 @@ ...@@ -163,7 +173,6 @@
.header-bg { .header-bg {
height: 284rpx; height: 284rpx;
opacity: 0.72;
margin-top: -88rpx; margin-top: -88rpx;
background: linear-gradient(232deg, #f4e2e2 25%, #faf3f3 98%); background: linear-gradient(232deg, #f4e2e2 25%, #faf3f3 98%);
} }
...@@ -189,6 +198,7 @@ ...@@ -189,6 +198,7 @@
} }
.text-block { .text-block {
display: flex;
overflow: hidden; overflow: hidden;
height: 96rpx; height: 96rpx;
margin-bottom: 14rpx; margin-bottom: 14rpx;
...@@ -271,12 +281,14 @@ ...@@ -271,12 +281,14 @@
} }
.swipe-right-block { .swipe-right-block {
display: flex;
width: 100rpx; width: 100rpx;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.swipe-right-block__text { .swipe-right-block__text {
display: inline-block;
width: 52rpx; width: 52rpx;
height: 52rpx; height: 52rpx;
border-radius: 50%; border-radius: 50%;
......
...@@ -129,22 +129,32 @@ ...@@ -129,22 +129,32 @@
}, },
}, },
onNavigationBarButtonTap(e) { onNavigationBarButtonTap(e) {
console.log('onNavigationBarButtonTap:', e); // console.log('onNavigationBarButtonTap:', e, this.isOpened, this.selectedGroupClient);
if (this.isOpened === 'left' && this.selectedGroupClient && this.selectedGroupClient.id) {
uni.$emit('selectedGroupClient', {
selectedGroupClient: this.selectedGroupClient
})
uni.navigateBack({})
return
}
this.isOpened = this.isOpened === 'none' ? 'left' : 'none'; this.isOpened = this.isOpened === 'none' ? 'left' : 'none';
// #ifdef APP-PLUS // #ifdef APP-PLUS
let webView = this.$mp.page.$getAppWebview(); let pages = getCurrentPages()
let page = pages[pages.length - 1]
let webView = page.$getAppWebview();
console.log('webView', webView) console.log('webView', webView)
webView.setTitleNViewButtonStyle(0, { webView.setTitleNViewButtonStyle(0, {
text: this.isOpened === 'none' ? '选择' : '完成', text: this.isOpened === 'none' ? '选择' : '完成',
}); });
// let titleObj = webView.getStyle().titleNView;
// if(!titleObj.buttons){
// returnl
// }
// titleObj.buttons[0].text = 'dd';
// webView.setStyle({
// titleNView:titleObj
// })
// #endif // #endif
if (this.isOpened === 'none') {
uni.$emit('selectedGroupClient', {
selectedGroupClient: this.selectedGroupClient
})
uni.navigateBack({})
}
}, },
methods: { methods: {
search() { search() {
...@@ -201,7 +211,6 @@ ...@@ -201,7 +211,6 @@
.header-bg { .header-bg {
height: 284rpx; height: 284rpx;
opacity: 0.72;
margin-top: -88rpx; margin-top: -88rpx;
background: linear-gradient(232deg, #f4e2e2 25%, #faf3f3 98%); background: linear-gradient(232deg, #f4e2e2 25%, #faf3f3 98%);
} }
...@@ -226,6 +235,7 @@ ...@@ -226,6 +235,7 @@
} }
.text-block { .text-block {
display: flex;
overflow: hidden; overflow: hidden;
height: 96rpx; height: 96rpx;
margin-bottom: 14rpx; margin-bottom: 14rpx;
...@@ -299,6 +309,7 @@ ...@@ -299,6 +309,7 @@
} }
.swipe-right-block { .swipe-right-block {
display: flex;
width: 100rpx; width: 100rpx;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
......
...@@ -99,22 +99,33 @@ ...@@ -99,22 +99,33 @@
}, },
}, },
onNavigationBarButtonTap(e) { onNavigationBarButtonTap(e) {
console.log('onNavigationBarButtonTap:', e);
// console.log('onNavigationBarButtonTap:', e, this.isOpened, this.selectedGroupClient);
if (this.isOpened === 'left' && this.selectedGroupClient && this.selectedGroupClient.id) {
uni.$emit('selectedGroupClient', {
selectedGroupClient: this.selectedGroupClient
})
uni.navigateBack({})
return
}
this.isOpened = this.isOpened === 'none' ? 'left' : 'none'; this.isOpened = this.isOpened === 'none' ? 'left' : 'none';
// #ifdef APP-PLUS // #ifdef APP-PLUS
let webView = this.$mp.page.$getAppWebview(); let pages = getCurrentPages()
let page = pages[pages.length - 1]
let webView = page.$getAppWebview();
console.log('webView', webView) console.log('webView', webView)
webView.setTitleNViewButtonStyle(0, { webView.setTitleNViewButtonStyle(0, {
text: this.isOpened === 'none' ? '选择' : '完成', text: this.isOpened === 'none' ? '选择' : '完成',
}); });
// let titleObj = webView.getStyle().titleNView;
// if(!titleObj.buttons){
// returnl
// }
// titleObj.buttons[0].text = 'dd';
// webView.setStyle({
// titleNView:titleObj
// })
// #endif // #endif
if (this.isOpened === 'none') {
uni.$emit('selectedGroupClient', {
selectedGroupClient: this.selectedGroupClient
})
uni.navigateBack({})
}
}, },
methods: { methods: {
search() { search() {
...@@ -167,7 +178,6 @@ ...@@ -167,7 +178,6 @@
.header-bg { .header-bg {
height: 284rpx; height: 284rpx;
opacity: 0.72;
margin-top: -88rpx; margin-top: -88rpx;
background: linear-gradient(232deg, #f4e2e2 25%, #faf3f3 98%); background: linear-gradient(232deg, #f4e2e2 25%, #faf3f3 98%);
} }
...@@ -193,6 +203,7 @@ ...@@ -193,6 +203,7 @@
} }
.text-block { .text-block {
display: flex;
overflow: hidden; overflow: hidden;
height: 96rpx; height: 96rpx;
margin-bottom: 14rpx; margin-bottom: 14rpx;
...@@ -275,12 +286,14 @@ ...@@ -275,12 +286,14 @@
} }
.swipe-right-block { .swipe-right-block {
display: flex;
width: 100rpx; width: 100rpx;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.swipe-right-block__text { .swipe-right-block__text {
display: inline-block;
width: 52rpx; width: 52rpx;
height: 52rpx; height: 52rpx;
border-radius: 50%; border-radius: 50%;
......
...@@ -28,10 +28,12 @@ ...@@ -28,10 +28,12 @@
</view> </view>
<uni-swipe-action class="planout-block-lists"> <uni-swipe-action class="planout-block-lists">
<uni-swipe-action-item v-for="(item,index) in lists" :key='item.id' :auto-close="false" :disabled='true' :show="isOpened" @click="handleClick"> <uni-swipe-action-item v-for="(item,index) in lists" :key='item.id' :auto-close="false" :disabled='true'
:show="isOpened" @click="handleClick">
<template v-slot:left> <template v-slot:left>
<view class="swipe-right-block" @click="handleChecked($event,item, index)"><text <view class="swipe-right-block" @click="handleChecked($event,item, index)"><text
class="swipe-right-block__text" :class="{'swipe-right-block__active':item.checked}"></text> class="swipe-right-block__text"
:class="{'swipe-right-block__active':item.checked}"></text>
</view> </view>
</template> </template>
<view class="middle view planout-block-item"> <view class="middle view planout-block-item">
...@@ -70,23 +72,22 @@ ...@@ -70,23 +72,22 @@
isOpened: 'none', isOpened: 'none',
array: ['2021', '2020', '2019', '2018'], array: ['2021', '2020', '2019', '2018'],
index: 0, index: 0,
lists:[ lists: [{
{ id: 1,
id:1, checked: false,
checked:false, product: '新品五粮液',
product:'新品五粮液', quantity: 2,
quantity:2, price: 100
price:100
}, },
{ {
id:2, id: 2,
checked:false, checked: false,
product:'新品五粮液91 52%', product: '新品五粮液91 52%',
quantity:4, quantity: 4,
price:200 price: 200
} }
], ],
selectedProduct:{} selectedProduct: {}
} }
}, },
computed: { computed: {
...@@ -97,21 +98,33 @@ ...@@ -97,21 +98,33 @@
} }
}, },
}, },
onNavigationBarButtonTap(e){ onNavigationBarButtonTap(e) {
console.log('onNavigationBarButtonTap:',e); // console.log('onNavigationBarButtonTap:', e, this.isOpened, this.selectedProduct);
if (this.isOpened === 'left' && this.selectedProduct && this.selectedProduct.id) {
uni.$emit('selectedProduct', {
selectedProduct: this.selectedProduct
})
uni.navigateBack({})
return
}
this.isOpened = this.isOpened === 'none' ? 'left' : 'none'; this.isOpened = this.isOpened === 'none' ? 'left' : 'none';
// #ifdef APP-PLUS // #ifdef APP-PLUS
let webView = this.$mp.page.$getAppWebview(); let pages = getCurrentPages()
console.log('webView',webView) let page = pages[pages.length - 1]
let webView = page.$getAppWebview();
console.log('webView', webView)
webView.setTitleNViewButtonStyle(0, { webView.setTitleNViewButtonStyle(0, {
text: this.isOpened === 'none' ? '选择' : '完成', text: this.isOpened === 'none' ? '选择' : '完成',
}); });
// let titleObj = webView.getStyle().titleNView;
// if(!titleObj.buttons){
// returnl
// }
// titleObj.buttons[0].text = 'dd';
// webView.setStyle({
// titleNView:titleObj
// })
// #endif // #endif
if(this.isOpened === 'none'){
uni.$emit('selectedProduct',{selectedProduct:this.selectedProduct})
uni.navigateBack({})
}
}, },
methods: { methods: {
search() { search() {
...@@ -121,23 +134,23 @@ ...@@ -121,23 +134,23 @@
console.log('picker发送选择改变,携带值为', e.detail.value) console.log('picker发送选择改变,携带值为', e.detail.value)
this.index = e.detail.value this.index = e.detail.value
}, },
handleClick(e,content,index){ handleClick(e, content, index) {
console.log('click当前索引:',e,content, index); console.log('click当前索引:', e, content, index);
}, },
handleChecked(e,item,index){ handleChecked(e, item, index) {
console.log('当前索引:',e, index); console.log('当前索引:', e, index);
this.lists.forEach((cur)=>{ this.lists.forEach((cur) => {
if(cur.id === item.id){ if (cur.id === item.id) {
cur.checked = !cur.checked cur.checked = !cur.checked
}else{ } else {
cur.checked = false cur.checked = false
} }
}) })
if(item.checked === true){ if (item.checked === true) {
// this.selectedProduct.push(item) // this.selectedProduct.push(item)
this.selectedProduct = item this.selectedProduct = item
}else{ } else {
// const selectIndex = this.selectedProduct.findIndex((saleplan)=>{ // const selectIndex = this.selectedProduct.findIndex((saleplan)=>{
// return saleplan.id === item.id // return saleplan.id === item.id
// }) // })
...@@ -164,7 +177,6 @@ ...@@ -164,7 +177,6 @@
.header-bg { .header-bg {
height: 284rpx; height: 284rpx;
opacity: 0.72;
margin-top: -88rpx; margin-top: -88rpx;
background: linear-gradient(232deg, #f4e2e2 25%, #faf3f3 98%); background: linear-gradient(232deg, #f4e2e2 25%, #faf3f3 98%);
} }
...@@ -174,7 +186,7 @@ ...@@ -174,7 +186,7 @@
flex-direction: column; flex-direction: column;
overflow-y: scroll; overflow-y: scroll;
background: #f0f4f5; background: #f0f4f5;
overflow-x:hidden; overflow-x: hidden;
} }
.main { .main {
...@@ -190,6 +202,7 @@ ...@@ -190,6 +202,7 @@
} }
.text-block { .text-block {
display: flex;
overflow: hidden; overflow: hidden;
height: 96rpx; height: 96rpx;
margin-bottom: 14rpx; margin-bottom: 14rpx;
...@@ -258,7 +271,7 @@ ...@@ -258,7 +271,7 @@
.planout-block-lists { .planout-block-lists {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
overflow:hidden; overflow: hidden;
} }
.uni-swipe { .uni-swipe {
...@@ -271,12 +284,14 @@ ...@@ -271,12 +284,14 @@
} }
.swipe-right-block { .swipe-right-block {
display: flex;
width: 100rpx; width: 100rpx;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.swipe-right-block__text { .swipe-right-block__text {
display: inline-block;
width: 52rpx; width: 52rpx;
height: 52rpx; height: 52rpx;
border-radius: 50%; border-radius: 50%;
...@@ -287,7 +302,7 @@ ...@@ -287,7 +302,7 @@
width: 52rpx; width: 52rpx;
height: 52rpx; height: 52rpx;
border-radius: 50%; border-radius: 50%;
background-color:$wly-primary-color ; background-color: $wly-primary-color;
} }
.planout-block { .planout-block {
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
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