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

SwipeAciton 兼容模拟器处理

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